Brightness settings are targeting the wrong device

I am running Fedora 35 Workstation (Gnome) on a Panasonic CF-20 Toughbook. Using the brightness buttons or the brightness slider, do not have any effect on the actual display brightness.


  • The hardware buttons (KEY_BRIGHTNESSDOWNand KEY_BRIGHTNESSUP) change value of the brightness slider
  • Both, the hardware button and the brightness slider change the value in /sys/class/backlight/panasonic/brightness
  • The display brightness only changes when altering the value in /sys/class/backlight/intel_backlight/brightness

How can I tell the system to use intel_backlight instead of panasonic for setting the display brightness?

Asking round in a few chats, I got pointed out to which then links to The solution there is:

  • write a script watching the brightness of one device and mirroring changes to the other
  • have it started automatically as a systemd unit

I would have preferred a solution more in the direction of: hey, not that device, but that one. Using the mirroring script feels quite hacky.

Nonetheless, this is what I ended up with:

Content of file /usr/local/bin/redirect-brightness


# NAME: redirect-brightness
# PATH: /usr/local/bin
# DESC: Redirect to correct driver when Ubuntu is adjusting the wrong
#       /sys/class/DRIVER_NAME/brightness

# DATE: June 13, 2018. Modified April 21, 2022.

# NOTE: Written for Ubuntu question:
#       Updated for Fedora question:
#       Use together with systemd unit from:


# Must be running as sudo
if [[ $(id -u) != 0 ]]; then
    echo >&2 "Root access required. Use: 'sudo redirect-brightness'"
    exit 1

# inotifywait required
type inotifywait >/dev/null 2>&1 || \
    { echo >&2 "'inotifywait' required but it's not installed.  Aborting."; \
      echo >&2 "Use 'sudo dnf install inotify-tools' to install it.'"; \
      exit 1; }

# Was right watch driver directory name setup correctly?
if [[ ! -d $WatchDriver ]]; then
    echo >&2 "Watch directory: '$WatchDriver'"; \
    echo >&2 "does not exist. Did you spell it correctly? Aborting.'"; \
    exit 1;

# Was right patch driver directory name setup correctly?
if [[ ! -d $PatchDriver ]]; then
    echo >&2 "Redirect to directory: '$PatchDriver'"; \
    echo >&2 "does not exist. Did you spell it correctly? Aborting.'"; \
    exit 1;

# Get maximum brightness values

# PARM: 1="-l" or "--log-file" then write each step to log file.
if [[ $1 == "-l" ]] || [[ $1 == "--log-file" ]]; then
    echo redirect-brightness LOG FILE > $LogFile
    echo WatchMax: $WatchMax PatchMax: $PatchMax >> $LogFile

SetBrightness () {
    # Calculate watch current percentage
    WatchPer=$(( WatchAct * 100 / WatchMax ))
    [[ $fLogFile == true ]] && echo WatchAct: $WatchAct WatchPer: $WatchPer >> $LogFile
    # Reverse engineer patch brightness to set
    PatchAct=$(( PatchMax * WatchPer / 100 ))
    echo $PatchAct | sudo tee $PatchDriver/brightness
    [[ $fLogFile == true ]] && echo PatchAct: $PatchAct >> $LogFile

# When machine boots, set brightness to last saved value

# Wait forever for user to press Fn keys adjusting brightness up/down.
while (true); do
    inotifywait --event modify $WatchDriver/actual_brightness
    [[ $fLogFile == true ]] && \
        echo "Processing modify event in $WatchDriver/actual_brightness" >> $LogFile

Make it executable and test it

sudo chmod + /usr/local/bin/redirect-brightness
sudo /usr/local/bin/redirect-brightness

Your system might miss some dependencies. Install them as told by the script.
Content of file /etc/systemd/system/redirect-brightness.service

Description=Redirect Backlight Brightness from one driver to another



Enable and start the systemd unit

sudo systemctl enable redirect-brightness
sudo systemctl start redirect-brightness

Thank you.
This solution is still relevant for laptops with discreet gpus, in 2024, on Fedora 39 KDE.
Was very surprised when first encountered.

One small problem: brightness change via hotkey is super slow now.