https://bugs.kde.org/show_bug.cgi?id=481793
Bug ID: 481793 Summary: ddcutil constantly locked by powerdevil Classification: Plasma Product: Powerdevil Version: 5.93.0 Platform: Arch Linux OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: plasma-b...@kde.org Reporter: dh_log...@posteo.de CC: m...@ratijas.tk, natalie_clar...@yahoo.de Target Milestone: --- SUMMARY Running ddcutil version 2.1.3, ddcutil detect and other commands always fail when Powerdevil is running. Running ddcutil detect yields the following error messages: (i2c_open_bus ) busno=9, flock() returned: EAGAIN(-11): Resource temporarily unavailable /dev/i2c-9 locked. Retrying... (i2c_open_bus ) busno=9, flock() returned: EAGAIN(-11): Resource temporarily unavailable (i2c_open_bus ) busno=9, flock() returned: EAGAIN(-11): Resource temporarily unavailable (i2c_open_bus ) busno=9, flock() returned: EAGAIN(-11): Resource temporarily unavailable (i2c_open_bus ) busno=9, flock() returned: EAGAIN(-11): Resource temporarily unavailable (i2c_open_bus ) busno=9, flock() returned: EAGAIN(-11): Resource temporarily unavailable (i2c_open_bus ) busno=9, flock() returned: EAGAIN(-11): Resource temporarily unavailable Max wait exceeded for /dev/i2c-9 Programs holding /dev/i2c-9 open: lsof: WARNING: can't stat() btrfs file system /var/lib/docker/btrfs Output information may be incomplete. COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ddcutil 13315 david 3u CHR 89,9 0t0 744 /dev/i2c-9 sh 13322 david 3u CHR 89,9 0t0 744 /dev/i2c-9 lsof: WARNING: can't stat() btrfs file system /var/lib/docker/btrfs Output information may be incomplete. COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ddcutil 13315 david 3u CHR 89,9 0t0 744 /dev/i2c-9 sh 13325 david 3u CHR 89,9 0t0 744 /dev/i2c-9 Processes locking /dev/i2c-9 (inode 744): 11285 11285 egrep: warning: egrep is obsolescent; using grep -E Name: org_kde_powerde State: S (sleeping) Pid: 11285 egrep: warning: egrep is obsolescent; using grep -E Name: org_kde_powerde State: S (sleeping) Pid: 11285 (i2c_open_bus ) Cross instance locking failed The log indicates that /dev/i2c-* files are locked by powerdevil/libddcutil. I can reliably reproduce this even if I haven't done a interaction involving external monitors since starting the plasma session. A workaround is to run ddcutil with the --disable-cross-instance-locks flag, as this seems to disable all checking for lock files. However, this obviously breaks the otherwise helpful feature of locking the currently used files. STEPS TO REPRODUCE 1. Make sure Powerdevil is running 2. Run for example ddcutil detect in a terminal OBSERVED RESULT ddcutil fails to communicate with monitors because locks are present. EXPECTED RESULT ddcutil shouldn't reliably fail because dev/i2c files are locked. Operating System: Arch Linux KDE Plasma Version: 5.93.0 KDE Frameworks Version: 5.249.0 Qt Version: 6.7.0 Kernel Version: 6.7.5-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 5600 6-Core Processor Memory: 31.3 GiB of RAM Graphics Processor: AMD Radeon RX 6750 XT -- You are receiving this mail because: You are watching all bug changes.