Monday, January 20, 2025

Remeber screen brightness in Fedora

My laptop's screen is always at the lowest brightness when resuming from sleep. It is very annoying. I found a fix.

 

Create an executable file at /usr/lib/systemd/system-sleep/brightness with following contents,


#!/usr/bin/sh

case $1 in
    pre) cp /sys/class/backlight/intel_backlight/brightness  /tmp/saved_brightness ;;
    post) cp /tmp/saved_brightness /sys/class/backlight/intel_backlight/brightness  ;;
esac


No comments:

Post a Comment