Debian 9: Backlight Brightness

bootbrightnessdebianmonitorssystem-installation

I've just installed a fresh new Debian 9 with LXDE into an ACER AMD Notebook and everything seems to be working fine, except for the backlight brightness. During the boot, it happens the following:

  • several messages and errors appear

    [FAILED] Failed to start Load/Save Screen Backlight Brightness of backlight:acpi_video0.
    See 'systemctl status systemd-backlight@backlight:acpi_video0.service' for details.
    Starting Load/Save Screen Backlight Brightness of backlight:radeon_bl0
    ...
    [ OK ] Started Load/Save Screen Backlight Brightness of backlight:radeon_bl0
    
  • often backlight brightness is reset to max

In order to set the backlight brightness to an acceptable level, the best solution so far seems to be opening a terminal and typing the command line below as soon as Debian initialize:

  • tee /sys/class/backlight/radeon_bl0/brightness <<< 15

 

Questions

  1. How to avoid the backlight brightness being reset to max during the boot?
  2. How to set shortcuts to the backlight brightness (ex: [Fn] + ←/→)?

 


Debug

root@debian:~# dmesg | grep -i "error\|firmware\|backlight"
[    1.049855] pci 0000:01:00.0: [Firmware Bug]: disabling VPD access (can't determine size of non-standard VPD format)
[    7.729996] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[   12.960474] radeon 0000:00:01.0: firmware: direct-loading firmware radeon/PALM_pfp.bin
[   13.017938] radeon 0000:00:01.0: firmware: direct-loading firmware radeon/PALM_me.bin
[   13.043827] radeon 0000:00:01.0: firmware: direct-loading firmware radeon/SUMO_rlc.bin
[   13.161157] radeon 0000:00:01.0: firmware: direct-loading firmware radeon/SUMO_uvd.bin
[   13.897112] [drm] radeon atom DIG backlight initialized

 

root@debian:~# systemctl status systemd-backlight@backlight:acpi_video0.service
● systemd-backlight@backlight:acpi_video0.service - Load/Save Screen Backlight Brightness of backlight:acpi_video0
   Loaded: loaded (/lib/systemd/system/systemd-backlight@.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2018-06-16 06:37:19 -03; 29min ago
     Docs: man:systemd-backlight@.service(8)
  Process: 411 ExecStart=/lib/systemd/systemd-backlight load backlight:acpi_video0 (code=exited, status=1/FAILURE)
 Main PID: 411 (code=exited, status=1/FAILURE)

Jun 16 06:37:19 debian systemd[1]: Starting Load/Save Screen Backlight Brightness of backlight:acpi_video0...
Jun 16 06:37:19 debian systemd[1]: systemd-backlight@backlight:acpi_video0.service: Main process exited, code=exited, status=1/FAILURE
Jun 16 06:37:19 debian systemd[1]: Failed to start Load/Save Screen Backlight Brightness of backlight:acpi_video0.
Jun 16 06:37:19 debian systemd[1]: systemd-backlight@backlight:acpi_video0.service: Unit entered failed state.
Jun 16 06:37:19 debian systemd[1]: systemd-backlight@backlight:acpi_video0.service: Failed with result 'exit-code'.

Hardware Specifications
Notebook Aspire E1-421-0622 | product details

  • AMD 2 Core™ Processor E1-1200 (1.4 GHz) 1MB Cache 64-bit Processing
  • AMD Radeon HD 7310 Graphics Controller
  • 2Gb DDR3 SDRAM Memory
  • 256MB shared video memory

 

Debian Strech
debian-9.4.0-amd64-netinst.iso

  • Small CDs
  • AMD64 processor architecture
  • Non-free package firmware-amd-graphics installed
    radeon kernel modesetting for R600 or later requires firmware-amd-graphics
  • Software selection
    (  ) Debian desktop environment
    (  ) … GNOME
    (  ) … Xfce
    (  ) … KDE
    (  ) … Cinnamon
    (  ) … MATE
    (X) … LXDE
    (  ) web server
    (X) print server
    (  ) SSH server
    (X) standard system utilities

Best Answer

Your system seems to have two interfaces for backlight control: backlight:acpi_video0 and backlight:radeon_bl0. And apparently the ACPI interface does not work, and/or causes problems when used together with the Radeon-specific interface.

Since the Radeon-specific interface seems to work fine, I'd try telling systemd to stop using the ACPI backlight interface first:

systemctl mask systemd-backlight@backlight:acpi_video0.service

If necessary, this can be undone with:

systemctl unmask systemd-backlight@backlight:acpi_video0.service

If this does not help, further investigation is needed.

With journalctl -xb you should be able to see a quite verbose version of messages for the current boot only. By default, persistent storage of systemd journal is not enabled in Debian 9, but it's quite easy to enable: just run mkdir /var/log/journal as root. Then, starting from next boot, the journal will be stored persistently and you will be able to e.g. view the log of the previous boot from startup to shutdown with journalctl -xb -1. The oldest logs will eventually be automatically purged, controlled by journald's configurable criteria for available disk space.

Related Question