Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 340299

Summary: app-laptop/laptop-mode-tools-1.55-r1: broken AC/battary mode detection (probably kernel bug)
Product: Gentoo Linux Reporter: Sergey Mironov <ierton>
Component: Current packagesAssignee: Mobile Herd (OBSOLETE) <mobile+disabled>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: franz.trischberger
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: My linux-2.6.35-gentoo-r5 .config file.

Description Sergey Mironov 2010-10-09 21:28:21 UTC
laptop-mode uses /sys/class/power_supply/ACAD/online as first-order source, but it seems to be broken. 

One have to plug-in/plug-out power cable twice to set it to 0. In other words, it misses very first "plug-out" event, so I have a paradox:

# cat /sys/class/power_supply/ACAD/online
1
# cat /sys/class/power_supply/BAT1/status 
Discharging

This is probably a kernel bug, but I don't know where to mail it.

Reproducible: Always
Comment 1 Sergey Mironov 2010-10-09 21:29:38 UTC
Created attachment 250055 [details]
My linux-2.6.35-gentoo-r5   .config file.
Comment 2 Franz Trischberger 2010-12-18 06:29:53 UTC
I have the same problem. Seems to be a bug in "Future power /sys interface" (Kernel ACPI-config). If you disable this and enable "Deprecated /proc/acpi files
" and "Deprecated power /proc/acpi directories", everything works fine.

For kernel-bugs, there is https://bugzilla.kernel.org/.
Comment 3 Franz Trischberger 2011-02-10 10:14:49 UTC
With 2.6.37 (using gentoo-sources) this is fixed, at least for our Lenovo Thinkpad SL510.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2012-01-16 19:21:09 UTC
Try with linux-3.2 and laptop-mode-tools-1.60-r1, reopen if this is still a issue