systemd-backlight fails to start

So, for years now, some of us have been plagued with this nagging systemd-backlight services failure that’s mostly benign. But, anytime you run systemctl status you’d be returned with a status of degraded because this silly systemd-backlight service was just not wanting to cooperate. For most of us, it simply failed to store out backlight brightness level after reboot. But other’s have had more serious issues.

I’ve seend this issue crop up on multiple linux distributions in various forms. So, be clear, it was affecting me most recently on Linux Manjaro (my daily driver). I have an MSI laptop, with an AMD Ryzen CPU and AMD Radeon GPU. As well, my backlight has always worked and been fully adjustable.

The only negative side effect I suffered was that my system would never remember my brightness settings across a restart. Which is not really a problem at all, in fact, it’s been helpful more than once. But, others have not been so lucky. So, here’s how you fix this annoying bug.

You’re going to need to edit two different files, as you’ll see during remediation, there’s more than one problem going on here. First and foremost, if you’re seeing the [email protected]:acpi_video0 status failed lets start by attacking that issue.

I’m not certain, but the bug tracker sounds like it’s a race condition during discovery, that is solved if you specify your acpi_backlight module at boot. This is what worked for me.
So, lets open /etc/default/grub in our favorite editor and find the line GRUB_CMDLINE_LINUX_DEFAULT.

Append the acpi_backlight kernel option by adding acpi_backlight=vendor. Please note, there are three possible options here: vendor, video and native. If one doesn’t work for you, you’ll have to try the others. For my amdgpu vendor worked for me, which is where I ran into another issue.

Edit grub config

Coming back to that, after you’ve saved your changes, go ahead and run update-grub and reboot. Hopefully, this fixes your issue. For me, I started seeing errors with [email protected]:amdgpu_bl1.
It was telling me I had an invalid Type variable in my systemd file.

To fix this, I edited the /usr/lib/systemd/system/[email protected] file and changed the line Type=idle to Type=oneshot. And whala! No more errors. Now when I run systemctl status it always returns running.

systemd-backlight

/usr/lib/systemd/system/systemd-backlight

Check here for some scripts that might work for you, if you want a more comprehensive solution (provided that your issues match the problem mentioned here, mine did not).

Note that one other thing I did was to quit relying on KMS (sigh), as it’s been causing me other race conditions at boot. So, I added graphics module to /etc/mkinitcpio.conf. If you’re using something like a hybrid setup that requires bumblebee or what not, I do not recommend this. But, I specified on the MODULES line MODULES=(amdgpu). And of course ran mkinitcpio -g afterwards and reboot.

systemd-backlight add gpu's kernel module

/etc/mkinitcpio.conf

It was depressing for me, personally. Because I’ve always had to deal with that Intel+Nvidia bumblebee cluster fuck. And I was greatly looking forward to letting KMS do it’s thing. But, race conditions are hard to nail down and I’m not going to be annoyed until someone gets around to it.

2021-09-30T00:10:21-04:00September 29th, 2021|Categories: Engineering, Random Fixes|Tags: , , , , , , |

nss: p11-kit-trust.so exists in filesystem

error-failure-while-downloading-nitrux-icon-theme
ERROR: Failure while downloading nitrux-icon-theme

 

Arch/Manjaro Update Fails Downloading nitrux-icon-theme_3.5.3.tar.gz

 

I really hope this didn’t stump any of you. It’s okay, if it did, you probably didn’t use the console and therefor probably didn’t see what actually failed. So, the link to the package, nitrux-icon-theme_3.5.3.tar.gz, is dead. Which makes it kind of hard for the PKGBUILD script to download it, build it and install it.

 

Locating the missing source for nitrux-icon-theme on the AUR

 

And, if you run a quick pacman -Qi nitrux-icon-theme you quickly see there’s supposed to be a nitrux website at https://nitrux.in/. But, trying to go there, you can see they closed their doors. The project forked into two projects now known as NX Desktop and Nitrux OS.

 

I’m probably wrong (according to my girlfriend, I am always wrong), but since the launchpad.net team references the Nitrux OS domain, and it was the last source in the PKGBUILD in the AUR, I kind of assume it was the more “official” source (at least as far as following the package maintainer’s intent). Looking quickly at their website, we get sent off to trusty old GitHub where the repository is now Archived (this means, no longer supported).

 

Quick patching the PKGBUILD file for missing source nitrux-icon-theme

 

There’s a chance here the AUR package maintainer has noticed this and simply wants the package to die. He’s not responded to quite a few comments on the AUR as well. Anywho, here’s the fix:

 

error downloading sources nitrux-icon-theme
Edit the PKGBUILD for nitrux-icon-theme

 

  • Grab the latest release from GitHub: https://github.com/Nitrux/nitrux-icon-theme/archive/3.5.4.tar.gz
  • run md5sum on the gunzipped tarball
  • rerun pacman with –editmenu so it asks if you want to edit the PKGBUILD file
  • Select any option that allows you to edit the PKGBUILD file (for me, using yay this was [A]
  • Update the source field with the latest available release
  • Update the md5sum field with the m5sum command’s output
  • Write and exit the PKGBUILD file
  • Continue the installation

 

ERROR: Failure while downloading nitrux-icon-theme – Fixed! Quickly!

 

wget https://github.com/Nitrux/nitrux-icon-theme/archive/3.5.4.tar.gz
md5sum 3.5.4.tar.gz
yay --editmenu -Syyu nitrux-icon-theme

 

Check out other random fixes on Gray Hat Freelancing.

2020-07-11T01:46:14-04:00May 22nd, 2020|Categories: Engineering, Random Fixes|Tags: , , , , , |

p11-kit-trust.so exists in filesystem – Quickly Fixed!

Yikes! This page went to shit during migrations. I apologize for that. I will make a note to pay better attention to my SEO errors. The gist of this blog post was covering errors around “yay build file exists“. So, I’ll rebuild it from memory, the best I can. Hope this helps!

error: failed to commit transaction (conflicting files)

yay build file exists

yay build file exists

yay build file exists

yay build file existssudo pacman -Syyu –overwrite /usr/lib/p11-kit-trust.so –overwrite /usr/lib32/p11-kit-trust.so

This worked out just fine for me. The files were safely overwritten and the machine continue to function without any problems. So, if it’s simply a matter of an existing file that’s not shared by other packages, feel free to overwrite it.

yay build file exists

2020-07-14T00:05:36-04:00April 20th, 2020|Categories: Engineering, Random Fixes|Tags: , , , |
Go to Top