Disable KDE monitor brightness control?

After upgrading to Fedora 40 and so Plasma 6 (on Wayland), I was perplexed by my external monitor’s brightness resetting to 100% all the time.

Someone on r/fedora pointed me to the brightness control that is now visible in the tray.

How can I disable this brightness control so that I can still use my monitor’s built-in controls and KDE does not reset them?

EDIT: according to an r/kde discussion I need to set a POWERDEVIL_NO_DDCUTIL=1 environment variable for the PowerDevil service on startup. But how do I set it? I don’t see a “powerdevil” or “PowerDevil” service in the output of “sudo systemctl list-unit-files”

i’m also not happy with the brightness control in the system tray under kubuntu 24.10 (X11) .

it only seems to control the brightness of my 2nd monitor and it keeps causing the monitor to dim about 20% on a random basis (whether nite control is on or not).

so i’m constantly having to fiddle with it as my 2nd monitor gets brighter and dimmer at random times.

i would like to keep nite control operational (because it works on both monitors and at predictable times) but i would like this random brightness control thing to stop doing that.

so following this thread to see what my options are.

1 Like

There has been a lot of brightness work in Plasma 6.2, with some new features to manage multi-screen brightness control, and unfortunately it looks like introduced some unintended behaviors. There are quite a few discussions about this in this forum, here’s a link to one that lists some relevant bug reports that you may want to track.

Regarding how to disable powerdevil DDC control:

  1. Open a terminal (for example, by running Konsole)
  2. Run the command systemctl --user edit plasma-powerdevil.service
  3. In the editor that opens, in the first open section, type:
[Service]
Environment=POWERDEVIL_NO_DDCUTIL=1

then save and exit.
4. Log out and log back in.

If you ever want to revert that, you can run the edit command again and remove those lines, or simply delete the directory ~/.config/systemd/user/plasma-powerdevil.service.d

4 Likes

will that edit affect my ability to control the night light feature from settings/colors & themes/night light?

1 Like

I don’t believe so - the night light feature is using kwin compositor filters and doesn’t actually has anything to do with brightness.

2 Likes

adding the override.conf file worked to remove the slider but the ill effects on my monitor brightness (the dimming) are still present.

tried running the edit command again and deleting those two lines but after closing the editor (nano in my case) i get the following notification on my terminal

after editing, new contents are empty, not writing file.

so i’m now going to try just deleting the whole directory and relogging.

brb

that’s better, restored the slider and adjusted the brightness of the 2nd monitor to be equal to my main and then repeated the procedure.

now my monitor is the right brightness and i have no more slider in the brightness control so hopefully it won’t change again on it’s own.

night light controls are still there and operational.

thanks

That did it for me, thanks! The system tray sliders are still present and they still modify the system’s brightness, but they no longer directly control my monitor settings, which is exactly what I wanted.

I was previously trying to modify the powerdevilrc file in ~/.config to no avail; out of all the solutions I’ve seen online, this is the only one that’s worked for me on Fedora 41.

1 Like

There’s a graphical utility called gddccontrol that you can get easily from your operating system repository that will let you control the monitor brightness manually - and has no interaction with powerdevil so it won’t be affected by Plasma stuff.

You can also get the ddcutil command line tool - which is what I use to setup my display’s brightness after powerdevil messes it up - but it’s pretty complicated to figure out.

@guss77, why do you not recommend that the user modify $HOME/.config/systemd/user/plasma-powerdevil.service.d/override.conf in their text editor (xdg-open)?

Context

I ask per bugs.kde.org/show_bug.cgi?id=501354 - the easier that adhering to the reproduction information is, the better.

If you don’t have the file already, they you need to create the directory and then the file - which is error prone - if you mess up the systemctl command it will tell you what you did wrong, but if you create the wrong file, or mess up the permissions, then the only indication that it’s incorrect is that what you expected doesn’t happen - which is annoying.

Also, systemctl edit will reload the configuration for you automatically, otherwise you need to run daemon-reload yourself - and if you’re already in the terminal - get it done in one command.

1 Like

@guss77, that process is somewhat involved. Can you confirm that I should perform the undermentioned?

  1. Shift + X (^X) to save:

  2. Then, Y to confirm:

If so, what do I do here? “Append” or “Prepend”, perhaps?

I ask because, to my knowledge, NT and Darwin have both utilised more than solely /n as newline delimiters in the past.

Just hit ENTER.

You can see the other advantage of using systemctl edit - it creates a temporary file for the editor, with explanations, and then uses atomic operations to update, just the needed lines, in the correct place.

(also ^X means CTRL+X)

Also, you don’t have to use whatever your OS has a weird idea of a terminal editor. If you are running this on KDE you can do export EDITOR="kate -n" before you run systemctl edit, and it will open the file to edit in Kate. You may want to have that environment variable set like that in your session’s profile…

1 Like

@guss77, I’m really surprised that setting the default in kcm_componentchooser sets xdg-mime default $application text/plain: [1]

    1. #!/usr/bin/env sh
      xdg-mime query default text/plain
      
    2. code.desktop

…yet doesn’t set $Env:EDITOR:

  1. #!/usr/bin/env sh
    echo "$EDITOR"
    
  2. /usr/bin/nano

Thanks for that! Interestingly, though, that appears to be somewhat broken, for although the file opens in kwrite-24.12.3-1.fc41.x86_64, another, empty tab labelled “+4” appears too:

  1. #!/usr/bin/env bash
    EDITOR="$(command -v kwrite)" && \ # `/usr/bin/kwrite`
    systemctl --user edit plasma-powerdevil.service
    

Even more interestingly, closing the filled tab closes the other simultaneously! This doesn’t occur if the opposite tab is closed first.

Multiple tabs also appear in code-1.98.0-1741124844.el8.x86_64, but the other file is empty:

  1. #!/usr/bin/env bash
    EDITOR="$(command -v code)" && \ # `/usr/bin/code`
    systemctl --user edit plasma-powerdevil.service
    

This doesn’t close one tab when the other does, and systemctl erroneously considers the file to have been “installed” (saved?) the moment that the code process is spawned.

Perhaps there’s reason that $(command -v nano) is prefilled.


  1. serverfault.com/revisions/1174871/1 ↩︎

@guss77, this doesn’t appear to work for me, for with the undermentioned I continue to be able to modify the brightness via the Plasmoid:

  1. #!/usr/bin/env bash
    systemctl --user edit plasma-powerdevil.service
    
  2. ### Editing /home/RokeJulianLockhart/.config/systemd/user/plasma-powerdevil.service.d/override.conf
    ### Anything between here and the comment below will become the contents of the drop-in file
    
    [Service]
    Environment=POWERDEVIL_NO_DDCUTIL=1
    
    ### Edits below this comment will be discarded
    
    
    ### /usr/lib/systemd/user/plasma-powerdevil.service
    # [Unit]
    # Description=Powerdevil
    # PartOf=graphical-session.target
    # After=plasma-core.target
    # 
    # [Service]
    # ExecStart=/usr/libexec/org_kde_powerdevil
    # Type=dbus
    # BusName=org.kde.Solid.PowerManagement
    # TimeoutStopSec=5sec
    # Slice=background.slice
    # Restart=on-failure
    
    ### /usr/lib/systemd/user/service.d/10-timeout-abort.conf
    # # This file is part of the systemd package.
    # # See https://fedoraproject.org/wiki/Changes/Shorter_Shutdown_Timer.
    # #
    # # To facilitate debugging when a service fails to stop cleanly,
    # # TimeoutStopFailureMode=abort is set to "crash" services that fail to stop in
    # # the time allotted. This will cause the service to be terminated with SIGABRT
    # # and a coredump to be generated.
    # #
    # # To undo this configuration change, create a mask file:
    # #   sudo mkdir -p /etc/systemd/user/service.d
    # #   sudo ln -sv /dev/null /etc/systemd/user/service.d/10-timeout-abort.conf
    # 
    # [Service]
    # TimeoutStopFailureMode=abort
    

Environment

  1. #!/usr/bin/env bash
    kinfo
    
  2. Operating System: Fedora Linux 41
    KDE Plasma Version: 6.3.2
    KDE Frameworks Version: 6.11.0
    Qt Version: 6.8.2
    Kernel Version: 6.13.5-200.fc41.x86_64 (64-bit)
    Graphics Platform: Wayland
    Memory: 30.4 GiB of RAM
    Graphics Processor 1: AMD Radeon RX 5700
    Graphics Processor 2: AMD Radeon Graphics
    

Yea, that a systemctl optimization for Nano that prepends +{line-numer} to the file name to get the editor to start at the specified line. The Kate-ism for this is to postfix the line number to the filename with a colon (i.e. {filename}:{line-number}), but my favorite terminal text editor - mcedit supports both the + syntax and the : syntax, so maybe Kate can be convinced to also support both.

I think its a behavior of -n, but I’m not sure.

This actually the expected behavior because code is not a command line editor and detaches from the terminal immediately. Kate does the same, which is why it also isn’t a good idea as a replacement for a command line editor - at least not the way I said it should work (my bad, sorry). Try to set EDITOR="kate -b" instead - to get Kate to behave like a proper command line editor (it will still open the weird “+4” tab, though).

1 Like

You didn’t specify what screens you are trying to control, but please note that POWERDEVIL_NO_DDCUTIL=1 disables the *DDC control in Powerdevil. If your screen is controlled by another mechanism - such as a laptop backlight ACPI control - this will not prevent Powerdevil from controlling the screen brightness.

Also, you didn’t specify if you did or didn’t but you also need to logout after the change, for it to take effect.

2 Likes

@guss77, that’s what was missing! Thank you, again.

For future reference, I utilised the undermentioned: [1]

I can now set my brightness (via ddcutil setvcp 10 $int), and the plasmoid’s slider is absent:


  1. superuser.com/revisions/1885525/3 ↩︎

@guss77, KWrite acts as expected (for me), hence why I differentiated:

I would presume that Kate acts identically. If it doesn’t, it’s rather disappointing that KWrite manages this function better than full-fledged IDEs do, even if it is really pefectionist.

systemctl doesn’t act on KWrite tab closure, though (which is understandable). Rather, it prints that message when the kwrite process SIGTERMs. [1]


  1. unix.stackexchange.com/revisions/251267/2 ↩︎

It looks like kwrite’s default mode is Kate’s -b - that makes sense: Kwrite is a simpler personality for Kate and is more geared towards one-file editing.

The “Kate personality” is geared towards project work with multiple files, so it makes sense that it detaches from the terminal.

That being said - its the same editor with the same tools, and if typing kwrite works for you - that is great. I am very used to typing kate, so I will continue to use it like that - but I’ll make an effort to recommend the “Kwrite personality” when suggesting its use a command line editor replacement. Thanks for pointing that out :+1: .

1 Like

@guss77, if of interest, I’ve filed the undermentioned:

  1. github.com/microsoft/vscode/issues/243211;

  2. bugs.kde.org/show_bug.cgi?id=501362:

    Created attachment 179307 [details]
    A Screenshot of KWrite 24.12.3-1.fc41.x86_64’s Tabs for Comment 0.

    SUMMARY

    When I invoke systemctl --user edit plasma-powerdevil.service with $Env:EDITOR set to $(command -v kwrite), the expected (.conf) content opens in another, empty tab labelled “+4” appears too: [1]

    Additionally, the name of the tab does not correspond to the relevant .conf file’s filename.

    STEPS TO REPRODUCE

    #!/usr/bin/env bash
    EDITOR="$(command -v kwrite)" && \ # `/usr/bin/kwrite`
    systemctl --user edit plasma-powerdevil.service
    

    EXPECTED RESULT

    I should see solely one tab, and its name should correspond to the filename in the CLI.

    SOFTWARE/OS VERSIONS

    I’m using kwrite-24.12.3-1.fc41.x86_64. Regarding the OS & DE:

    1. #!/usr/bin/env sh
      kinfo
      
    2. Operating System: Fedora Linux 41
      KDE Plasma Version: 6.3.2
      KDE Frameworks Version: 6.11.0
      Qt Version: 6.8.2
      Kernel Version: 6.13.5-200.fc41.x86_64 (64-bit)
      Graphics Platform: Wayland
      Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor
      Memory: 30.4 GiB of RAM
      Graphics Processor 1: AMD Radeon RX 5700
      Graphics Processor 2: AMD Radeon Graphics
      

    ADDITIONAL INFORMATION

For me, bugs.kde.org/show_bug.cgi?id=501354, too:

Created attachment 179299 [details]
A Screenshot of the Plasmoid

SUMMARY

Ater invoking ddcutil getvcp 10, I see, verbatim:

VCP code 0x10 (Brightness                    ): current value =    30, max value =   100

However, as the attached screenshot depicts, the Brightness and Colour plasmoid returns 100% for this value. Consequently, I am restricted to 30% brightness, but can reduce it to 0%.

STEPS TO REPRODUCE

I don’t know, because I don’t know when this commenced. However, this OS installation is barely 2 days old, and I’ve done little more to it than add RPMFusion, and Mesa Freeworld from it. This did not reproduce on my previous installation.

OBSERVED RESULT

100% in the plasmoid correlates to 30% brightness in the VCP firmware, and how to rectify this isn’t evident. Attempting to modify the brightness to > 30% via ddcutil setvcp 10 $int momentarily applies that value before it is reverted. The same occurs if set via the monitor’s integrated VCP GUI (accessible via physical buttons).

EXPECTED RESULT

100% in the plasmoid shouldn’t correlate to 30% brightness in the VCP firmware. It should correlate to 100%.

SOFTWARE/OS VERSIONS

  1. #!/usr/bin/env sh
    kinfo
    
  2. Operating System: Fedora Linux 41
    KDE Plasma Version: 6.3.2
    KDE Frameworks Version: 6.11.0
    Qt Version: 6.8.2
    Kernel Version: 6.13.5-200.fc41.x86_64 (64-bit)
    Graphics Platform: Wayland
    Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor
    Memory: 30.4 GiB of RAM
    Graphics Processor 1: AMD Radeon RX 5700
    Graphics Processor 2: AMD Radeon Graphics
    

ADDITIONAL INFORMATION

  1. #!/usr/bin/env sh
    ddcutil detect
    
  2. Display 1
       I2C bus:  /dev/i2c-8
       DRM connector:           card1-DP-1
       EDID synopsis:
          Mfg id:               AOC - UNK
          Model:                Q3279WG5B
          Product code:         12921  (0x3279)
          Serial number:        
          Binary serial number: 40899 (0x00009fc3)
          Manufacture year:     2019,  Week: 51
       VCP version:         2.2
    

  1. discuss-cdn.kde.org/uploads/default/original/3X/8/b/8bbddb728e4ec2c00b134f8b4132d691cd83c56e.png ↩︎