Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 176757 - gnome-applets battery monitor broken on linux-2.6.21
Summary: gnome-applets battery monitor broken on linux-2.6.21
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: kernel-2.6.21
  Show dependency tree
 
Reported: 2007-05-02 03:16 UTC by Jeffrey Gardner (RETIRED)
Modified: 2007-06-29 22:24 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gnome-applets-2.16.2-acpi.patch (gnome-applets-2.16.2-acpi.patch,1.20 KB, patch)
2007-05-02 03:17 UTC, Jeffrey Gardner (RETIRED)
Details | Diff
gnome-applets-acpi-depreciated-procfs.patch (gnome-applets-acpi-depreciated-procfs.patch,1.06 KB, patch)
2007-06-16 17:41 UTC, Alan Swanson
Details | Diff
upstream patch (patch,3.79 KB, patch)
2007-06-29 01:25 UTC, Daniel Drake (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Gardner (RETIRED) gentoo-dev 2007-05-02 03:16:25 UTC
Due to changes in 2.6.21 the gnome battery applet shows you on AC at all times.
I found a report and link to a fix on the mactel-linux users ML.
http://sourceforge.net/mailarchive/forum.php?thread_name=463393D5.5000304%40mailsnare.net&forum_name=mactel-linux-users
patch to follow...
Comment 1 Jeffrey Gardner (RETIRED) gentoo-dev 2007-05-02 03:17:22 UTC
Created attachment 117920 [details, diff]
gnome-applets-2.16.2-acpi.patch
Comment 2 Rémi Cardona (RETIRED) gentoo-dev 2007-05-02 05:37:59 UTC
I fail to see the differences between the 2 codes, except that the second one will not return FALSE if it can't read /proc/acpi/info which looks like a big no-no to me.

Second idea : did you disable CONFIG_ACPI_PROCFS by any chance ? It's a new option for 2.6.21 and it specifically moves /proc/acpi/info to /sys/module/acpi/parameters/acpica_version

All in all, I don't feel that confident about that patch. But it's just me :) I'll look more into this after coffee.
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2007-05-04 00:03:48 UTC
Agreed: patch looks odd and fix should be not disabling the deprecated stuff
Comment 4 Sven 2007-05-04 16:04:24 UTC
I'm running kernel 2.6.21. And the gnome battery applet works since i enabled CONFIG_ACPI_PROCFS again.
Comment 5 Jeffrey Gardner (RETIRED) gentoo-dev 2007-05-04 21:12:07 UTC
Well, you guys are better able to spot a dodgy patch than me. I'm just reporting my findings wrt getting it to work.
For more info, you can see the gnome bug:

http://bugzilla.gnome.org/show_bug.cgi?id=427562

Thanks,
je_fro
Comment 6 Mart Raudsepp gentoo-dev 2007-05-06 05:09:45 UTC
according to drac XFCE battery monitor had a similar problem and they have a patch for it in xfce-extra/xfce4-battery/files/xfce4-battery-0.5.0-2.6.21.patch which might help doing a similar patch of our own
Comment 7 Alan Swanson 2007-06-16 17:41:49 UTC
Created attachment 122246 [details, diff]
gnome-applets-acpi-depreciated-procfs.patch

Attached is successfully tested patch to update for reading the kernel ACPI version in the new acpica_version sysfs entry.

However I would note there is also a second issue which might confuse people. The gnome-power-manager creates a battery a notification icon (not an applet) and folk might have previously disabled the original battery applet.

Unfortunately this is also no longer being created as hal is also not up to date with Linux acpi procfs depreciation either. There was a change in hal 0.5.9 to get the kernel ACPI version from /sys/firmware/acpi/info but where they got this bogus entry from who knows...

Will copy this to the Gnome bugzilla.
Comment 8 Daniel Drake (RETIRED) gentoo-dev 2007-06-29 01:25:31 UTC
Created attachment 123350 [details, diff]
upstream patch

This is the patch I just committed upstream. I tested it with gnome-applets-2.18.0 replacing the patch in -r1. It works nicely. Can I commit it?

We also need to get this fixed in the stable tree before we can stable 2.6.21. This same patch also applies against gnome-applets-2.16.2. Can someone please compile test it?
Comment 9 Daniel Drake (RETIRED) gentoo-dev 2007-06-29 22:24:08 UTC
committed both 2.16 and 2.18 versions. I'll see about marking the new 2.16 stable within the next couple of days...