Sony E series brightness control not working in 12.10
I have a Sony E series laptop (64 bit) where keys Fn+F5 and Fn+F6 should control the screen brightness. On my machine these keys do control the brightness "slider", but they do not control the actual screen brightness. I am running Ubuntu 12.10. These keys did work to control screen brightness when running Ubuntu 12.04 LTS, but I updated to 12.10 to get EFI boot working correctly.
To date I have tried various kernel bootup options to get the keys working, but none have proved effective. I have tried;
acpi_backlight=video
acpi_backlight=vendor
acpi_osi=Linux
acpi_osi=Linux acpi_backlight=vendor
I had an earlier Sony laptop and to get the brightness controls working on that I had to use a custom gsd_backlight_helper module in gnome-settings-daemon. I've tried that fix for my new Sony, but that also fails to get the brightness controls working.
I'm sure it must be possible to fix this issue, but I'm not sure how to proceed. Can anyone help with this?
Re: Sony E series brightness control not working in 12.10
Hello and welcome to the forums.
Can you post back the results of the following commands (to identify your backlight interfaces):
Code:
for i in /sys/class/backlight/*; do echo $i; cat $i/brightness; cat $i/max_brightness; done
Can you also run in a terminal window:
...press the brightness up and brightness down buttons and post back the codes that are returned.
Maybe we can create some acpi scripts to control the brightness for you.
Re: Sony E series brightness control not working in 12.10
Hi Toz.
Thanks for getting back to me so quickly.
I have run the commands you asked and got the following results;
for i in /sys/class/backlight/*; do echo $i; cat $i/brightness; cat $i/max_brightness; done
/sys/class/backlight/acpi_video0
0
100
acpi_listen
Pressing brightness up gives;
video LCD 00000086 00000000
video PEGP 00000081 00000000
video PEGP 00000081 00000000
Pressing brightness down gives;
video LCD 00000087 00000000
video PEGP 00000081 00000000
video PEGP 00000081 00000000
Please let me know if you need me to run any more commands and thanks again for your assistance with this.
Dave.
Re: Sony E series brightness control not working in 12.10
Ok, lets make the following changes and see what happens.
Create the following files with the following content (you will need root privileges to do this, so for each file, run "gksu gedit <file>" where <file> is: )
/etc/acpi/events/sony-brightness-up
Code:
event=video LCD 00000086 00000000
action=/etc/acpi/brightup.sh
/etc/acpi/events/sony-brightness-down
Code:
event=video LCD 00000087 00000000
action=/etc/acpi/brightdown.sh
/etc/acpi/brightdown.sh
Code:
#!/bin/bash
curr=`cat /sys/class/backlight/acpi_video0/actual_brightness`
if [ $curr -gt 7 ]; then
curr=$((curr-8));
echo $curr > /sys/class/backlight/acpi_video0/brightness;
fi
/etc/acpi/brightup.sh
Code:
#!/bin/bash
curr=`cat /sys/class/backlight/acpi_video0/actual_brightness`
if [ $curr -lt 93 ]; then
curr=$((curr+8));
echo $curr > /sys/class/backlight/acpi_video0/brightness;
fi
Then, make all 4 of those scripts executable by running the following commands:
Code:
sudo chmod +x /etc/acpi/events/sony-brightness-up
sudo chmod +x /etc/acpi/events/sony-brightness-down
sudo chmod +x /etc/acpi/brightdown.sh
sudo chmod +x /etc/acpi/brightup.sh
And finally, restart acpid:
Code:
sudo service acpid restart
Check if the function keys work now.
Re: Sony E series brightness control not working in 12.10
Hi Toz.
Thanks for your help with this.
I have created and double checked the scripts you specified above (and rechecked that they are executable), but unfortunately they do not allow me to change the screen brightness. The brightness "slider" (top right of the screen) changes when I press the function keys, but the actual screen brightness still does not change. I have even tried rebooting the machine.
Have you any other suggestions that might help? I really appreciate your time with this.
Regards, Dave.
Re: Sony E series brightness control not working in 12.10
Do these commands change the brightness?
Code:
echo 100 | sudo tee /sys/class/backlight/acpi_video0/brightness
echo 50 | sudo tee /sys/class/backlight/acpi_video0/brightness
echo 0 | sudo tee /sys/class/backlight/acpi_video0/brightness
If not, can you post back:
Re: Sony E series brightness control not working in 12.10
Hi Toz.
The three commands you asked me to run did not alter the screen brightness.
I have run cat /proc/cmdline and the output is;
BOOT_IMAGE=/boot/vmlinuz-3.5.0-19-generic.efi.signed root=UUID=0f0e5ff5-ec6b-4fdf-89da-2852db86b2cb ro quiet splash vt.handoff=7
Regards, Dave.
Re: Sony E series brightness control not working in 12.10
Can you add acpi_backlight=vendor to the kernel command line, then re-run these commands again and post back the results:
Code:
for i in /sys/class/backlight/*; do echo $i; cat $i/brightness; cat $i/max_brightness; done
Re: Sony E series brightness control not working in 12.10
Okay. I've added the kernel command line option acpi_backlight=vendor and run;
cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-3.5.0-19-generic.efi.signed root=UUID=0f0e5ff5-ec6b-4fdf-89da-2852db86b2cb ro acpi_backlight=vendor quiet splash
The I ran;
for i in /sys/class/backlight/*; do echo $i; cat $i/brightness; cat $i/max_brightness; done
/sys/class/backlight/sony
63
7
I hope this helps.
Regards, Dave.
Re: Sony E series brightness control not working in 12.10
Okay then, do the following commands adjust brightness?
Code:
echo 0 | sudo tee /sys/class/backlight/sony/brightness
echo 4 | sudo tee /sys/class/backlight/sony/brightness
echo 7 | sudo tee /sys/class/backlight/sony/brightness
EDIT: What video card do you have?
Code:
sudo lspci -vnn | grep -A12 VGA