Bug 477670

Summary: KDEConnect is unable to connect to paired devices after sleep
Product: [Applications] kdeconnect Reporter: Antti Savolainen <antti.savo>
Component: commonAssignee: Albert Vaca Cintora <albertvaka>
Status: REPORTED ---    
Severity: normal CC: andrew.g.r.holmes, gaaf, kde-bugs
Priority: NOR    
Version First Reported In: 23.08.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Antti Savolainen 2023-11-28 12:15:23 UTC
SUMMARY
If I close my laptop lid for a few minutes and then open it, KDEConnect will be unable to reconnect to any of its paired devices. It doesn't seem to happen with a quick few seconds sleep but keeping it in sleep for 10 minutes, it stopped working. I have not tested any shorter time frame so I do not know what the lower bound is. I did some tests a week ago, so I might misremember, but new devices were possible to pair even after the bug happened.

STEPS TO REPRODUCE
1. Start your laptop
2. Check that KDEConnect sees the other devices
3. Close the lid and put the laptop to sleep mode. 10 minutes is enough
4. Open your laptop and check KDEConnect

OBSERVED RESULT
None of the prepaired devices are reachable

EXPECTED RESULT
The devices should be reachable after sleep

SOFTWARE/OS VERSIONS
Linux: Arch Linux
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.112.0
Qt Version: 5.15.11
Comment 1 Antti Savolainen 2024-02-16 10:01:15 UTC
I think I found the root cause: Interrupted wifi connection. I can create the same issue by switching wifi connections. You need to make a connection between devices, swap to a different wifi connection for about >30 seconds and then connect back to the original. Now the PC will be unable to connect to the phone. Turning the connection off on the PC will cause issues but not replicate the issue fully like for example remote input not working while ping does.