davidhi7 / ddcci-plasmoid

KDE Plasma widget to adjust the brightness of multiple external monitors
MIT License
409 stars 12 forks source link

No monitors detected on Plasma 6, `ddcutil: flock() returned: EAGAIN(-11): Resource temporarily unavailable` #73

Closed davidhi7 closed 5 months ago

davidhi7 commented 7 months ago

If powerdevil is running in a Plasma 6 session (I don't know if this issue also persists for Plasma 5), ddcutil commands fail because /dev/i2c-* files are locked by libddcutil, which is used by powerdevil. I already filed a bug report about this: https://bugs.kde.org/show_bug.cgi?id=481793.

Two workarounds exist:

  1. Using ddcutil with the --disable-cross-instance-locks flag (which as the name indicates, disables all checks for locked files), this might cause bugs if powerdevil and this widget use ddcutil simultaneously. Also passing CLI arguments to ddcutil isn't supported currently.
  2. Disable ddcutil integration in powerdevil:

$ systemctl edit --user plasma-powerdevil.service (opens an editor, modify as follows:)

### Editing /home/kpetso/.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
jpetso commented 6 months ago

powerdevil MR !333 has a fix, currently pending review. Will definitely make it into Plasma 6.1 and possibly 6.0.3 (or later).

davidhi7 commented 5 months ago

Fixed in Plasma 6.0.4.