I can't change display brightness on fedora silverblue 34

Hi all,

I’m new to Silverblue, but am very intrigued about its container-first approach. That’s why I’m trying it out. However I can’t manage to change the display brightness. When pressing the buttons on my keyboard or use the slider in the gnome UI, the slider appears and changes its intensity accordingly, but the display brightness stays the same.

I searched but could only find fixes for fedora workstation which did not work. Not much of a surprise as I interpret the display brightness to incorporate the OS since it is its role to control hardware, and this area works very differently between silverblue and other fedora flavors.

Can anyone help me out here please?

I’m running Fedora 34.20210423.n.0 on a Thinkpad X1 Yoga 1st generation. Any more details needed?

Cheers!

You might try upgrading the software, you are almost 6 months behind. 2 in 1s have had hit and miss support with Linux… could be a miss at your current kernel but perhaps fixed and a hit in the most recent.

One shot everything:

sudo rpm-ostree cancel; sudo rpm-ostree cleanup -bm; sudo rpm-ostree refresh-md; flatpak update -y; sudo rpm-ostree upgrade

Hi Matthew and thanks for your input!

I did upgrade everything but that did not help unfortunately. This is my os-release now:

[steff@fedora ~]$ cat /etc/os-release 
NAME=Fedora
VERSION="34.20211008.0 (Silverblue)"
ID=fedora
VERSION_ID=34
VERSION_CODENAME=""
PLATFORM_ID="platform:f34"
PRETTY_NAME="Fedora 34.20211008.0 (Silverblue)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:34"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora-silverblue/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=34
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=34
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Silverblue"
VARIANT_ID=silverblue
OSTREE_VERSION='34.20211008.0'

Do you maybe think that if I search for similiar issues but on fedora workstation that their fixes potentially work the same way or at least similiarily on silverblue? My naive interpretation of these two distros is that their stack is fundamentally different, but perhaps with some luck the underlying fedora system (be it now traditional or a read-only image) is still similar enough so that fixes in one distro carry over to the other? I’ll give this approach a try.

Fedora Silverblue is based on the same version of Fedora Workstation, and has most of the same core components. The packages used on Workstation are the same ones used to build the Silverblue base commit.
This sounds like an error that was being reported on F35 rawhide about not being able to adjust media settings, but I could be wrong it may have been pipewire related in the one I am thinking of. Definitely seems like regression if it did work then now doesn’t.

Seconding @jakfrost here. Fedora Silverblue is really close to Fedora Workstation, mostly with a different update and package installation system but all of the other software included are 100% the same.

Could you link to the solutions you found and why they did not work? Sometimes the only thing they need is a small adaptation for Silverblue.

Thanks guys, I then try workstation approaches further and will report back.

@Siosm Sorry, didn’t save the links and since I’m new to silverblue and even fedora I can’t even quite recall what I did because honestly I didn’t fully understand it… Once I got working solutions on this install I’ll do it all over again in a clean way to use this OS from a proper base.

I remember one major thing was about installing nvidia drivers via rpm-ostree.

I am currently reading into the docs about libostree and rpm-ostree since these are the mechanisms on modifying the “true OS” within silverblue, right?

Then, once I understand some basics of this, I will adapt fedora workstation approaches via ostree-stuff.

Installing NVIDIA drivers should be:

$ sudo rpm-ostree install kmod-nvidia xorg-x11-drv-nvidia

and maybe:

$ sudo rpm-ostree kargs --append=rd.driver.blacklist=nouveau --append=modprobe.blacklist=nouveau --append=nvidia-drm.modeset=1

But I’m not even sure the second line is needed anymore.

From Nvidia drivers in Fedora Silverblue – Alexander Larsson.

Thanks for your suggestions, unfortunately I couldn’t get it working yet, will try again tomorrow or the day after.

What I’ve tried so far:

And plenty of variations on those approaches.

I’ll think I’ll try again on the nvidia driver stuff, maybe I find other similar problems and fixes.

Cheers so far!

From the error

I would guess you will need to add your user to the group ‘video’ as per the link you provided. This can be accomplished by the following sudo usermod -aG video *username* (your username).

Had done this too, didn’t help. The file /etc/light/targets/sysfs/backlight/auto/minimum also doesn’t exist on my system, but I couldn’t find much yet on how to point ‘light’ to this file in another location (if it even exists).

I assume however that the nvidia driver issue still might be the more promising path, since drivers simply are closer to the hardware at hand.

Let’s do one thing at a time as properly installing the NVIDIA driver might solve your backlight issue. What errors are you getting when trying to install the NVIDIA drivers. Please provide both the commands / instructions you use and the full errors and log messages as otherwise it’s really hard to help you.

I’m embarrased to inform you guys, that I had no nvidia after all. Somehow I must have read this wrongly when I was handed this laptop. I’m verry sorry for this.

But at least I could get it working … with a work-around though. It seems like the problem is with the OLED drivers and wayland as outlined in these threads:
https://forums.lenovo.com/t5/ThinkPad-X-Series-Laptops/X1-Yoga-OLED-brightness-issues-unable-to-adjust/td-p/3748704
https://forums.lenovo.com/t5/ThinkPad-X-Series-Laptops/X-1-Yoga-OLED-brightness-control-under-linux/td-p/3948282
https://forums.lenovo.com/t5/Ubuntu/X1-Extreme-Backlight-brightness-not-working-with-Linux-in-Hybrid-mode-Intel/m-p/4567085?page=1#4567755

I switched to X and installed xrandr with rpm-ostree, where I then could set the brightness for example like this:

xrandr --output eDP-1 --brightness 0.5

Then I could get the currently set value with:

xrandr --verbose | awk '/Brightness/ { print $2; exit }'

Finally I wired these together in order to increase the brightness in steps of 0.1 and added an if-condition checking that the value doesn’t pass 1 with this single command:

echo $(echo $(xrandr --verbose | awk '/Brightness/ { print $2; exit }')+0.1 | bc) |  { read result; if (( $(echo "$result<=1" | bc -l) )) ; then xrandr --output eDP-1 --brightness $result ; fi ; }

And for decreasing:

echo $(echo $(xrandr --verbose | awk '/Brightness/ { print $2; exit }')-0.1 | bc) |  { read result; if (( $(echo "$result>=0" | bc -l) )) ; then xrandr --output eDP-1 --brightness $result ; fi ; }

These two commands I then put in two scripts which I then call withs shortcuts on the ctrl+shift+F5 and ctrl+shift+F6 keys (because I couldn’t override the system’s ‘Increase Brightness’ key, will look into this at some point).

It’s not ideal, and hopefully I can get around to looking into doing this more properly; but for now this will do.