Archivi tag: backlight

Keyboard backlight on VPCS11E7E with Ubuntu 12.04

Italiano | English

Good news here too. Since some Linux kernel version, the sony_laptop module has been able to manage natively Vaio’s keyboard backlight, turning it on/off and setting its timeout delay. This is achieved using two controls in

cd /sys/devices/platform/sony-laptop/

kbd_backlight

Turns on/off the keyboard backlight. Usage:

  1. Off
  2. On

kbd_backlight_timeout

Sets the timeout delay of the keyboard backlight. Usage:

  1. 10 seconds
  2. 30 seconds
  3. 60 seconds
  4. Always on

For example lighting up the keyboard can be done with

echo 1 | sudo tee /sys/devices/platform/sony-laptop/kbd_backlight

Screen backlight on Sony Vaio VPCS11E7E with Ubuntu 12.04

Italiano | English

Good news and bad news. The good one is that you no longer need to install an external driver, the bad one is that this way you can only manage your backlight using X.

You can still prefer the old method, but keep in mind that hey conflict with themselves.

Nvidia

Install the proprietary driver, then open /etc/X11/xorg.conf and add the line 4, as in the example:

Section "Device"
Identifier "Default Device"
Option "NoLogo" "True"
Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection

Now log out and log back in. That’s all.

Nouveau

I didn’t test this on an actual installation, but it is reported to work, so give it a shot. At startup, on GRUB, select the Ubuntu line (usually the first one) and press the “e” key. Add acpi_backlight=vendor to your kernel line. Here is an example image:

Press CTRL+X or F10 to boot, log in and test if backlight can be set. If this works, open /etc/default/grub and add this option to the boot parameters:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

Then

sudo update-grub

to default it.

Hope this works.

Source for Nvidia: http://code.google.com/p/vaio-f11-linux/wiki/NVIDIASetup

Source for Nouveau: http://code.google.com/p/vaio-f11-linux/issues/detail?id=51

Keyboard backlight on VPCS11E7E with Ubuntu 10.10

Italiano | English

Useful especially to save your battery. First off download this program:

http://code.google.com/p/vaio-f11-linux/issues/detail?id=6#c10

extract and compile it

make && sudo make install

This will install kbd_lit in /usr/local/sbin, which has two options:

  • -d Disable backlight
  • -e Enable backlight

this command must be run with root privileges (sudo).

Since it’s inconvenient to open a terminal every time, I associated this program to the magnify function keys (F9 and F10), which on my laptop look like this:

if you want this shortcut too, paste this into a terminal:

sudo -s
cd /etc/acpi
wget -c http://dl.dropbox.com/u/737114/vpcs11e7e/keyboard-backlight.tar.gz
tar -xzvf keyboard-backlight.tar.gz
rm keyboard-backlight.tar.gz
service acpid restart

This way Fn+F9 will shut the light off and Fn+F10 will turn it on again.

Source: http://code.google.com/p/vaio-f11-linux/issues/detail?id=6

Screen backlight on Sony Vaio VPCS11E7E with Ubuntu 10.04

Italiano | English

WARNING: This howto is meant for Sony Vaio VPCS11E7E only! If you have another model, read this post thru (Notes most of all), but don’t touch anything unless you’re well aware of what you’re doing.

I’m very sorry it took me so long to translate this, my apologies.

First off

sudo -s

we have a bunch of things to do as root.

We’re going to use the nvidia_bl module in order to set our backlight. Add the repo and install it:

add-apt-repository ppa:mactel-support/ppa
apt-get update
apt-get install nvidia-bl-dkms

very well, let’s start the game

We’re adding the module to the default modules list and we’re configuring it:

echo options nvidia_bl max_level=131072 >> /etc/modprobe.d/nvidia-bl-dkms.conf
echo nvidia_bl >> /etc/modules

Now we’re setting the default value. Type

nano /etc/rc.local

and above exit 0 paste

echo -n 32768 > /sys/class/backlight/nvidia_backlight/brightness

so it will look like this

Any problem so far? I hope not. We’ve just configured nvidia_bl, so our backlight could already be handled. But is more handy doing it with fn keys. Ok, I feel stupid to just have pointed this out.

We’re going to use a couple of script I made (= copy-pasted) for this PC.

cd /etc/acpi
wget -c http://dl.dropbox.com/u/737114/vpcs11e7e/vpcs11e7e-backlight.tar.gz
tar -xzvf vpcs11e7e-backlight.tar.gz
rm vpcs11e7e-backlight.tar.gz

This way fn keys are handled correctly by acpi. Reboot your PC or

modprobe nvidia_bl
service acpid restart

End 😛

Cons:

  • default backlight is constant (read notes);
  • Ubuntu notify-osd is “loose”, but nobody cares.

Notes

I’d rather not say this is something technical, it’s just a bit more complicated than the rest of the howto. And is almost unnecessary if you have a VPCS11E7E.

How does nvidia_bl handle backlight? With

/sys/class/backlight/nvidia_backlight/brightness

which, due to this configuration

echo options nvidia_bl max_level=131072 >> /etc/modprobe.d/nvidia-bl-dkms.conf

can have values between 0 and 131072 (2^17). The scripts you downloaded are set to use 10 values starting by 4096 (in my opinion the minimum acceptable) and 131072 (which could blind someone). The default value is in /etc/rc.local (32768) and can be replaced with one of the other value in the scripts.

So what’s the problem using this with another PC?

Ok, summarizing:

  • nvidia_bl is loaded with a max value which could be card dependent; this means it could not accept 131072 or turn your backlight completely off (my case, I had to use my cellphone flashlight to read what was on screen. No kidding.);
  • fn keys aren’t mapped correctly; this is most certain. I used acpi_listen to map them right;
  • nvidia_bl could screw your dog; no flashlight will help you with this.

Source nvidia_bl: the hell, it’s been months!

Source fn keys: http://code.google.com/p/vaio-f11-linux/wiki/DisplayBacklight