I develop Lunar (<a href="https://lunar.fyi/" rel="nofollow">https://lunar.fyi/</a>) for controlling monitors on Mac and stumbled upon this gem for Linux which I wanted to share with you.<p>I regularly get asked to recommend something similar to Lunar for Linux and Windows and while there's TwinkleTray for Windows, I didn't have a good recommendation for Linux. Glad this finally exists!<p>A lot of people also use MonitorControl for Mac and might be curious what's the difference between it and Lunar. I have a comparison table here for those people: <a href="https://lunar.fyi/lunar-vs-monitorcontrol" rel="nofollow">https://lunar.fyi/lunar-vs-monitorcontrol</a>
If it ever works reliably, I hope the feature gets integrated to KDE by default, possibly in the battery icon where there is the brightness setting of the internal monitor.<p>Could be weird for desktops, so maybe the widget could be generalized a bit so it also allows setting the brightness of the laptop screen.
Oh I'm definitely trying this. I currently have kb shortcuts defined for brightness up/down that invoke ddcutil.<p>This really ought to be built into every OS. From what I've read, the catch is that DDC implementations are often very buggy and can cause problems, so it would be risky to do this out of the box.
Neat! I'm working on something very similar for Xfce, but invoking ddcutil natively: <a href="https://github.com/apsun/xfce4-ddc-plugin">https://github.com/apsun/xfce4-ddc-plugin</a> (very much WIP, currently only supports hotkeys and a single monitor)<p>I've found that shelling out to the ddcutil CLI directly tends to be "lossy" - as in, if invoked very quickly (i.e. via keyboard shortcuts), it will tend to race with itself and fail half the time. So far the best solution I've found is to run a daemon to queue and batch together multiple operations, which significantly improved reliability.
If your distro doesn't have a package for the backend of this plasmoid yet, it invokes the backend with[1]:<p><pre><code> python3 -m ddcci_plasmoid_backend
</code></pre>
So you can probably get away with this:<p><pre><code> git clone https://github.com/davidhi7/ddcci-plasmoid \
&& cd $(python3 -c "import site; print(site.getsitepackages()[0])") \
&& ln -s $(cd -)/ddcci-plasmoid/backend/ddcci_plasmoid_backend .
</code></pre>
[1]: <a href="https://github.com/davidhi7/ddcci-plasmoid/blob/3c002d9822ce4534bff2ed2e14b4f8ed8da5eef8/plasmoid/contents/config/main.xml">https://github.com/davidhi7/ddcci-plasmoid/blob/3c002d9822ce...</a>
If you use gnome, this extension has worked well for me.<p><a href="https://extensions.gnome.org/extension/2645/brightness-control-using-ddcutil/" rel="nofollow">https://extensions.gnome.org/extension/2645/brightness-contr...</a>
This is cool, thanks for sharing.<p>I use a bash script to adjust brightness and contrast from the command line.<p>I invoke it as `brco 80` etc where 80 sets it to 80%. The script is:<p><pre><code> $ cat `which brco`
#!/usr/bin/env bash
set -euo pipefail
# use `ddccontrol -p` (probe) to find the following:
mydevice="i2c-7"
# brightness
ddccontrol -r 0x10 -w $1 dev:/dev/$mydevice &> /dev/null
# contrast
ddccontrol -r 0x12 -w $1 dev:/dev/$mydevice &> /dev/null</code></pre>
Also use something like this on Mac: <a href="https://github.com/MonitorControl/MonitorControl">https://github.com/MonitorControl/MonitorControl</a>
Now could this fix the non-functional laptop monitor brightness buttons issue I had?<p>(Lenovo Legion 5, RTX 2060, while in hybrid/automatic GPU switching mode - brightness buttons had no effect.)
Debian in particular has the ddcci-dkms package that once installed should solve the entire problem and let you control external monitors the same way you control internal ones.<p>I just found it, and I have to restart KDE to see if it worked, so no certainty here yet :)
Thanks, this is exactly what I’ve been looking for! I was even considering writing a Plasma widget myself because I couldn’t find anything. So far I’ve been using gddccontrol as it’s been the most reliable, but the UX isn’t the best.