Bug 521826 - [Regression] Infinite loop of device disconnection/connection notification sounds after screens go to sleep
Summary: [Regression] Infinite loop of device disconnection/connection notification so...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.7.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2026-06-20 04:54 UTC by Julien Delquié
Modified: 2026-07-04 18:48 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Remove infinite loop sound (2.04 KB, patch)
2026-06-20 07:06 UTC, Julien Delquié
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Delquié 2026-06-20 04:54:31 UTC
DESCRIPTION
This is a regression since Plasma 6.7.0.
A previous ticket was created for Plasma 6.2.0 then fixed in 6.5.0: https://bugs.kde.org/show_bug.cgi?id=494330

When screens go to sleep, there is a notification sound about screens being disconnected.
But after some seconds, a loop of device notification sounds about screen being disconnected/connected keeps looping like hell. 

This time (unlike previous ticket), if I deactivate notification sounds about devices disconnection/connection, it stops playing it when issue happens => this is the workaround I use for the moment.


STEPS TO REPRODUCE
1. Wait for screens to go to sleep

OBSERVED RESULT
Infinite loop of device disconnection/connection notification sounds.

EXPECTED RESULT
No sound at all, or at least, just one device disconnection notification sound when screens are disconnected, then just one device connection notification sound when screens are connected.

SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.18
KDE Plasma Version: 6.7.0
KDE Frameworks Version: 6.27.0
Qt Version: 6.11.1
Kernel Version: 7.0.12-gentoo-dist (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-9700K CPU @ 3.60GHz
Memory: 32 Gio of RAM (31.2 Gio usable)
Graphics Processor: AMD Radeon RX 7800 XT

ADDITIONAL INFORMATION
I had no issue with Plasma 6.6.5, then the issue appeared with Plasma 6.7.0, so the regression may be a commit between those versions.

For information, my screens configuration (I have removed the serial numbers and binary serial numbers), the DisplayPort screen is my primary screen (on the right), and the HDMI screen is my secondary screen (on the left):
$ ddcutil detect
Display 1
   I2C bus:  /dev/i2c-5
   DRM_connector:           card0-HDMI-A-1
   EDID synopsis:
      Mfg id:               AUS - ASUSTek COMPUTER INC
      Model:                VZ249
      Product code:         9420  (0x24cc)
      Serial number:        
      Binary serial number: 
      Manufacture year:     2019,  Week: 12
   VCP version:         2.1

Display 2
   I2C bus:  /dev/i2c-8
   DRM_connector:           card0-DP-2
   EDID synopsis:
      Mfg id:               AUS - ASUSTek COMPUTER INC
      Model:                VG249QM1A
      Product code:         9263  (0x242f)
      Serial number:        
      Binary serial number: 
      Manufacture year:     2023,  Week: 33
   VCP version:         2.2

More information about my computer:
$ inxi -GSC -xx
System:
  Host: pasokon.taniere.lan Kernel: 7.0.12-gentoo-dist arch: x86_64 bits: 64
    compiler: gcc v: 16.1.0
  Desktop: KDE Plasma v: 6.7.0 tk: Qt v: N/A wm: kwin_wayland dm: SDDM
    Distro: Gentoo Base System release 2.18
CPU:
  Info: 8-core model: Intel Core i7-9700K bits: 64 type: MCP arch: Coffee Lake
    rev: D cache: L1: 512 KiB L2: 2 MiB L3: 12 MiB
  Speed (MHz): avg: 800 min/max: 800/4900 cores: 1: 800 2: 800 3: 800 4: 800
    5: 800 6: 800 7: 800 8: 800 bogomips: 57616
  Flags-basic: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Navi 32 [Radeon RX 7700 XT /
    7800 XT] vendor: ASUSTeK driver: amdgpu v: kernel arch: RDNA-3 pcie:
    speed: 16 GT/s lanes: 16 ports: active: DP-2,HDMI-A-1
    empty: DP-1,DP-3,Writeback-1 bus-ID: 03:00.0 chip-ID: 1002:747e
  Display: wayland server: X.org v: 1.21.1.23 with: Xwayland v: 24.1.12
    compositor: kwin_wayland driver: X: loaded: amdgpu
    unloaded: modesetting,radeon alternate: fbdev,vesa dri: radeonsi
    gpu: amdgpu d-rect: 3840x1080 display-ID: 0
  Monitor-1: DP-2 pos: right model: VG249QM1A res: 1920x1080 hz: 240 dpi: 93
    diag: 604mm (23.8")
  Monitor-2: HDMI-A-1 pos: primary,left model: VZ249 res: 1920x1080 hz: 60
    dpi: 93 diag: 604mm (23.8")
  API: EGL v: 1.5 platforms: device: 0 drv: radeonsi device: 1 drv: swrast
    gbm: drv: radeonsi surfaceless: drv: radeonsi wayland: drv: radeonsi x11:
    drv: radeonsi
  API: OpenGL v: 4.6 vendor: amd mesa v: 26.1.2 glx-v: 1.4
    direct-render: yes renderer: AMD Radeon RX 7800 XT (radeonsi navi32 ACO DRM
    3.64 7.0.12-gentoo-dist) device-ID: 1002:747e display-ID: :0.0
  API: Vulkan v: 1.4.350 surfaces: N/A device: 0 type: discrete-gpu
    driver: mesa radv device-ID: 1002:747e
  Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
    de: kscreen-console,kscreen-doctor gpu: amdgpu_top wl: wayland-info
    x11: xdpyinfo, xprop, xrandr

Here are the fixes applied in Plasma 6.5.0 at the time, maybe it will help to find the regression in 6.7.0?
- branch 'Plasma/6.5' => https://invent.kde.org/plasma/plasma-workspace/-/commit/bc268f1d8597b7545cf9c225138f11fd38874ef7
- branch 'master' => https://invent.kde.org/plasma/plasma-workspace/-/commit/1f292200f436489a4bfe6df494a4aef4a65dff88
Comment 1 Julien Delquié 2026-06-20 07:06:46 UTC
Created attachment 193415 [details]
Remove infinite loop sound

Okay, I'm not a Qt, KDE, etc. developer, but I tried something.

I started with the fix at https://invent.kde.org/plasma/plasma-workspace/-/commit/bc268f1d8597b7545cf9c225138f11fd38874ef7 to find out which files were affected.

I looked at the git-blame for what was done around this fix between Plasma 6.6.5 and 6.7.0.

I came across this commit: https://invent.kde.org/plasma/plasma-workspace/-/commit/40e743b453f8ef1996adf804c3e5a0beaf02a961
From there… well, I understood that there were improvements and, more importantly, a crash fix (https://bugs.kde.org/show_bug.cgi?id=507691), so I didn't bother reverting the code to recompile plasma-workspace on my Gentoo system.

So I used an LLM (Duck.ai GPT-5.4 nano) to help me understand what's happening in the commit https://invent.kde.org/plasma/plasma-workspace/-/commit/40e743b453f8ef1996adf804c3e5a0beaf02a961 associated with my explanation of the problem I encountered.
This resulted in a patch that I tried myself (and whose contents I understood)... I applied it to the code from tag 6.7.0, recompiled plasma-workspace, and it works! I no longer have the infinite loop of sound!

I don't know KDE's policy regarding the use of LLM, and I would understand if this wasn't correct, and I would be very sorry if I had done something wrong. Therefore, I recommend that you do not use the patch I am proposing as is, and instead wait for an official version from a KDE developer who knows very well what he is doing.
Comment 2 Antti Savolainen 2026-06-20 18:10:38 UTC
I know I got this bug earlier, with a phone plugged in the computer, but I'm unable to reproduce it just by putting the screens to sleep
Comment 3 Zamundaaa 2026-06-23 15:27:28 UTC
The empty uuid does seem to be the cause, but I think it would be better to guard that in KWin directly.
Comment 4 Bug Janitor Service 2026-06-23 15:27:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/9462
Comment 5 Zamundaaa 2026-06-23 15:28:20 UTC
Can you test the MR, to make sure it actually fixes the issue?
Comment 6 Julien Delquié 2026-06-23 17:10:37 UTC
(In reply to Zamundaaa from comment #5)
> Can you test the MR, to make sure it actually fixes the issue?

I’m sorry, but it does not fix. :’(

What I have performed:
- remove the patch I have proposed for plasma-workspace and recompile it,
- add the patch you have proposed for kwin and recompile it,
- reboot,
- lock my screen and wait for screen to be in sleep mode.

The loop is back. :s
Comment 7 Zamundaaa 2026-06-23 21:06:52 UTC
There was a second sendDone that I overlooked. Does the updated MR work?
Comment 8 Julien Delquié 2026-06-24 05:38:02 UTC
(In reply to Zamundaaa from comment #7)
> There was a second sendDone that I overlooked. Does the updated MR work?

Just tested, and it works. :)
Thank you!
Comment 9 Zamundaaa 2026-06-29 12:43:16 UTC
Git commit 1d45c66c1fcb6e03c3bc23322f84dc0fcf92889d by Xaver Hugl.
Committed on 29/06/2026 at 12:02.
Pushed by zamundaaa into branch 'master'.

wayland/outputdevice: delay done event until the output has a UUID

The output device is created immediately after the output, but the UUID is only
set by workspace a bit later.

Co-authored-by: Julien Delquié julien.dlq@gmail.com

M  +7    -1    src/wayland/outputdevice_v2.cpp

https://invent.kde.org/plasma/kwin/-/commit/1d45c66c1fcb6e03c3bc23322f84dc0fcf92889d
Comment 10 Zamundaaa 2026-06-29 15:15:37 UTC
Git commit 0f2c65f9339eb7820f9a28d28e680b98a743741b by Xaver Hugl.
Committed on 29/06/2026 at 13:06.
Pushed by zamundaaa into branch 'Plasma/6.7'.

wayland/outputdevice: delay done event until the output has a UUID

The output device is created immediately after the output, but the UUID is only
set by workspace a bit later.

Co-authored-by: Julien Delquié julien.dlq@gmail.com


(cherry picked from commit 1d45c66c1fcb6e03c3bc23322f84dc0fcf92889d)

Co-authored-by: Xaver Hugl <xaver.hugl@kde.org>

M  +7    -1    src/wayland/outputdevice_v2.cpp

https://invent.kde.org/plasma/kwin/-/commit/0f2c65f9339eb7820f9a28d28e680b98a743741b