Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#20279 - [hal] does not update the AC adapter presence status when plugged or unplugged

Attached to Project: Arch Linux
Opened by Eric Donkersloot (lordchaos) - Sunday, 25 July 2010, 20:11 GMT
Last edited by Ionut Biru (wonder) - Wednesday, 01 June 2011, 06:49 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture i686
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

When I plug in/unplug the ac adapter of my laptop (Sony VGN-BZ12XN), HAL does not update its presence status resulting in incorrect behaviour by powerdevil (KDE power management). When the AC adapter is unplugged, the system system stays in "performance mode" and does not automatically switch to "powersave mode", draining the battety too quickly. When this is manually corrected and the AC adapter is plugged in again, the system does not automatically switch to "performance mode", but stays in "powersave mode".

Additional info:
* package version(s)

Sony Vaio VGN-BZ12XN running Arch i686
hal 0.5.14-4
hal-info 0.20091130-1

* config and/or log files etc.

Pm-tools installed, acpid & laptop-mode both installed and running on boot.

Steps to reproduce:

Boot Arch linux with KDE 4.4.5 with the AC adapter plugged in. Run the following command in a shell:

lshal |grep -i "ac_adapter.present"

The result should be:

ac_adapter.present = true (bool)

Unplug the adapter, run the command again. Again, the result is:

ac_adapter.present = true (bool)

While it shoud display:

ac_adapter.present = false (bool)
This task depends upon

Closed by  Ionut Biru (wonder)
Wednesday, 01 June 2011, 06:49 GMT
Reason for closing:  Won't fix
Additional comments about closing:  Nothing to do. Open a new bug report if applicable for upower.
Comment by Eric Donkersloot (lordchaos) - Sunday, 25 July 2010, 20:20 GMT
When I unplug the adapter and run the following command in a shell:

hal-set-property --udi '/org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_AC' --key ac_adapter.present --bool false

KDE correctly reports the AC adpater was unplugged and changes to "powersave mode".

When I plug in the adapter again, I have to run the command manually again:

hal-set-property --udi '/org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_AC' --key ac_adapter.present --bool true
Comment by Jan de Groot (JGC) - Wednesday, 22 December 2010, 15:41 GMT
Is this still an issue? And if so, can you check in the usual /proc/acpi/* if the kernel actually reports the correct thing? Either hal is missing events from the kernel, or the kernel doesn't inform hal about changes.
Comment by Eric Donkersloot (lordchaos) - Saturday, 25 December 2010, 21:42 GMT
Hi,

Yes, this is still an issue:

[ericd@vaiopro64 ~]$ cat /proc/acpi/ac_adapter/AC/state
state: on-line

[ericd@vaiopro64 ~]$ lshal |grep -i "ac_adapter.present"
ac_adapter.present = false (bool)

[ericd@vaiopro64 ~]$ uname -a
Linux vaiopro64 2.6.36-ARCH #1 SMP PREEMPT Fri Dec 10 20:32:37 CET 2010 x86_64 Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz GenuineIntel GNU/Linux

[ericd@vaiopro64 ~]$ lshal -V
lshal version 0.5.14


Comment by Jan de Groot (JGC) - Wednesday, 29 December 2010, 13:02 GMT
Does hal read ACPI things directly, or does hal use acpid on your system?
Comment by Eric Donkersloot (lordchaos) - Wednesday, 29 December 2010, 13:12 GMT
Not sure, don't think I use acpid (not behind this particular system right now).
Comment by Eric Donkersloot (lordchaos) - Thursday, 30 December 2010, 19:46 GMT
acpid is not installed on this system.
Comment by Leonid Isaev (lisaev) - Sunday, 02 January 2011, 02:43 GMT
Is it even possible to couple HAL to ACPId? I think HAL reads ACPi data from /proc. Eric, your problem seems to be a kernel one... does this (https://bugs.launchpad.net/ubuntu/+source/hal/+bug/213128) sound familiar?

Happy New Year...
Comment by Eric Donkersloot (lordchaos) - Sunday, 02 January 2011, 20:51 GMT
Strangely, hal is detecting battery changes correctly:

[ericd@vaiopro64 policy]$ lshal -m

Start monitoring devicelist:
-------------------------------------------------
21:45:51.678: computer_power_supply_battery_BAT1 property battery.remaining_time = 29429 (0x72f5)
21:45:51.680: computer_power_supply_battery_BAT1 property battery.charge_level.percentage = 74 (0x4a)
21:45:51.682: computer_power_supply_battery_BAT1 property battery.charge_level.current = 34620 (0x873c)
21:45:51.687: computer_power_supply_battery_BAT1 property battery.reporting.current = 34620 (0x873c)
21:45:51.689: computer_power_supply_battery_BAT1 property battery.rechargeable.is_discharging = true
21:45:51.691: computer_power_supply_battery_BAT1 property battery.rechargeable.is_charging = false
21:45:51.692: computer_power_supply_battery_BAT1 property battery.voltage.current = 3823 (0xeef)
21:45:58.258: computer_power_supply_battery_BAT1 property battery.remaining_time removed
21:45:58.258: computer_power_supply_battery_BAT1 property battery.charge_level.current = 34630 (0x8746)
21:45:58.261: computer_power_supply_battery_BAT1 property battery.reporting.current = 34630 (0x8746)
21:45:58.263: computer_power_supply_battery_BAT1 property battery.rechargeable.is_discharging = false
21:45:58.264: computer_power_supply_battery_BAT1 property battery.voltage.current = 3713 (0xe81)
Comment by Eric Donkersloot (lordchaos) - Friday, 28 January 2011, 22:10 GMT
Okay, I upgraded to KDE SC 4.6 and removed HAL from the equation. Problem still persists !?
Actually, this is not entirely true; when I remove or plug in the AC adapter the brightness changes but strangely enough KDE power management is still reporting the AC adapter is not plugged in although it is.

Loading...