Bug 471233

Summary: kdeconnect's default sleep/suspend remote computer command doesn't work
Product: [Applications] kdeconnect Reporter: bricout.thomas
Component: commonAssignee: Albert Vaca Cintora <albertvaka>
Status: RESOLVED FIXED    
Severity: minor CC: andrew.g.r.holmes, kde_account.5fzso
Priority: NOR    
Version First Reported In: 23.04.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description bricout.thomas 2023-06-19 17:25:47 UTC
SUMMARY
KDE connect's sample command for suspending doesn't work because the command is wrong.

STEPS TO REPRODUCE
1. Go on a phone with kde-connect paired with a computer that runs on archlinux ( mayber other distros as well )
2. Select "execute a command". Click pen to open a menu on a computer. on the computer click Sample Commands + and select suspend.
3. click suspend on the phone.

OBSERVED RESULT
Nothing happens.

EXPECTED RESULT
The computer goes to sleep/suspends.

SOFTWARE/OS VERSIONS
Linux: 6.3.8-arch1-1 (64-bit)
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
replacing `suspend` by `systemctl suspend` works perfectly.
trying to write down suspend in konsole gives this:
user@device ~> suspend
Suspending 5038: run kill -CONT 5038 from another terminal to resume

Oh, and it is not possible to select Linux/Plasma app in Component when filing a bug report for kdeconnect
Comment 1 Tim 2023-06-20 18:28:36 UTC
I was able to confirm this item using my device a Pixel 5 and Fedora Rawhide where the "suspend" value does not perform an action but "systemctl suspend" does work correctly when set inside the KDE Connect desktop app.  I tested the "suspend" command in Konsole and while it starts to perform a task it does ultimately hang.  This might be due to being on a release candidate kernel.  No issue using systemctl suspend however.

Linux: 6.4.0-0.rc7.53.fc39.x86_64
KDE Plasma: 5.27.5
KDE Framework: 5.107.0
QT Version: 5.15
Graphics Platform: Wayland
OS: Fedora Rawhide
KConnect App Version: 1.26.0
Comment 2 Albert Vaca Cintora 2023-06-24 10:53:54 UTC
This was already fixed in https://invent.kde.org/network/kdeconnect-kde/-/commit/0d362169a8e30cc5a78a87982f0d15009b988538