Bug 432730 - powerdevil uses outdated ddcutil protocol
Summary: powerdevil uses outdated ddcutil protocol
Status: RESOLVED FIXED
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 5.20.5
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-10 10:36 UTC by Carlo
Modified: 2022-04-03 10:47 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlo 2021-02-10 10:36:26 UTC
ddcutil just reached production status in version 1.0.0. That, although, also means that they changed something in the interface that requires powerdevil to adapt powerdevil to them. I know other projects like Clight had to.

I hope to have some news soon. Not everybody is on a laptop and most external monitors communicate through DDC/CI :/

TEMPORARY FIX: if anybody is interested, for the time being I have bound two keyboard keys to the following command (and its equivalent): ddcutil setvcp 10 + 5 --display 1 && ddcutil setvcp 10 + 5 --display 2 && notify-send "Brightness: $(ddcutil getvcp 10 --display 1 -t | grep -oP '(?<=VCP 10 C ).*?(?= 100)')%"
Comment 1 Nate Graham 2021-02-11 16:13:36 UTC
Thanks for the heads-up. Would you be interested in submitting a patch to fix this?
Comment 2 Carlo 2021-02-11 23:48:48 UTC
As far as I am concerned I am interested, but I have zero experience with C++ & KDE framework and my setup is not up to date with Plasma 5.21
That in combination with the fact that now I have to study for my last uni exam makes it difficult for me to start anytime soon :/

That said this evening I tried to locate the region of the bug, at least. I didn't do much, but I understood that powerdevil can actually read and write the actual screen brightness from libddcutil.
PowerDevilUPowerBackend does what it should, afaik. It even changes display's brightness through ddcutil according to powersaving settings (e.g. after 5 mins of inactivity it actually dims the screen).

Nontheless no slider appears in powerdevil's applet. How is that even possibile that it can read & write the right only needed value, I don't know, it is probably something I cannot understand with the connect() calls.
I tried to see the API changes of ddcutil 1.0.0 (http://www.ddcutil.com/c_api_100/), but none of those seem to affect KDE's code...

Finally there is one log I don't understand:
org.kde.powerdevil: Handle button events action could not check for screen configuration (HandleButtonEvents::checkOutputs@240)
Comment 3 Nate Graham 2021-02-12 15:22:55 UTC
Good investigation. Maybe Kai can help you with the rest. :)
Comment 4 Carlo 2021-02-12 19:22:01 UTC
Thanks!
Looking forward to hear from him soon ^^
Comment 5 Rind 2021-02-13 16:16:38 UTC
@Carlo

Does your monitor support DDC/CI?

If so, can you test the DKMS module ddcci-driver-linux?
https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux/
It creates a device in /sys/class/backlight/ that will possibly allow you to control the brightness via the plasma's powerdaemon.

If you use archlinux or any other distro derived from it there is a package in aur available.
https://aur.archlinux.org/packages/ddcci-driver-linux-dkms/

After installing the module you can load it with `modprobe ddcci_backlight`.

I have a compatible monitor but it is not being listed there. The driver readme says that it will only be listed if there is support for controlling the brightness, my monitor has it but it is still not being brought up. So I think it might be an upstream problem.
Comment 6 Carlo 2021-04-26 11:13:39 UTC
I am sorry for the very late reply.
That said I am not really sure since when, but I appear to have been fixed ^^
Powerdevil now have its slider and (i presume) it uses the right ddcutil interface.

@Rind
> If so, can you test the DKMS module ddcci-driver-linux?

At the moment i am using ddcutil and it works, so i haven't tried it yet. Do you still need me to test with ddcci driver?
Comment 7 Rind 2021-04-26 20:25:44 UTC
it's working for me too.
I think maybe you can close this issue