<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>521826</bug_id>
          
          <creation_ts>2026-06-20 04:54:31 +0000</creation_ts>
          <short_desc>[Regression] Infinite loop of device disconnection/connection notification sounds after screens go to sleep</short_desc>
          <delta_ts>2026-07-04 18:48:04 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>plasmashell</product>
          <component>general</component>
          <version>6.7.0</version>
          <rep_platform>Gentoo Packages</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.kde.org/show_bug.cgi?id=494330</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>regression</keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Julien Delquié">julien.dlq</reporter>
          <assigned_to name="Plasma Bugs List">plasma-bugs-null</assigned_to>
          <cc>agurenko</cc>
    
    <cc>antti.savo</cc>
    
    <cc>kde</cc>
    
    <cc>nate</cc>
    
    <cc>navi</cc>
    
    <cc>xaver.hugl</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/kwin/-/commit/0f2c65f9339eb7820f9a28d28e680b98a743741b</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2524938</commentid>
    <comment_count>0</comment_count>
    <who name="Julien Delquié">julien.dlq</who>
    <bug_when>2026-06-20 04:54:31 +0000</bug_when>
    <thetext>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 =&gt; 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&quot;)
  Monitor-2: HDMI-A-1 pos: primary,left model: VZ249 res: 1920x1080 hz: 60
    dpi: 93 diag: 604mm (23.8&quot;)
  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 &apos;Plasma/6.5&apos; =&gt; https://invent.kde.org/plasma/plasma-workspace/-/commit/bc268f1d8597b7545cf9c225138f11fd38874ef7
- branch &apos;master&apos; =&gt; https://invent.kde.org/plasma/plasma-workspace/-/commit/1f292200f436489a4bfe6df494a4aef4a65dff88</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2524954</commentid>
    <comment_count>1</comment_count>
      <attachid>193415</attachid>
    <who name="Julien Delquié">julien.dlq</who>
    <bug_when>2026-06-20 07:06:46 +0000</bug_when>
    <thetext>Created attachment 193415
Remove infinite loop sound

Okay, I&apos;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&apos;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&apos;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&apos;t know KDE&apos;s policy regarding the use of LLM, and I would understand if this wasn&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2525139</commentid>
    <comment_count>2</comment_count>
    <who name="Antti Savolainen">antti.savo</who>
    <bug_when>2026-06-20 18:10:38 +0000</bug_when>
    <thetext>I know I got this bug earlier, with a phone plugged in the computer, but I&apos;m unable to reproduce it just by putting the screens to sleep</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2526059</commentid>
    <comment_count>3</comment_count>
    <who name="Zamundaaa">xaver.hugl</who>
    <bug_when>2026-06-23 15:27:28 +0000</bug_when>
    <thetext>The empty uuid does seem to be the cause, but I think it would be better to guard that in KWin directly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2526060</commentid>
    <comment_count>4</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2026-06-23 15:27:52 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/9462</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2526062</commentid>
    <comment_count>5</comment_count>
    <who name="Zamundaaa">xaver.hugl</who>
    <bug_when>2026-06-23 15:28:20 +0000</bug_when>
    <thetext>Can you test the MR, to make sure it actually fixes the issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2526101</commentid>
    <comment_count>6</comment_count>
    <who name="Julien Delquié">julien.dlq</who>
    <bug_when>2026-06-23 17:10:37 +0000</bug_when>
    <thetext>(In reply to Zamundaaa from comment #5)
&gt; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2526170</commentid>
    <comment_count>7</comment_count>
    <who name="Zamundaaa">xaver.hugl</who>
    <bug_when>2026-06-23 21:06:52 +0000</bug_when>
    <thetext>There was a second sendDone that I overlooked. Does the updated MR work?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2526267</commentid>
    <comment_count>8</comment_count>
    <who name="Julien Delquié">julien.dlq</who>
    <bug_when>2026-06-24 05:38:02 +0000</bug_when>
    <thetext>(In reply to Zamundaaa from comment #7)
&gt; There was a second sendDone that I overlooked. Does the updated MR work?

Just tested, and it works. :)
Thank you!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2527951</commentid>
    <comment_count>9</comment_count>
    <who name="Zamundaaa">xaver.hugl</who>
    <bug_when>2026-06-29 12:43:16 +0000</bug_when>
    <thetext>Git commit 1d45c66c1fcb6e03c3bc23322f84dc0fcf92889d by Xaver Hugl.
Committed on 29/06/2026 at 12:02.
Pushed by zamundaaa into branch &apos;master&apos;.

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2528048</commentid>
    <comment_count>10</comment_count>
    <who name="Zamundaaa">xaver.hugl</who>
    <bug_when>2026-06-29 15:15:37 +0000</bug_when>
    <thetext>Git commit 0f2c65f9339eb7820f9a28d28e680b98a743741b by Xaver Hugl.
Committed on 29/06/2026 at 13:06.
Pushed by zamundaaa into branch &apos;Plasma/6.7&apos;.

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 &lt;xaver.hugl@kde.org&gt;

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

https://invent.kde.org/plasma/kwin/-/commit/0f2c65f9339eb7820f9a28d28e680b98a743741b</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>193415</attachid>
            <date>2026-06-20 07:06:46 +0000</date>
            <delta_ts>2026-06-20 07:06:46 +0000</delta_ts>
            <desc>Remove infinite loop sound</desc>
            <filename>0001-Try-to-remove-infinite-loop-of-device-disconnection-connection-notification-sounds.patch</filename>
            <type>text/plain</type>
            <size>2089</size>
            <attacher name="Julien Delquié">julien.dlq</attacher>
            
              <data encoding="base64">RnJvbSAyZDQwMjhjMTBkNzlhODU5N2RkNTc1MDYyMjg4MDEzMWU0NDVjZGQ3IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBKdWxpZW5EbHEgPGp1bGllbi5kbHFAZ21haWwuY29tPgpEYXRl
OiBTYXQsIDIwIEp1biAyMDI2IDA3OjMxOjU1ICswMjAwClN1YmplY3Q6IFtQQVRDSF0gVHJ5IHRv
IHJlbW92ZSBpbmZpbml0ZSBsb29wIG9mIGRldmljZQogZGlzY29ubmVjdGlvbi9jb25uZWN0aW9u
IG5vdGlmaWNhdGlvbiBzb3VuZHMKCi0tLQogZGV2aWNlbm90aWZpY2F0aW9ucy9kZXZpY2Vub3Rp
ZmljYXRpb25zLmNwcCB8IDE4ICsrKysrKysrKysrKysrKy0tLQogZGV2aWNlbm90aWZpY2F0aW9u
cy9kZXZpY2Vub3RpZmljYXRpb25zLmggICB8ICAxICsKIDIgZmlsZXMgY2hhbmdlZCwgMTYgaW5z
ZXJ0aW9ucygrKSwgMyBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9kZXZpY2Vub3RpZmljYXRp
b25zL2RldmljZW5vdGlmaWNhdGlvbnMuY3BwIGIvZGV2aWNlbm90aWZpY2F0aW9ucy9kZXZpY2Vu
b3RpZmljYXRpb25zLmNwcAppbmRleCA1ZTBlZTBmZGMyLi4wZDE4MmJkOGMxIDEwMD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BtX2lzSW5pdGlhbGl6ZWQgPSB0cnVlOworICAgICAgICBRX0VNSVQgZG9uZSgpOworICAg
IH0KIH0KIAogdm9pZCBPdXRwdXREZXZpY2U6OmtkZV9vdXRwdXRfZGV2aWNlX3YyX3JlbW92ZWQo
KQogewotICAgIFFfRU1JVCByZW1vdmVkKCk7CisgICAgLy8gRG9u4oCZdCBub3RpZnkgcmVtb3Zh
bCB1bmxlc3Mgd2UgaGFkIGEgdmFsaWQgVVVJRCBwcmV2aW91c2x5LgorICAgIGlmIChtX3V1aWRT
ZXQpIHsKKyAgICAgICAgUV9FTUlUIHJlbW92ZWQoKTsKKyAgICB9CiB9CiAKIE91dHB1dERldmlj
ZU1vZGU6Ok91dHB1dERldmljZU1vZGUoOjprZGVfb3V0cHV0X2RldmljZV9tb2RlX3YyICptb2Rl
KQpkaWZmIC0tZ2l0IGEvZGV2aWNlbm90aWZpY2F0aW9ucy9kZXZpY2Vub3RpZmljYXRpb25zLmgg
Yi9kZXZpY2Vub3RpZmljYXRpb25zL2RldmljZW5vdGlmaWNhdGlvbnMuaAppbmRleCA0M2U2ZTQ5
YzVmLi41NzEzYzZjNDVjIDEwMDY0NAotLS0gYS9kZXZpY2Vub3RpZmljYXRpb25zL2RldmljZW5v
dGlmaWNhdGlvbnMuaAorKysgYi9kZXZpY2Vub3RpZmljYXRpb25zL2RldmljZW5vdGlmaWNhdGlv
bnMuaApAQCAtMTA1LDYgKzEwNSw3IEBAIHByb3RlY3RlZDoKIAogcHJpdmF0ZToKICAgICBRU3Ry
aW5nIG1fdXVpZDsKKyAgICBib29sIG1fdXVpZFNldCA9IGZhbHNlOwogICAgIGJvb2wgbV9pc0lu
aXRpYWxpemVkID0gZmFsc2U7CiB9OwogCi0tIAoyLjU0LjAKCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>