How I fixed my old Sony Laptop backlight under Ubuntu 22.04

Until recently, my old Sony laptop was running Ubuntu 20.04 with the nvidia-340 proprietary graphics drivers. After upgrading to Ubuntu 22.04, the nvidia proprietary graphics driver didn’t work, so I uninstalled it – the noveau graphics driver worked fine, except that the backlight buttons didn’t work (the corresponding popup was shown but the backlight was stuck at full brightness).

In /sys/class/backlight there were both the nv_backlight and the sony directory. Writing to nv_backlight using

sudo echo 20 > /sys/class/backlight/nv_backlight/brightness

worked perfectly.

In order to permanently fix the issue and make the backlight buttons work again, I had to modify the kernel command line used at boot. By adding acpi_backlight=video in /etc/default/grub by appending it to the GRUB_CMDLINE_LINUX_DEFAULT= line.

Now said line looks like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_sleep=nonvs acpi_backlight=video"

After that, I ran sudo update-grub and rebooted the computer. After the reboot, the backlight worked fine.