Bug 494522

Summary: Powerdevil causes Samsung Odyssey G5 to go on/off repeatedly forever with DDC support enabled
Product: [Plasma] Powerdevil Reporter: kde
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: REPORTED ---    
Severity: major CC: batoupar, davidpetko07, espidev, jpetso, natalie_clarius, nate, xaver.hugl
Priority: HI Keywords: regression
Version: 6.2.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description kde 2024-10-11 11:05:33 UTC
SUMMARY
since the update to Plasma 6.2, my main screen (Samsung Odyssey G5) started to act weird. It started just well and after some seconds it started going on and off again every few seconds (5-6), making impossible to use Plasma. 
The secondary Screen (ASUS MG279) worked just well. 
Happened even only with the Samsung screen attached.
No Issue with Plasma < 6.2

STEPS TO REPRODUCE
1. attach a Samsung Odyssey G5 (27'', 1440p) with DP (1.2)
2. start Plasma 6.2

OBSERVED RESULT
Screen going on/off repeatedly forever after starting up Plasma

EXPECTED RESULT
Screen staying on

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux, Kernel: Linux 6.11.3-3-cachyos
KDE Plasma Version: 6.2
KDE Frameworks Version: 
Qt Version: 6

ADDITIONAL INFORMATION
after going through Logs, its visible that Powerdevil starts the redection of the screen over and over again:

Oct 11 01:14:57 NALX org_kde_powerdevil[951]: Delaying 6 seconds to avoid a false disconnect/connect sequence...
Oct 11 01:15:04 NALX org_kde_powerdevil[951]: DRM connectors with newly disconnected displays: card0-DP-2
Oct 11 01:15:04 NALX org_kde_powerdevil[951]: Removing connected display, drm_connector: card0-DP-2, dref Display_Ref[bus /dev/i2c-7]
Oct 11 01:15:06 NALX org_kde_powerdevil[951]: Emitting DDCA_Display_Status_Event(  48.241:  DDCA_EVENT_DISPLAY_DISCONNECTED, card0-DP-2, dref: Display_Ref[bus /dev/i2c-7], io_path:/dev/i2c-7]
Oct 11 01:15:06 NALX org_kde_powerdevil[951]: Executed 1 registered callbacks.
Oct 11 01:15:33 NALX org_kde_powerdevil[951]: Emitting DDCA_Display_Status_Event(  75.267:  DDCA_EVENT_DISPLAY_CONNECTED, card0-DP-2, dref: Display_Ref[NULL], io_path:/dev/i2c--1]
Oct 11 01:15:33 NALX org_kde_powerdevil[951]: Executed 1 registered callbacks.
Oct 11 01:15:33 NALX org_kde_powerdevil[951]: Display redetection starting.
Oct 11 01:15:33 NALX org_kde_powerdevil[951]: Watch thread terminated.
Oct 11 01:15:36 NALX org_kde_powerdevil[951]: busno=5, sleep-multiplier =  2.00. Testing for supported feature 0x10 returned Error_Info[DDCRC_RETRIES in ddc_write_read_with_retry, causes: DDCRC_NULL_RESPONSE(10)]
Oct 11 01:15:36 NALX org_kde_powerdevil[951]: Watch thread started
Oct 11 01:15:36 NALX org_kde_powerdevil[951]: Display redetection finished.
Oct 11 01:15:38 NALX org_kde_powerdevil[951]: dh=Display_Handle[i2c-7: fd=50], Replacing adjusted sleep multiplier 0.20 with 1.00 for SE_POST_WRITE or SE_POST_SAVE_SETTINGS
Oct 11 01:15:44 NALX org_kde_powerdevil[951]: Delaying 6 seconds to avoid a false disconnect/connect sequence...
Oct 11 01:15:49 NALX org_kde_powerdevil[951]: dh=Display_Handle[i2c-7: fd=50], Replacing adjusted sleep multiplier 0.20 with 1.00 for SE_POST_WRITE or SE_POST_SAVE_SETTINGS
Oct 11 01:15:52 NALX org_kde_powerdevil[951]: stabilized_connector_names required 1 extra calls to get_sysfs_drm_connector_names()
Oct 11 01:15:55 NALX org_kde_powerdevil[951]: Delaying 6 seconds to avoid a false disconnect/connect sequence...
Oct 11 01:15:59 NALX org_kde_powerdevil[951]: dh=Display_Handle[i2c-7: fd=50], Replacing adjusted sleep multiplier 0.20 with 1.00 for SE_POST_WRITE or SE_POST_SAVE_SETTINGS
Oct 11 01:16:03 NALX org_kde_powerdevil[951]: stabilized_connector_names required 1 extra calls to get_sysfs_drm_connector_names()
Oct 11 01:16:07 NALX org_kde_powerdevil[951]: Delaying 6 seconds to avoid a false disconnect/connect sequence...
Oct 11 01:16:15 NALX org_kde_powerdevil[951]: stabilized_connector_names required 1 extra calls to get_sysfs_drm_connector_names()
Oct 11 01:16:21 NALX org_kde_powerdevil[951]: dh=Display_Handle[i2c-7: fd=50], Replacing adjusted sleep multiplier 0.20 with 1.00 for SE_POST_WRITE or SE_POST_SAVE_SETTINGS
-----------------------------------------------
I was able to work around it, by disabling ddcutil (add Environment="POWERDEVIL_NO_DDCUTIL=1" to plasma-powerdevil.service). Not happened again ever since - but lost ability to set brightness/contrast/etc through KDE.
Comment 1 Jakob Petsovits 2024-10-11 21:09:54 UTC
Oh my. I'm tempted to blame Samsung and their firmware issues, but perhaps there's more to that.

You're on Arch, did you have it working under Plasma 6.1? That one already had much of the connection event logic, if it worked there then maybe we're only looking at a minor (but fatal) difference.
Comment 2 kde 2024-10-11 21:31:57 UTC
(In reply to Jakob Petsovits from comment #1)
> Oh my. I'm tempted to blame Samsung and their firmware issues, but perhaps
> there's more to that.
> 
> You're on Arch, did you have it working under Plasma 6.1? That one already
> had much of the connection event logic, if it worked there then maybe we're
> only looking at a minor (but fatal) difference.

It worked very well on 6.1 and 6.1.5, had absolutely no issues there. Started behaving after the 6.2 update.
Comment 3 Devin Lin 2024-10-21 02:13:18 UTC
I had the same issue, and what fixed it for me was setting the refresh rate to 60hz in the monitor, launching Plasma, then setting it back to 180hz.
Comment 4 Devin Lin 2024-10-23 01:40:04 UTC
Never mind, this issue appears to persist after a relogin
Comment 5 batoupar 2024-10-25 09:13:12 UTC
Same for me, I waited for the last update of KDE.
Plasma 6.1 is working well, but 6.2 keeps KDE crashing when I'm on a samsung odyssey G5.
If I plug in another screen, it work without issue, but not with my main screen.

For now, I get back my system to a backup without finding any fix.

Same system log as the author here. I can add my log generated by kde during the crash:


_______________________________________________________________________

Application: plasmashell (plasmashell), signal: Segmentation fault


warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing

warning: Can't open file /memfd:JSGCHeap:QtQml (deleted) during file-backed mapping note processing

warning: Can't open file /memfd:JITCode:QtQml (deleted) during file-backed mapping note processing

warning: Can't open file /memfd:unknown-usage:QtQml (deleted) during file-backed mapping note processing

warning: Can't open file /memfd:pulseaudio (deleted) during file-backed mapping note processing

warning: Can't open file /home/batoupar/.cache/plasma_theme_default.kcache (deleted) during file-backed mapping note processing

warning: Can't open file /memfd:JSVMStack:QtQml (deleted) during file-backed mapping note processing
[New LWP 2071]
[New LWP 2076]
[New LWP 2084]
[New LWP 2085]
[New LWP 2096]
[New LWP 2098]
[New LWP 2097]
[New LWP 2204]
[New LWP 2217]
[New LWP 2088]
[New LWP 2224]
[New LWP 2218]
[New LWP 2247]
[New LWP 2219]
[New LWP 2250]
[New LWP 2095]
[New LWP 3962]
[New LWP 2251]
[New LWP 2248]
[New LWP 2249]
[New LWP 3965]
[New LWP 3030]
[New LWP 2258]
[New LWP 3963]
[New LWP 3061]
[New LWP 2259]
[New LWP 2269]
[New LWP 3964]
[New LWP 3966]
[New LWP 2279]
[New LWP 2267]
[New LWP 2252]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by /usr/bin/plasmashell --no-respawn'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007d2a422a53f4 in ?? () from /usr/lib/libc.so.6
[Current thread is 1 (Thread 0x7d2a3c5d8a00 (LWP 2071))]
Cannot QML trace cores :(
/usr/share/drkonqi/gdb/python/gdb_preamble/preamble.py:516: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
  boot_time = datetime.utcfromtimestamp(psutil.boot_time()).strftime('%Y-%m-%dT%H:%M:%S')
/usr/share/drkonqi/gdb/python/gdb_preamble/preamble.py:533: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
  'timestamp': datetime.utcnow().isoformat(),
[Current thread is 1 (Thread 0x7d2a3c5d8a00 (LWP 2071))]
...
Comment 6 Nate Graham 2024-10-28 04:18:34 UTC
*** Bug 495316 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2024-10-28 04:19:28 UTC
Bug 495316 is from another user of the exact same monitor, BTW. It seems like the monitor from hell!