Laptop Panel backlight stays on after lid close + fix

Bug #14732 reported by Jools Wills
4
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/acpi-support/power-funcs file.
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

Revision history for this message
Matthew Garrett (mjg59) wrote :

I'll be making a new acpi-support upload next week which should fix this

Revision history for this message
Matthew Garrett (mjg59) wrote :

In the archive now.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.