This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Thinkpad Edge OpenSuse 11.3 (64) - AC Adapater Recognition

Tags: None
(comma "," separated)
ahaertig
Registered Member
Posts
3
Karma
0
OS
My system: Thinkpad Edge 13", Intel Version, OpenSuse 11.3 (64bit), KDE 4.5.3

Hello
when I start up my Thinkpad without having the AC adapter plugged in, Powerdevil Plasmoid and sysinfo:/ deliver the following information:
Battery is recognised correctly including charge level, battery time remaining and battery is discharged. But the AC adapter is recognised as plugged in.
Terminal output as follows:
Code: Select all
cat /proc/acpi/ac_adapter/ACAD/state
state:                   off-line

According to this, the ACPI interface recognises the AC adapater state correctly.
Once I plug in and pull out the adapter, Powerdevil shows the correct information; including AC adapter is not plugged in.

What can I do to have Powerdevil show the correct information since start up without pulling in and out the AC adapater?

Thanks for your support!
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Please do the following:

Code: Select all
lshal -s | grep power


Take the text of the AC adapter item listed there, and run the following:

Code: Select all
lshal -u <ac adapter name>


Then post the output of both the commands here.

Example:
Code: Select all
ben@bianca:~> lshal -s | grep power
computer_power_supply_battery_BAT0
computer_power_supply_ac_adapter_AC0
ben@bianca:~> lshal -u computer_power_supply_ac_adapter_AC0
udi = '/org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_AC0'
  ac_adapter.present = false  (bool)
  info.capabilities = {'ac_adapter'} (string list)
  info.category = 'ac_adapter'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.product = 'Generic AC Adapter Device'  (string)
  info.subsystem = 'power_supply'  (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_AC0'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'power_supply'  (string)
  linux.sysfs_path = '/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/ACPI0003:00/power_supply/AC0'  (string)


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
ahaertig
Registered Member
Posts
3
Karma
0
OS
Thanks for your reply!

I started the system without Ac Adapter plugged in; output is as follows:

Code: Select all
~> lshal -s | grep power
computer_power_supply_battery_BAT1
computer_power_supply_ac_adapter_ACAD

~> lshal -u computer_power_supply_ac_adapter_ACAD
udi = '/org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_ACAD'
  ac_adapter.present = true  (bool)
  info.capabilities = {'ac_adapter'} (string list)
  info.category = 'ac_adapter'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.product = 'Generic AC Adapter Device'  (string)
  info.subsystem = 'power_supply'  (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_ACAD'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'power_supply'  (string)
  linux.sysfs_path = '/sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/ACAD'  (string)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
There is the problem... HAL believes the adapter is connected, hence KDE does also. I suggest you contact your distribution for assistance, looks like a bug in HAL.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
ahaertig
Registered Member
Posts
3
Karma
0
OS
Thanks for your reply. I will inform the openSuse guys.

I did a little research on hal and found a workaround. Calling the following command at startup fixes my problem:
Code: Select all
hal-set-property --udi '/org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_ACAD' --key ac_adapter.present --bool false

I put it in a script that utilizes /proc/acpi/ac_adapter/ACAD/state and it should be fine.

Tanks for your help!


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar