Laptop Panel backlight stays on after lid close + fix
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
acpi-support (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I am using kubuntu preview on a Dell Inspiron 8000.
After closing the lid, the backlight goes out only to then switch back on again.
After examining the scripts I found the problem.
First problem is in /etc/acpi/lid.sh when closing the lid, the script turns off the backlight with "xset dpms force off",
but then does a chvt 12. On my laptop switching to another vt will turn the light back on.
The fix is to comment out both chvt lines in the lid.sh file.
In addition to this some changes had to be made to the /usr/share/
In the function getXuser the line
user=`who| grep " :0" | awk '{print $1}'`
returns my username twice. This may be due to my login manager (kdm) as doing a who returns
jools tty1 Mar 30 18:25
jools :0 Mar 30 18:25
jools :0 Mar 30 18:25
and shows 2 sessions. Meaning the line above will return "jools jools" and so the XAUTHORITY variable will be set
incorrectly and so root will not have permission to do the xset.
To fix this I changed the line to
user=`who| grep -m 1 " :0" | awk '{print $1}'
so grep returns only the first match.
Best Regards
Jools
I'll be making a new acpi-support upload next week which should fix this