BUG - ddcutil 2.2.5 causes KDE Plasma freeze due to excessive i2c permission checks
Problem Description
After updating from ddcutil 2.2.3 to 2.2.5, KDE Plasma completely freezes after login. The desktop loads but nothing responds visually.
Environment
- Distribution: Arch Linux
- Kernel: 6.17.7-arch1-1
- ddcutil version (broken): 2.2.5-1
- ddcutil version (working): 2.2.3-1
- KDE Plasma: 6.5.5
- powerdevil: 6.5.5-1
- kwin: 6.5.5-3
- GPUs:
- NVIDIA GeForce RTX 3050 Mobile (GA107M)
- AMD Radeon 680M (Rembrandt)
Apparent Root Cause
The new version (2.2.5) seems to aggressively and repeatedly try to access all i2c devices (/dev/i2c-0 through /dev/i2c-23) without having the necessary permissions, causing powerdevil to loop continuously with permission errors.
Evidence from journalctl
fev 05 11:48:28 nb org_kde_powerdevil[2588]: [ 2701] Device /dev/i2c-23 lacks R/W permissions
fev 05 11:48:28 nb org_kde_powerdevil[2588]: [ 2701] (dw_remove_display_by_businfo) No Display_Ref found for i2c bus: 1
fev 05 11:48:28 nb org_kde_powerdevil[2588]: [ 2701] (dw_remove_display_by_businfo) No Display_Ref found for i2c bus: 10
fev 05 11:48:28 nb org_kde_powerdevil[2588]: [ 2701] Device /dev/i2c-1 lacks R/W permissions
fev 05 11:48:28 nb org_kde_powerdevil[2588]: [ 2701] Device /dev/i2c-2 lacks R/W permissions
[... repeated for all 24 i2c devices, multiple times ...]
This generates continuous DDCA_EVENT_DISPLAY_CONNECTED events that lock up the system.
Workaround
Downgrading to ddcutil 2.2.3-1 immediately resolves the issue.
Multiple CachyOS users were able to reproduce this issue, requiring a version rollback. Their hardware is as follows: Framework 16 (AMD 890M iGPU & AMD 7700S dGPU) Framework 13 (AMD 890M iGPU) Asus TUF A17 (2023, AMD iGPU, Nvidia dGPU)
For all of these cases, the logs look virtually identical, with the only difference being different bus numbers under No Display_Ref found for i2c bus: X. For the Frameworks, the Display_Ref errors were for i2c bus 7 and 16.
I have the same problem. After ddcutil upgrade (2.2.3 to 2.2.5) on the next reboot Kde-Plasma freeze completely after login, even the mouse cursor freeze. I turned off the laptop from the power button then I did a rollback and added ddcutil in pacman ignore pkg. My laptop specs: ASUS TUF A15 (AMD Ryzen7 7445HS w/740M, NVIDIA RTX 3050); OS: Archlinux
I have the same issue, also running Arch Linux, with the same workaround downgrading ddcutil. Hardware is Acer Swift Edge 16 - AMD Ryzen 7 7840U w/ Radeon 780M Graphics.
Looking at the journalctl output there was log corruption due to having to hard shutdown holding the power button: "journal corrupted or uncleanly shut down, renaming and replacing."
So it was not possible to get good diagnostic log data for this bug. But ddcutil 2.2.3-1 works fine with no issues.
I am also experiencing this issue on a Framework 16 (1st Generation) running on Arch Linux. Reverting to ddcutil-2.2.3 resolves the issue.
Log file of a recent encounter with this issue: 20260205-ddcutil-failurelog.txt
ddcutil 2.2.5, as is the case with all recent releases, including 2.2.3, installs file /usr/lib/udev/rules.d/60-ddcutil-i2c.rules, containing the following lines, granting RW access to all /dev/i2c devices associated with a video controller.
SUBSYSTEM=="i2c-dev", KERNEL=="i2c-[0-9]*", ATTRS{class}=="0x03*", TAG+="uaccess"
SUBSYSTEM=="dri",KERNEL=="card[0-9]*", TAG+="uaccess"
Is this file installed? What is the output of ddcutil environment when run as a normal user? What is the output of ddcutil interrogate when run as root? You should be able to run these from an alternative desktop environment such as gnome or from a virtual console.
I apologize if this is of no help, but my findings with regards to this problem (laptop with amd gpu, kde):
I have configuration that keeps laptop screen disabled when external screen (hdmi) is connected and in that case, the freeze did not appear. If I tried to boot while disconnected from external screen (internal active), freeze was happening.
I worked around the issue by adding kernel parameter amdgpu.dcdebugmask=0x10 with the intention of disabling PSR on internal screen and that removed the freezing completely without downgrading ddcutil. (Not saying this workaround is better than downgrade, just adding the info if it helps narrowing down on the bug)
I apologize if this is of no help, but my findings with regards to this problem (laptop with amd gpu, kde):
I have configuration that keeps laptop screen disabled when external screen (hdmi) is connected and in that case, the freeze did not appear. If I tried to boot while disconnected from external screen (internal active), freeze was happening.
I worked around the issue by adding kernel parameter amdgpu.dcdebugmask=0x10 with the intention of disabling PSR on internal screen and that removed the freezing completely without downgrading ddcutil. (Not saying this workaround is better than downgrade, just adding the info if it helps narrowing down on the bug)
This fix worked for an entirely different freezing issue I was having when I first got my laptop. Note that the debug mask fixes an IMMEDIATE freeze, whereas this is causing a freeze after a few short moments.
While they have similar symptoms, what I believe you were experiencing is unrelated to this issue.
I acknowledge this was a blunt and blind attempt and the fix was kinda accidental, but I'm 100% I was facing the same issue, the symptoms were the same and it also ~~started right after powerdevil upgrade (which bumped ddcutil version)~~. edit1: I apologize for mistake, while powerdevil is indeed the one using the ddcutil (which did get updated right before the issue appeared for me), it was not itself (powerdevil) upgraded in the last days.
edit2: I retested this without the kernel parameter and with disconnected external screen and was again stuck frozen on blank desktop image right after login where even pointer didn't move, nor could I switch to tty3 or anything else (or so it looked), but then I reconnected the external monitor (while frozen) and the tty3 appeared on both displays (since they are mirrored outside of plasma configuration) and it was responsive and I could even switch back to tty1 where it was not frozen anymore (and correctly turned off the laptop screen as per my plasma configuration). (with re-added kernel parameter, the problem is again gone)
Output of ddcutil environment using 2.2.3 from Plasma.
ddcutil_environment_plasma_2.2.3.txt
Output of ddcutil environment using 2.2.5 from a different TTY while Powerdevil is busy spamming lacks R/W permission.
ddcutil_environment_plasma_dead_2.2.5.txt
There is no difference that I can see. I also ran it under Hyprland for both versions and the output is the same.
udev rules file is present.
@johndonuk and others:
Please add the following line to the [global] or [libddcutil] block of $HOME/.config/ddcutil/ddcutilrc
options: --trace conn --trcfunc i2c_detect_attached_buses --trace-to-syslog
After restarting kde plasma, filter the output using journalctl -b -t org_kde_powerdevil. The output will be enormous. To state the obvious, I'm interested in only the segment with the trace data.
For those who have not already done so, please submit the output of ddcutil environment or sudo ddcutil interrogate on 2.2.3.
Thank you.
Requested diagnostics:
2.2.3 Diagnostics:
(NOTE: 2.2.3's interrogate command died with SIGABRT while scanning the i2c bus.)
2.2.5 Diagnostics:
20260206-ddcutils-diags-225.txt
2.2.5 Log File With Modified "ddcutilrc":
20260206-ddcutils-logs-225.txt
Thank you for looking in to this problem.
Not running as root, what is the output of getfacl /dev/i2c-5
(I picked /dev/i2c-5 because, in all the examples so far, it is a video controller device. Other than that, there's nothing special about it.)
Requested additional getfacl diagnostics:
2.2.3 getfacl:
2.2.5 getfacl:
I'm baffled. Does command line ddcutil exhibit permission problems? Does the failure occur if you explicitly add your userid to group i2c?
ddcutil c1 executes the display detection code that normally runs in libddcutil. If command line ddcutil works, try running ddcutil c1.
Failure occur even though I added my user id to the i2c group.
Here's my logs for everything you mentioned, running ddcutil 2.2.4 and after modifying $HOME/.config/ddcutil/ddcutilrc like you instructed. Note that both 2.2.3 and 2.2.4 work well for me, with 2.2.5 being the problematic version.
journalctl-org_kde_powerdevil_ddcutil-2.2.4.txt getfactl_dev_i2c-all.txt sudo_ddcutil_interrogate.txt ddcutil_environment.txt