openSUSE(?) doesn't correctly detect if adapter is plugged

Hi all,

openSUSE has problems detecting if the AC Adapter is plugged in or not. Say if it’s plugged in and I unplug it, it still thinks it’s plugged in and charging. (Or vice versa). The actual charging/discharging takes place normally and the percentage display is also accurate - it’s just that it doesn’t detect properly if it’s plugged in or not.

This is not a huge issue, but it gets annoying as it uses a wrong power profile - so it could be on Aggressive Powersave if I’m plugged in, or worse, on Performance when I’m running low on battery!

One thing to be noted though is it does detect the adapter status properly at bootup. Oh, and another thing to be noted that is also properly detects if the battery is being charged or discharged, but it can’t guess if it’s plugged in or not!

http://s2.postimage.org/1GLcG9.jpg](http://www.postimage.org/image.php?v=Ts1GLcG9)

Would be grateful if someone could offer assistance in resolving this issue.

System Specs:
openSUSE 11.2 KDE4.3 x86_64 (updated)
Sony VAIO VGN-CS17G

Actually experienced this today myself.

Check to see if udevd is running, using ‘top’ in a console, or CTRL-ESC and see if it’s there.

you can restart it from a console if needed:

sudo /etc/init.d/boot.udev restart

it’ll ask for a password and then should attempt to stop then start the udev daemon.

I’ve been having issues with udevd also, so keep an eye on this daemon. I tend to kill it when I’m ‘steady-state’ and not plugging things in and whatnot, then restart udevd when I’m using flash drives and such. It seems to be a cpu hog at the moment, giving my approx 40-60% load consistently. I’m testing and looking for a solution.

Take Care,

Loni

Thanks for the fast reply.

udevd seems to be running fine, although for me the CPU usage is around 2%. There are quite a few instances of it though - around 10ish… is this normal?

Anyways, I did try the command you posted but it doesn’t change the status. Oh and for me, other devices like flash drives plug-n-play just fine.

Got any other tricks I could try?

By chance, do you have a ‘noacpi’ entry in your boot entry? If I remember correctly (don’t worry, someone will correct me if I’m wrong… trust me…), the acpi subsystem has a hand in telling udev that something has changed in the power system (and other stuff too)

apm is the older interface for power events (and other stuff again). You should have a daemon named ‘acpid’ or ‘apmd’ running to handle the power change events. Although, if you’ve got a ‘apm=off’ or ‘noacpi’ or ‘noapm’ entry in the kernel command line, then neither would even start.

hmm, Kernel Command Line… just to check it, you can

cat /proc/cmdline

which will show you what command line was handed to the kernel from grub (or lilo)

To change it, generally you need to edit /etc/sysconfig/bootloader and verify the correct entries are in place. I imagine the YaST2 BootLoader GUI is a better place to be mucking with boot parameters.

Yast -> System -> BootLoader

Be careful, and only change ONE of the entries at a time. If you change BOTH, (ie, the failsafe TOO), then you might not be able to boot back into the system to fix a mistake. These things happen to the best of us… don’t invite trouble.

Actually, you generally don’t want to play with the ‘failsafe’ entry, it’s your saving throw against those ‘omg omg omg what did I do?!?’ moments…

Loni

Yep, acpi is running by default. No acpi or apm paramaters have been specified in the cmdline.

I am having the same problem, adapter is only detected correctly at boot. Restarting X does not help.

Did anyone find a solution yet.

Could it be a bug in the KDE power management plasmoid.

Running acpi while the AC adapter is plugged from konsole returns

acpi -V
Battery 1: charging, 81%, 00:18:40 until charged
Thermal 1: ok, 71.0 degrees C
AC Adapter 1: on-line

and while it is not

 Battery 1: discharging, 82%, 01:07:47 remaining
 Thermal 1: ok, 70.0 degrees C

AC Adapter 1: off-line

Can anyone help me with this issue, since I don’t know much about the Linux/KDE power management system.

It could very well be a KDE issue! I’ll try a GNOME build and will let you know if GNOME has the same issues as well.

Here’s my acpi -V when plugged in and then unplugged.

 Battery 1: charged, 50%
 Thermal 1: ok, 49.0 degrees C

AC Adapter 1: on-line

 Battery 1: discharging, 50%, 01:06:04 remaining
 Thermal 1: ok, 48.0 degrees C

AC Adapter 1: off-line


Btw kaismh, don’t you think 71°C is a bit too hot? You might want to use a laptop cooling pad or something…

Just posting to confirm it’s an issue with KDE (or something KDE related). (When I boot from the GNOME live CD it’s able to show the AC adapter status properly.) Reporting the bug.