Battery status, the kernel, and Debian stupidity

So, given that I'd be on a holiday next week, I thought it would've been a good idea to do an upgrade of my Debian install on my laptop, in the hope that it'd use less power. The good news was that it seemed like it did, with slightly lower temperature (I guess due to tickless timer on AMD64 in the 2.6.24 kernel). The bad news was that I couldn't even try to quantify it at all: all my battery-measuring tools wouldn't work at all anymore. In particular, no KDE Battery Systray icon anymore, leaving me without any indication at all about how much battery I have left. Hoping it'd be just a KDE update fluke, I checked my other favourite power-related tool, powertop. Unfortunately it also failed to show any relevant information about power usage... :(

I must say, it's real fun to lose the ability to see your battery status a few days before you leave on a holiday. Particularly funny, given that at the same day that I discover this, I read a post on the planet about some people getting double battery information.

Which of course pointed me directly to the most likely cause: a change in the kernel. Some googling later, it turns out that, once again, I am pretty angry at the Debian people. It seems like they switched to the new way of doing this kind of stuff, sysfs style. Unfortunately, they completely disabled the legacy support for the procfs way of measuring things, leaving all applications that use the old way in the cold.

Now, you'd think that once you'd point this out, the Debian people would try to fix this post-hase. But nooooh!, apparently having people's applications and systems become useless and being userfriendly is less important to the Debian kernel maintainers than keeping their kernels clean of 'deprecated' /proc entries...

So, how do we fix this? I just wasted my time making my own debian kernel package. In particular, in the make menuconfig, go to
Power management options --->
ACPI (Advanced Configuration and Power Interface) Support --->

And then just enable
[*] Deprecated power /proc/acpi folders
(If you're particularly pissed, you could perhaps take it out by disabling [ ] Future power /sys interface...)

Luckily the walkthrough was clear enough, except that the package's name prefix had slightly changed. I just had to issue a dpkg --install ../linux-image-2.6.24_Custom.DebianFuckwits.0_amd64.deb to install the kernel, and then edit my grub file manually (bah!).

After a reboot, I had restored full usability of my power-measuring tools. Turns out my laptop seems to have an increased power use. No idea why, but at least now I actually know it is the case.

Anyway, this isn't doing pretty well in trying to prove to other people that Linux is decent to use. In particular, one of my colleagues pointed out to me that this is exactly the kind of crap (noting something doesn't work, wasting time googling for the problem, hoping someone else has described a fix, trying to apply the fix) he is so happy to have left behind him by switching to OS X...


Not to be a smart ass, but I would like to point out that you are running Debian unstable, a development release. Things break all the time in unstable; that's sort of the point. If you're not willing to handle the problems that crop up (including the intentional ones) perhaps you should use stable, or another distro. I use unstable everyday on my chief workstation. I fully expect breakage at some point and I am prepared, backups in hand, for the consequences.

And, like he said, the proc interface has been deprecated for a while now. It's only a matter of time before it's removed from upstream altogether. Blame the package maintainers, not the kernel team, for using an old interface.

By Scott Abbey at Sat, 02/02/2008 - 19:16

Yes, and then you use stable, and then you find out a program doesn't support a feature or has a dumb bug. And then the developers of that program will laugh at the bizzarely outdated version you use, and suggest you update your system to a version which fixed the bug or added the feature (which you can't, since that'd mean adding unstable sources which clash, etc, blah, beh). See, if I'd been using Debian experimental, then I would have had no reason to complain...

And like I said, I can understand with unstable having glitches like this. I just take issue with the attitude towards absolutely not caring about fixing it for the end user (who after all are using it). And IMO that's exactly on of the reasons why Linux on the desktop still sucks, and will keep sucking as long as the attitude doesn't change.

Perhaps it's because I've grown to be an old embittered nag, or perhaps it's just because I now have a job and thus less time, but this kind of crap annoys me a lot more than it used to.

By bart coppens at Sat, 02/02/2008 - 19:40

This is just typical debian behavior. They can flip one little switch and make their users happier, and they refuse to.

Hey stupids: If you keep something for backwards compatibility, it's to give you a chance to fix problems like this.

Then they wonder why they lose all their users to ubuntu.

By Charles Samuels at Sat, 02/02/2008 - 20:26

I completely understand your anger at debian (and I share it with you, see my problems with Debian on my laptop http://www.kdedevelopers.org/node/3128). Since then, I have simply reinstalled kubuntu on my laptop. I backed up the whole configuration and then copied it over 1:1, so I didn't even have to spend a significant amount of time configuring the new system. I must say, I'm really satisfied now back at KUbuntu: Hardware support simply works out of the box....


By Reinhold Kainhofer at Sat, 02/02/2008 - 21:15

it make me remember you never submitted a bug report to Debian about it or replied to Jonathan about bugs you've come across.

By fabo at Sat, 02/02/2008 - 23:23

First of all, if you install a kernel and it doesn't work, just go back to the old one! I don't see what the big deal is. Install linux-image-2.6.24, then reboot and choose it in the grub menu. If it breaks, reboot and choose your old kernel. No big deal at all.

And 2.6.24 was just released a few days ago and is brand new in unstable. That's generally not the sort of thing you try to install when you need your laptop to work, just in the hope of saving a few milliwatts of power.

You compare this to OS X, but really you can only compare it if you're running OS X and building your own kernels from source. Then see how stable it is.

By leos at Sat, 02/02/2008 - 21:31

Well, I actually needed a more recent'ish kernel than I had before anyway, since I wanted to try out my wireless network as well, which was not yet available in my old kernel.

Now, 'a few milliwats of power' can make all the difference when you're not near a power outlet, just like having a 'lower temperature' is better for the laptop itself afaik. Furthermore, and repeating myself, my problem is not that it is 'brand new' in unstable. I realize that bugs can be introduced in new software, no big deal. What frustrates me is how it is handled towards the user.

(Oh, and insulting doesn't help indeed, but it sure can be relieving when you're angry.)

By bart coppens at Sat, 02/02/2008 - 23:55

Do you really need to insult people when they don't agree with your point of view ?

By fabo at Sat, 02/02/2008 - 23:25

commit r10399 /dists/sid/linux-2.6/debian/ (changelog config/amd64/config config/i386/config):
amd64, i386: reenable ACPI_PROCFS_POWER
userspace is not there yet, fallouts all over.
to be revisited for 2.6.25.

You can expect to have the interface back for -3.

By fabo at Sun, 02/03/2008 - 15:41

I use stable (etch) plus a deb-src line pointing at sid (so it only fetches source packages, not binary). When I need a newer version of a package, I build it from source:
apt-get source foopkg && cd foopkg-3.0
dpkg-buildpackage -rfakeroot -b
su -c 'dpkg -i ../foopkg_3.0.deb'

In 90% of occasions that's enough. So you get the stability of stable and the occasional more recent package. If you run 100% sid, of course it will break; it's a miracle it doesn't do it more often. It's like running an internal alpha build of any other distro/OS.

(To people saying "(K)Ubuntu works better", it's worth reminding that Ubuntu is built upon Debian/sid. 90% of the work is done by (deeply-knowledgeable, unattractive, socially-challenged, newbie-bashing) Debian people, for *free*...)

By Giacomo Lacava at Wed, 02/20/2008 - 08:27