Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 250224 - app-admin/conky fails to check for AC adapters
Summary: app-admin/conky fails to check for AC adapters
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-07 23:24 UTC by Christoph Mende (RETIRED)
Modified: 2010-01-25 18:20 UTC (History)
4 users (show)

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


Attachments
patch to fix the ac adapter path (conky-ac-adapter-path.patch,697 bytes, patch)
2008-12-07 23:27 UTC, Christoph Mende (RETIRED)
Details | Diff
conky-9999.ebuild (conky-9999.ebuild,4.14 KB, text/plain)
2010-01-24 15:29 UTC, Daniel Pielmeier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Mende (RETIRED) gentoo-dev 2008-12-07 23:24:51 UTC
$acpiacadapter checks for /sys/class/power_supply/AC/uevent, which is not present and just puts "no ac_adapters?" in the UI, the correct path is /sys/class/power_supply/ADP1/uevent
Comment 1 Christoph Mende (RETIRED) gentoo-dev 2008-12-07 23:27:56 UTC
Created attachment 174611 [details, diff]
patch to fix the ac adapter path

even though the comment in linux.c says it's AC in 2.6.25+, it's always been ADP1 on this system, currently running 2.6.28-rc7 - you might want to ask others first though to be sure
Comment 2 Christoph Mende (RETIRED) gentoo-dev 2008-12-07 23:30:54 UTC
Comment on attachment 174611 [details, diff]
patch to fix the ac adapter path

fixed a typo in the patch's filename, this is with conky-1.6.2_pre btw
Comment 3 Brenden Matthews 2008-12-08 05:10:34 UTC
So has this path changed?  Or was it always wrong?  I don't want to break things for older kernels.
Comment 4 Christoph Mende (RETIRED) gentoo-dev 2008-12-08 22:44:04 UTC
well, it's always been ADP1 on this lappy, i.e. 2.6.26-2.6.28
Comment 5 Christoph Mende (RETIRED) gentoo-dev 2008-12-10 11:25:37 UTC
there's actually an even better way to fix this, acpiacadapter could have an option like the battery_* options, that one might even default to AC, but I can change it to ADP1 here
Comment 6 Daniel Pielmeier gentoo-dev 2009-07-30 21:33:51 UTC
Any news on this. Still a problem?
Comment 7 Christoph Mende (RETIRED) gentoo-dev 2009-11-04 20:53:28 UTC
Conky: can't open /sys/class/power_supply/AC/uevent: No such file or directory

% ls /sys/class/power_supply 
ADP1@  BAT0@

[I] app-admin/conky (1.7.2-r2@11/04/2009): An advanced, highly configurable system monitor for X

yes, still a problem
Comment 8 Daniel Pielmeier gentoo-dev 2010-01-23 22:20:45 UTC
(In reply to comment #5)
> there's actually an even better way to fix this, acpiacadapter could have an
> option like the battery_* options, that one might even default to AC, but I can
> change it to ADP1 here
> 

Okay after some research it looks like this is not kernel dependent, but hardware dependent. So the name of the adapter may be AC but could also have other values for some hardware.

@brenden is it possible to implement something like christoph suggests here. So the user can provide the name of the adapter and conky looks for /sys/class/power_supply/${var}
Comment 9 pavelo 2010-01-24 15:20:51 UTC
1.8.0 will have an aditional argument of $acpiacadapter, which can be used to specify the subfolder of /sys/class/power_supply/ containing the info.

The patch is in <http://git.omp.am/?p=conky.git;a=commit;h=f5363b6539d7bd4928437823d3ebc81b7f7502d5> (although it probably doesn't apply on 1.7.2 cleanly)
I would appreciate some feedback, as i don't have the hardware to test it on.
thanks.
Comment 10 Daniel Pielmeier gentoo-dev 2010-01-24 15:29:22 UTC
Created attachment 217322 [details]
conky-9999.ebuild

Christoph you can use the attached live ebuild so you don't have to mess with patches. :)
Comment 11 Christoph Mende (RETIRED) gentoo-dev 2010-01-25 15:05:35 UTC
it actually does work, ty :>
Comment 12 Daniel Pielmeier gentoo-dev 2010-01-25 15:22:08 UTC
(In reply to comment #11)
> it actually does work, ty :>

Good to hear :)

@pavelo: As this is also fixed in the upcoming 1.8 series. Does it make sense to bump to 1.8.0_rc2? Or will there be a final version of 1.8.0 or 1.8.1 in the not to distant future.
Comment 13 pavelo 2010-01-25 16:32:32 UTC
(In reply to comment #11)
> it actually does work, ty :>
My pleasure ;)

(In reply to comment #12)
> @pavelo: As this is also fixed in the upcoming 1.8 series. Does it make sense
> to bump to 1.8.0_rc2? Or will there be a final version of 1.8.0 or 1.8.1 in the
> not to distant future.
I couldn't say. I hope it's not too far down the road.
Comment 14 Daniel Pielmeier gentoo-dev 2010-01-25 18:20:10 UTC
I have just committed conky-1.8.0_rc2 which should fix this issue.