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.
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:
Open a terminal (for example, by running Konsole)
Run the command systemctl --user edit plasma-powerdevil.service
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
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.
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.
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)?
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.
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…
#!/usr/bin/env sh
xdg-mime query default text/plain
code.desktop
…yet doesn’t set $Env:EDITOR:
#!/usr/bin/env sh
echo "$EDITOR"
/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:
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.
### 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
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).
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.
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]
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 .
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.
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%.