Systemd backlight service failed

[ricklinux@eos-kde ~]$ cat /etc/default/grub
# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="EndeavourOS"
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_backlight=video loglevel=3 resume=118ec965-7e0d-4a7f-9aad-fea412e63953 nowatchdog"
GRUB_CMDLINE_LINUX=""

Sorry to necrobump, but I’ve noticed the amdgpu service doesn’t actually persist through rebooting, and attemping to enable the service results in

[morten@endeavour ~]$ sudo systemctl enable systemd-backlight@backlight:amdgpu_bl0.service
The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled using systemctl.
 
Possible reasons for having this kind of units are:
• A unit may be statically enabled by being symlinked from another unit's
  .wants/ or .requires/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.

where both of which are still failing

[morten@endeavour ~]$ systemctl --failed
  UNIT                                            LOAD   ACTIVE SUB    DESCRIPT>
● systemd-backlight@backlight:acpi_video0.service loaded failed failed Load/Sav>
● systemd-backlight@backlight:amdgpu_bl0.service  loaded failed failed Load/Sav>

any changes suggested to the acpi_backlight setting just results in brightness 100% and my losing control of the brightness

It works for me if you add acpi_backlight=video in the default grub command line. Then run sudo grub-mkconfig -o /boot/grub/grub.cfg.

For me this disables backlight control and sets the brightness to 100%, can you think of any potential differences in our systems that could cause this? Perhaps the same thing failing in calling the amdgpu service?

I have an HP with AMD Ryzen 4700U. Did you look at dmesg?

sudo dmesg

Also have you tried some other parameters?

Examples:

acpi_backlight=video acpi_backlight=vendor acpi_backlight=native

I see you tried enabling those two services

my dmesg is quite long, is there anything in particular i should be looking for?

I just tried the native parameter as well, it doesn’t block my brightness control like the other two but the amdgpu service still shows up as failing.

I was just wanting you to see if it shows anything related to the backlight message. what is your hardware again. Is it a lenovo? On lenovo sometimes acpi_backlight=vendor also worked.

Do you have anything showing in systemctl --failed

Edit: Show these.

systemctl status systemd-backlight@backlight:acpi_video0.service
systemctl status systemd-backlight@backlight:radeon_bl0.service

Try acpi_backlight=vendor in the grub command line and run sudo grub-mkconfig -o /boot/grub/grub.cfg

Edit: Don’t forget to reboot after.

@morten_nissov
This is the service that i have enabled and i use acpi_backlight=video in the default grub command line.

[ricklinux@eos-plasma ~]$ 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 (/usr/lib/systemd/system/systemd-backlight@.service; static)
     Active: active (exited) since Thu 2021-02-18 09:51:40 EST; 52min ago
       Docs: man:systemd-backlight@.service(8)
   Main PID: 306 (code=exited, status=0/SUCCESS)
      Tasks: 0 (limit: 8756)
     Memory: 0B
     CGroup: /system.slice/system-systemd\x2dbacklight.slice/systemd-backlight@backlight:acpi_video0.service

Feb 18 09:51:40 eos-plasma systemd[1]: Starting Load/Save Screen Backlight Brightness of backlight:acpi_video0…
Feb 18 09:51:40 eos-plasma systemd[1]: Finished Load/Save Screen Backlight Brightness of backlight:acpi_video0.
[ricklinux@eos-plasma ~]$

I’m using a lenovo E495. I have tried video, vendor, and native, these do not work.

Without any of them i get

[morten@endeavour ~]$ systemctl --failed
  UNIT                                            LOAD   ACTIVE SUB    DESCRIPT>
● systemd-backlight@backlight:acpi_video0.service loaded failed failed Load/Sav>

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
1 loaded units listed.

In response to the status messages

[morten@endeavour ~]$ 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 (/usr/lib/systemd/system/systemd-backlight@.service; static)
     Active: failed (Result: exit-code) since Thu 2021-02-18 10:05:14 CET; 12h ago
       Docs: man:systemd-backlight@.service(8)
    Process: 821 ExecStart=/usr/lib/systemd/systemd-backlight load backlight:acpi_video0 (code=exited, status=1/FAILURE)
   Main PID: 821 (code=exited, status=1/FAILURE)

Feb 18 10:05:14 endeavour systemd[1]: Starting Load/Save Screen Backlight Brightness of backlight:acpi_video0...
Feb 18 10:05:14 endeavour systemd-backlight[821]: Failed to get backlight or LED device 'backlight:acpi_video0': No such device
Feb 18 10:05:14 endeavour systemd[1]: systemd-backlight@backlight:acpi_video0.service: Main process exited, code=exited, status=1/FAILURE
Feb 18 10:05:14 endeavour systemd[1]: systemd-backlight@backlight:acpi_video0.service: Failed with result 'exit-code'.
Feb 18 10:05:14 endeavour systemd[1]: Failed to start Load/Save Screen Backlight Brightness of backlight:acpi_video0.
[morten@endeavour ~]$ systemctl status systemd-backlight@backlight:radeon_bl0.service
● systemd-backlight@backlight:radeon_bl0.service - Load/Save Screen Backlight Brightness of backlight:radeon_bl0
     Loaded: loaded (/usr/lib/systemd/system/systemd-backlight@.service; static)
     Active: inactive (dead)
       Docs: man:systemd-backlight@.service(8)

For the record I have never seen anything with radeon_bl0

[morten@endeavour ~]$ systemctl status systemd-backlight@backlight:radeon_bl0.service
● systemd-backlight@backlight:radeon_bl0.service - Load/Save Screen Backlight Brightness of backlight:radeon_bl0
     Loaded: loaded (/usr/lib/systemd/system/systemd-backlight@.service; static)
     Active: inactive (dead)
       Docs: man:systemd-backlight@.service(8)
[morten@endeavour ~]$ systemctl status systemd-backlight@backlight:amdgpu_bl0.service
● systemd-backlight@backlight:amdgpu_bl0.service - Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0
     Loaded: loaded (/usr/lib/systemd/system/systemd-backlight@.service; static)
     Active: active (exited) since Thu 2021-02-18 10:05:14 CET; 12h ago
       Docs: man:systemd-backlight@.service(8)
    Process: 822 ExecStart=/usr/lib/systemd/systemd-backlight load backlight:amdgpu_bl0 (code=exited, status=0/SUCCESS)
   Main PID: 822 (code=exited, status=0/SUCCESS)

Feb 18 10:05:14 endeavour systemd[1]: Starting Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0...
Feb 18 10:05:14 endeavour systemd[1]: Finished Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0.

trying to enable this service

[morten@endeavour ~]$ systemctl enable systemd-backlight@backlight:acpi_video0.service
The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled using systemctl.
 
Possible reasons for having this kind of units are:
• A unit may be statically enabled by being symlinked from another unit's
  .wants/ or .requires/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.

Edit:

The only one that is active on mine is

systemctl status systemd-backlight@backlight:acpi_video0.service

and i have acpi_backlight=video. My brightness loads at 20% and i can adjust it to 100%.

I also encountered this problem, the device is Toshiba_Portege_Z30.

  1. I try add add ‘acpi_backlight’ params but it still exist.

  2. systemctl disable xxx not useful.

  3. I try systemctl mask xxx , then I reboot device, no failed log.

  4. I find other solution , add systemd.restore_state=0 in the default grub command line. Then run sudo grub-mkconfig -o /boot/grub/grub.cfg.

Solution from this link: