How to Fix Backlit Keyboard on Sony Laptops in Linux

So i got a Sony Vaio Flip 14 that came with Windows 10 I took Windows 10 off this laptop and found that the backlit keyboard does not work at all, after booting into Linux it turns off well there is fix and this problem is very common. Sony decided to use Software instead of Hardware to control the back-lights on the keyboard when this laptop came with Windows 8 or newer the utility that’s required is called VAIO Control Center and without it the keyboard will only work when a key is pressed and it times out this also happens in Ubuntu 16.04 but kdb_backlight is missing and i can’t figure out why. Ubuntu 17.04 and 18.04 works so does Linux Mate.

So to fix this problem you need to do the following, edit the grub and add acpi_osi=linux sony_acpi,

sudo nano /etc/default/grub and add acpi_osi=linux sony_acpi to GRUB_CMDLINE_LINUX=””

should look something like this

once adding acpi_osi=linux sony_acpi to GRUB_CMDLINE_LINUX=” you need to save using Ctrl o and Ctrl x to exit. Before rebooting we now need to update the grub by sudo update-grub,

Now Reboot.

After rebooting we now need to make sure that sony_laptop Kernel Module is loaded, this is loaded without editing the grub. But there are reasons as to why we added acpi_osi=linux sony_acpi to the Grub but i will not get into it as you need to understand ACPI. (Advanced Configuration and Power Interface).

So now open up Terminal Ctrl Alt T, Now type in lsmod, lsmod will show us all the Kernel Modules that is loaded. In Terminal you need to look for sony_laptop without this the fix will not work,

If you see sony_laptop it should look something like this. sony_laptop 61440 0

Now we know that the Kernel Module is loaded which is sweet.

Next we need to go to /sys/devices/platform/sony-laptop and in here we should have something called kbd_backlight, Note that kbd_backlight is missing in Ubuntu 16.04 so not found any solution but for 17.04, 18.04 Ubuntu this is present also tested in Linux Mate.

by typing in terminal.

cd /sys/devices/platform/sony-laptop

So now we need to edit kbd_backlight by typing sudo nano kbd_backlight you will notice that the default value is -1 which means always off. You can do this on the fly edit the file with any of the value if you decide to use battery you can change value from 2 always on to 1 times out after so long.

The Values are,

-1 always off (this is why the lights go out on the keyboard at boot).

1 time out after so long comes back on when any of the keys are pressed.

2 always on.

after editing you will notice the back lights will come on after pressing Ctrl o.

Note you will notice that it will moan about the permissions but you can change them on the fly it will not save them after rebooting tho.

So now after you’ve got the backlit keyboard working you have a choice. Enable and disable it on the fly or permanently set the value to 1 or 2 now this is easy enough.

Open Terminal and type,

This command will enable the backlight on every boot but will have time out after so long,

sudo modprobe -v sony-laptop

sudo modprobe -v sony-laptop kbd_backlight=1

echo “options sony-laptop kbd_backlight=1” | sudo tee /etc/modprobe.d/sony-laptop.conf

This Command will enable the backlight on everything boot and will stay on even on battery.

sudo modprobe -v sony-laptop

sudo modprobe -v sony-laptop kbd_backlight=2

echo “options sony-laptop kbd_backlight=2” | sudo tee /etc/modprobe.d/sony-laptop.conf

Now i choose to set the backlight value to 2.

Reboot and now you should have a working Backlit Keyboard on you’re Sony Vaio Laptop 😀 Enjoy

Author:

4 thoughts on “How to Fix Backlit Keyboard on Sony Laptops in Linux”

  • Finally a fix for this, sorted mine on my sony vpcf23n1e under ubuntu 18.04

    simple guide to follow unless you mess thing up like i did (rushing mainly)

    many thanks from a new linux user

  • Bei mir lädt er zwar das Kernel Modul, aber in der cd /sys/devices/platform/sony-laptop
    stehen aber trotzdem kein Eintrag kbd_backlight .

    Kbuntu: 20.04 Sony Vaio

    • Hi,

      Thanks for your reply. I have not tested in Kubuntu, I will have to look into this I have only tested with Ubuntu and Mate. Could you take a look in /sys/class/backlight.

      cd /sys/class/backlight

      ls

      Post what you have in there.

Leave a Reply to Rich Fearn Cancel reply

Your email address will not be published. Required fields are marked *