Bug 517743 - kdeconnectd CPU load at 100%
Summary: kdeconnectd CPU load at 100%
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (other bugs)
Version First Reported In: 25.12.3
Platform: Fedora RPMs Linux
: HI normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords: regression
: 522406 522708 523040 523089 523301 (view as bug list)
Depends on:
Blocks:
 
Reported: 2026-03-18 11:47 UTC by Dāvids Paškevics
Modified: 2026-08-21 13:21 UTC (History)
11 users (show)

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


Attachments
Full GDB backtrace (25.47 KB, text/plain)
2026-03-18 11:47 UTC, Dāvids Paškevics
Details
perf flame graph (122.76 KB, image/png)
2026-03-18 11:49 UTC, Dāvids Paškevics
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dāvids Paškevics 2026-03-18 11:47:37 UTC
Created attachment 190764 [details]
Full GDB backtrace

SUMMARY

kdeconnectd pegs a CPU core and cannot find any devices. Backtrace suggests it's in some kind of strange clipboard polling loop. Judging by the backtrace this is different from bug #486802 which has the same user-facing symptoms.

STEPS TO REPRODUCE

Unsure what action on my part triggered the issue, so I unfortunately cannot provide reproduction steps.

OBSERVED RESULT

100% CPU usage, UI cannot find any devices.

EXPECTED RESULT

kdeconnectd runs with minimal CPU usage and enumerates devices.

SOFTWARE/OS VERSIONS

$ kinfo                   
Operating System: Fedora Linux 43
KDE Plasma Version: 6.6.2
KDE Frameworks Version: 6.24.0
Qt Version: 6.10.2
Kernel Version: 6.19.7-200.fc43.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 PRO 4650U with Radeon Graphics
Memory: 40 GiB of RAM (38.4 GiB usable)
Graphics Processor: AMD Radeon Graphics

ADDITIONAL INFORMATION

I've recorded a GDB backtrace (attached to the issue) and a perf trace. The perf trace is huge, but I can provide it on request.
Comment 1 Dāvids Paškevics 2026-03-18 11:49:06 UTC
Created attachment 190765 [details]
perf flame graph
Comment 2 Ismael Castiñeira Álvarez 2026-07-02 11:22:22 UTC
Same problem in Neon User Edition

$ kinfo
Operating System: KDE neon User Edition
KDE Plasma Version: 6.7.0
KDE Frameworks Version: 6.27.0
Qt Version: 6.11.1
Kernel Version: 6.17.0-35-generic (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-7300U CPU @ 2.60GHz
Memory: 8 GiB of RAM (7.6 GiB usable)
Graphics Processor: Intel® HD Graphics 620
Comment 3 Ismael Castiñeira Álvarez 2026-07-02 11:25:20 UTC
I think we could raise this to major: not only breaks KDE Connect, but also burns our laptops and drains batteries.
Comment 4 Nicolas Fella 2026-07-20 20:48:52 UTC
*** Bug 523301 has been marked as a duplicate of this bug. ***
Comment 5 Nicolas Fella 2026-07-20 20:49:11 UTC
*** Bug 522406 has been marked as a duplicate of this bug. ***
Comment 6 Nicolas Fella 2026-07-20 20:49:25 UTC
*** Bug 523089 has been marked as a duplicate of this bug. ***
Comment 7 Nicolas Fella 2026-07-20 20:50:52 UTC
*** Bug 523040 has been marked as a duplicate of this bug. ***
Comment 8 Nicolas Fella 2026-07-20 20:54:07 UTC
There are multiple reports about high CPU usage, possibly with different causes.

One cause is from clipboard code after a compositor restart, see https://bugs.kde.org/show_bug.cgi?id=523301
Comment 9 Daniel Duris 2026-07-21 10:19:37 UTC
Hi,

now it does not happen always after waking up, but rather at random intervals. IUt seems that even after pikll -9 kdeconnectd, the daemon is sometimes restarted on its own and goes to 100% immediately... It is quite annoying when you leave your laptop just with locked screen and come after two (...) hours back with 100% CPU going on and laptop hot as hell. Please, advise on workaround or resolution, as this is affecting hardware life.

Operating System: KDE neon User Edition
KDE Plasma Version: 6.7.2
KDE Frameworks Version: 6.28.0
Qt Version: 6.11.1
Kernel Version: 6.17.0-35-generic (64-bit)
Graphics Platform: Wayland
Comment 10 Daniel Duris 2026-07-21 10:20:17 UTC
OP< please raise NORMAL to GRAVE or CRITICAL as this affects hardware life.
Comment 11 Anton 2026-07-25 20:27:38 UTC
I have the same problem. 
It seems it happens after laptop goes into a sleep mode...
-------------------------------
  - OS: KDE neon User Edition, based on Ubuntu 24.04 Noble
  - Kernel: Linux 7.0.0-28-generic
  - Architecture: x86_64
  - CPU: Intel Core i7-9750H @ 2.60GHz
  - CPU cores/threads: 6 cores, 12 threads
  - RAM: 31 GiB total, 26 GiB available
  - Swap: none configured
  - GPUs:
      - Intel UHD Graphics 630
      - NVIDIA GeForce GTX 1660 Ti Mobile
Comment 12 Anton 2026-07-25 20:42:51 UTC
(In reply to Anton from comment #11)
> I have the same problem. 
> It seems it happens after laptop goes into a sleep mode...
> -------------------------------
>   - OS: KDE neon User Edition, based on Ubuntu 24.04 Noble
>   - Kernel: Linux 7.0.0-28-generic
>   - Architecture: x86_64
>   - CPU: Intel Core i7-9750H @ 2.60GHz
>   - CPU cores/threads: 6 cores, 12 threads
>   - RAM: 31 GiB total, 26 GiB available
>   - Swap: none configured
>   - GPUs:
>       - Intel UHD Graphics 630
>       - NVIDIA GeForce GTX 1660 Ti Mobile

I asked to prepare some info and logs about situation
-------------------------------------------------------------------------------
# kdeconnectd high CPU / repeated Bluetooth UUID lookup failures

## Summary

`kdeconnectd` was observed using ~100% of one CPU core until it was killed manually. The journal shows repeated Bluetooth/UUID discovery failures from `kdeconnectd`, especially for the same nearby Bluetooth addresses. This looks like KDE Connect may be repeatedly probing Bluetooth devices that have no UUIDs available.

Command:

```bash
sed -n '1,220p' ~/.config/kdeconnect/trusted_devices
```

Relevant output:

```ini
[099f7fad_da50_4400_b31e_3aec7396731f]
name=Pixel 8 Pro
protocolVersion=8
type=phone
```

## Current KDE Connect process/unit state after killing kdeconnectd

Command:

```bash
systemctl --user list-units --all '*kdeconnect*'
```

Output:

```text
UNIT                                            LOAD   ACTIVE   SUB  DESCRIPTION
app-org.kde.kdeconnect.daemon@autostart.service loaded inactive dead KDE Connect

1 loaded units listed.
```

Command:

```bash
systemctl --user status kdeconnectd.service
```

Output:

```text
Unit kdeconnectd.service could not be found.
```

## Repeated failure seen in journal

Command:

```bash
journalctl --user --since '2026-07-25 17:00:00' --until '2026-07-25 19:20:00' _COMM=kdeconnectd
```

Relevant output:

```text
Jul 25 17:21:20 user-pc kdeconnectd[92570]: No uuids found for "E0:9D:13:6B:58:13"
Jul 25 17:42:20 user-pc kdeconnectd[92570]: No uuids found for "E0:9D:13:6B:58:13"
Jul 25 17:43:20 user-pc kdeconnectd[92570]: No uuids found for "E0:9D:13:6B:58:13"
Jul 25 17:45:20 user-pc kdeconnectd[92570]: No uuids found for "E0:9D:13:6B:58:13"
... repeated for a long time
```

## Recurrence over recent journal history

Command:

```bash
journalctl --user --since '2026-07-18 00:00:00' --grep 'No uuids found' --no-pager -o cat | wc -l
```

Output:

```text
641
```

Command:

```bash
journalctl --user --since '2026-07-18 00:00:00' --grep 'No uuids found' --no-pager -o cat \
  | awk -F'"' '{count[$2]++} END {for (mac in count) print count[mac], mac}' \
  | sort -nr \
  | sed -n '1,20p'
```

Output:

```text
334 F4:14:BF:B8:0A:09
196 E0:9D:13:6B:58:13
9 24:75:3A:0E:C1:AC
7 EC:ED:04:B7:06:32
...
```

## Other related startup warnings

Command:

```bash
journalctl --user --since today | grep -i kdeconnect
```

Relevant output:

```text
Jul 25 09:47:21 user-pc baloo_file[2442]: Failed to get list of devices: "No such object path '/modules/kdeconnect'"
Jul 25 15:23:10 user-pc plasmashell[2613]: QDBusError("org.freedesktop.DBus.Error.UnknownObject", "No such object path '/modules/kdeconnect/devices/099f7fad_da50_4400_b31e_3aec7396731f/notifications'")
Jul 25 15:23:10 user-pc kscreenlocker_greet[92556]: Failed to get list of devices: "No such object path '/modules/kdeconnect'"
Jul 25 15:23:40 user-pc kdeconnectd[92570]: Missing CAP_NET_ADMIN permission. Cannot determine whether a found address is of random or public type.
```

## Bluetooth devices known to the system

Command:

```bash
bluetoothctl devices
```

Output:

```text
Device 80:99:E7:2D:6C:19 WH-1000XM4
```

## Notes

- `kdeconnectd` was killed manually after it was seen using ~100% of one CPU core.
- The journal does not explicitly log the CPU usage, but it does show repeated UUID lookup failures from `kdeconnectd` before the process was killed.
- The repeated addresses do not match the only known paired Bluetooth device from `bluetoothctl devices`.
- The most suspicious pattern is the repeated `No uuids found for "<MAC>"` messages from `kdeconnectd`, recurring hundreds of times over recent journal history.
Comment 13 Daniel Duris 2026-07-26 09:47:45 UTC
My temporary workaround until fixed is having this script ran in CRON every minute:

#!/bin/bash

PROCESS_NAME="kdeconnectd"
THRESHOLD=80

PID=$(pgrep -x "$PROCESS_NAME" | head -n1)

if [ -n "$PID" ]; then
# Grab instant CPU% using top
CPU_USAGE=$(top -b -n 1 -p "$PID" | awk -v pid="$PID" '$1 == pid {print int($9)}')

if [ -n "$CPU_USAGE" ] && [ "$CPU_USAGE" -ge "$THRESHOLD" ]; then
logger -t kdeconnect-watchdog "Killing $PROCESS_NAME (PID $PID): CPU at ${CPU_USAGE}%"
kill -9 "$PID"
fi
fi
Comment 14 Nicolas Fella 2026-08-07 11:58:15 UTC

*** This bug has been marked as a duplicate of bug 521822 ***
Comment 15 Nicolas Fella 2026-08-07 12:01:10 UTC
(In reply to Nicolas Fella from comment #8)
> There are multiple reports about high CPU usage, possibly with different
> causes.
> 
> One cause is from clipboard code after a compositor restart, see
> https://bugs.kde.org/show_bug.cgi?id=523301

For the clipboard code freeze, see https://invent.kde.org/frameworks/kguiaddons/-/merge_requests/225

For freezes in the SFTP plugin, see https://invent.kde.org/network/kdeconnect-kde/-/commit/200ff3c5e45f9f3d78a54b99fc392657b5f5e2f4
Comment 16 David Redondo 2026-08-11 08:08:57 UTC
Git commit 2df40937d8383c4b7db12f62827ca6f31efe20db by David Redondo.
Committed on 11/08/2026 at 08:06.
Pushed by davidre into branch 'master'.

waylandclipboard: Check isInterruptionRequested in prepare read loop

When there's an error on the wl_display like on reconnect it can be
that there are still pending messages on the connection.
wl_display_prepare_read_queue does not check the error on the wl_display
and return -1. However wl_display_dispatch_queue_pending checks the
error and  noops. This causes the loop to never terminate. Check
if the main thread wants us to stop also in this inner loop as a fix.

M  +1    -1    src/systemclipboard/waylandclipboard.cpp

https://invent.kde.org/frameworks/kguiaddons/-/commit/2df40937d8383c4b7db12f62827ca6f31efe20db
Comment 17 Nate Graham 2026-08-12 17:42:05 UTC
*** Bug 522708 has been marked as a duplicate of this bug. ***
Comment 18 Nate Graham 2026-08-21 13:21:06 UTC
Git commit 47ecd554b584534cf56c0839f5a33cc749d2604e by Nate Graham.
Committed on 21/08/2026 at 13:20.
Pushed by ngraham into branch 'Frameworks/6.24'.

waylandclipboard: Check isInterruptionRequested in prepare read loop

When there's an error on the wl_display like on reconnect it can be
that there are still pending messages on the connection.
wl_display_prepare_read_queue does not check the error on the wl_display
and return -1. However wl_display_dispatch_queue_pending checks the
error and  noops. This causes the loop to never terminate. Check
if the main thread wants us to stop also in this inner loop as a fix.


(cherry picked from commit 2df40937d8383c4b7db12f62827ca6f31efe20db)

Co-authored-by: David Redondo <kde@david-redondo.de>

M  +1    -1    src/systemclipboard/waylandclipboard.cpp

https://invent.kde.org/frameworks/kguiaddons/-/commit/47ecd554b584534cf56c0839f5a33cc749d2604e