Bugzilla – Attachment 421061 Details for
Bug 682173
HAL does not update the AC adapter state
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
A workaround of the bug
reset_power_data (text/plain), 894 bytes, created by
Michael Lashkevich
on 2011-03-24 06:29:12 UTC
(
hide
)
Description:
A workaround of the bug
Filename:
MIME Type:
Creator:
Michael Lashkevich
Created:
2011-03-24 06:29:12 UTC
Size:
894 bytes
patch
obsolete
>#!/bin/sh > >while : ; do > ># get the AC connector state from /proc filesystem. >STATE=`sed -n 's/^.*\(off\|on\)-line.*/\1/p' /proc/acpi/ac_adapter/ADP0/state` >OLD_STATE=`hal-get-property --udi /org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_ADP0 --key ac_adapter.present` >case "$STATE" in > on) > # AC connector plugged in > [ "$OLD_STATE" != "true" ] && hal-set-property --udi /org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_ADP0 --key ac_adapter.present --bool true ># echo $BACKLIGHTMAX > "$BACKLIGHTPATH/brightness" > ;; > off) > # AC connector unplugged > [ "$OLD_STATE" != "false" ] && hal-set-property --udi /org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_ADP0 --key ac_adapter.present --bool false ># echo $BACKLIGHTHALF > "$BACKLIGHTPATH/brightness" > ;; > *) > # AC connector in undetermined state > exit 1 >esac > >sleep 3 > >done
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 682173
: 421061 |
426235
|
426236
|
435204