You are not logged in.

#1 2025-06-01 10:39:17

endor43
Member
Registered: 2012-11-04
Posts: 25

[SOLVED] pCloud causes freeze on suspend due to systemd bug

Got it from AUR
https://aur.archlinux.org/packages/pcloud-drive

If am not running pCloud suspend works fine.
But if I am running it and got to suspend, the screen goes black except for mouse and is unresponsive to anything but sysrq reboot.

I figured out it was pcloud by looking at the journals and guessing.
Originally due to journal I thought it was baloo, so I disabled baloo and kept pCloud running, but the problem remained.
With baloo enabled and pCloud killed, sleep works fine. So it's probably not Baloo.

I tried to make a systemd hook to killall pcloud (incl sudoers passthrough) on pre and start pcloud on post and the script runs (i made it executable) but I just echoes and does not show anything about the killall in journal and the machine still freezes. plus i know this isn't a proper solution even if it did work.

here is my journal

Jun 01 15:10:31 cpx541 systemd-logind[1349]: The system will suspend now!
Jun 01 15:10:31 cpx541 NetworkManager[1339]: <info>  [1748765431.0744] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Jun 01 15:10:31 cpx541 NetworkManager[1339]: <info>  [1748765431.0746] device (enp196s0): state change: unavailable -> unmanaged (reason 'unmanaged-sleeping', managed-type: 'full')
Jun 01 15:10:31 cpx541 ksmserver-logout-greeter[16007]: kf.windowsystem: static bool KX11Extras::compositingActive() may only be used on X11
Jun 01 15:10:31 cpx541 NetworkManager[1339]: <info>  [1748765431.0809] device (p2p-dev-wlp195s0): state change: disconnected -> unmanaged (reason 'unmanaged-sleeping', managed-type: 'full')
Jun 01 15:10:31 cpx541 NetworkManager[1339]: <info>  [1748765431.0810] manager: NetworkManager state is now ASLEEP
Jun 01 15:10:31 cpx541 NetworkManager[1339]: <info>  [1748765431.0812] device (wlp195s0): state change: activated -> deactivating (reason 'sleeping', managed-type: 'full')
Jun 01 15:10:31 cpx541 systemd[1]: Starting Network Manager Script Dispatcher Service...
Jun 01 15:10:31 cpx541 systemd[1]: Started Network Manager Script Dispatcher Service.
Jun 01 15:10:31 cpx541 kernel: wlp195s0: deauthenticating from 64:70:02:7f:31:e6 by local choice (Reason: 3=DEAUTH_LEAVING)
Jun 01 15:10:31 cpx541 wpa_supplicant[1449]: nl80211: send_event_marker failed: Source based routing not supported
Jun 01 15:10:31 cpx541 wpa_supplicant[1449]: wlp195s0: CTRL-EVENT-DISCONNECTED bssid=64:70:02:7f:31:e6 reason=3 locally_generated=1
Jun 01 15:10:31 cpx541 wpa_supplicant[1449]: wlp195s0: CTRL-EVENT-DSCP-POLICY clear_all
Jun 01 15:10:31 cpx541 NetworkManager[1339]: <info>  [1748765431.1846] device (wlp195s0): supplicant interface state: completed -> disconnected
Jun 01 15:10:31 cpx541 NetworkManager[1339]: <info>  [1748765431.1848] device (wlp195s0): state change: deactivating -> disconnected (reason 'sleeping', managed-type: 'full')
Jun 01 15:10:31 cpx541 NetworkManager[1339]: <info>  [1748765431.1851] dhcpx541 (wlp195s0): canceled DHCP transaction
Jun 01 15:10:31 cpx541 NetworkManager[1339]: <info>  [1748765431.1851] dhcpx541 (wlp195s0): activation: beginning transaction (timeout in 45 seconds)
Jun 01 15:10:31 cpx541 NetworkManager[1339]: <info>  [1748765431.1851] dhcpx541 (wlp195s0): state changed no lease
Jun 01 15:10:31 cpx541 NetworkManager[1339]: <info>  [1748765431.2055] device (wlp195s0): set-hw-addr: set MAC address to 2A:5D:A1:7C:C4:37 (scanning)
Jun 01 15:10:31 cpx541 NetworkManager[1339]: <info>  [1748765431.2480] device (wlp195s0): state change: disconnected -> unmanaged (reason 'unmanaged-sleeping', managed-type: 'full')
Jun 01 15:10:31 cpx541 NetworkManager[1339]: <info>  [1748765431.3856] device (wlp195s0): set-hw-addr: reset MAC address to 44:E5:17:B6:10:7F (unmanage)
Jun 01 15:10:31 cpx541 wpa_supplicant[1449]: p2p-dev-wlp195s: CTRL-EVENT-DSCP-POLICY clear_all
Jun 01 15:10:31 cpx541 wpa_supplicant[1449]: p2p-dev-wlp195s: CTRL-EVENT-DSCP-POLICY clear_all
Jun 01 15:10:31 cpx541 wpa_supplicant[1449]: nl80211: deinit ifname=p2p-dev-wlp195s disabled_11b_rates=0
Jun 01 15:10:31 cpx541 pcloud-drive.AppImage[2152]: Down: Everything Downloaded| Up: Everything Uploaded, status is READY
Jun 01 15:10:31 cpx541 pcloud-drive.AppImage[2152]: STATUS -------------> 0
Jun 01 15:10:31 cpx541 wpa_supplicant[1449]: wlp195s0: CTRL-EVENT-DSCP-POLICY clear_all
Jun 01 15:10:31 cpx541 wpa_supplicant[1449]: wlp195s0: CTRL-EVENT-DSCP-POLICY clear_all
Jun 01 15:10:31 cpx541 wpa_supplicant[1449]: nl80211: deinit ifname=wlp195s0 disabled_11b_rates=0
Jun 01 15:10:31 cpx541 systemd[1]: Reached target Sleep.
Jun 01 15:10:31 cpx541 systemd[1]: Starting System Suspend...
Jun 01 15:10:31 cpx541 systemd[1]: session-2.scope: Unit now frozen-by-parent.
Jun 01 15:10:41 cpx541 systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
Jun 01 15:11:31 cpx541 systemd-sleep[16141]: Failed to freeze unit 'user.slice': Connection timed out
Jun 01 15:11:31 cpx541 systemd-sleep[16187]: CHILLUN Going to suspend...
Jun 01 15:11:31 cpx541 systemd-sleep[16141]: Performing sleep operation 'suspend'...
Jun 01 15:11:31 cpx541 kernel: PM: suspend entry (s2idle)
Jun 01 15:11:31 cpx541 kernel: Filesystems sync: 0.001 seconds
Jun 01 15:11:51 cpx541 kernel: Freezing user space processes
Jun 01 15:11:51 cpx541 kernel: Freezing user space processes failed after 20.005 seconds (1 tasks refusing to freeze, wq_busy=0):
Jun 01 15:11:51 cpx541 kernel: task:baloo_file_extr state:D stack:0     pid:3018  tgid:3018  ppid:2295   task_flags:0x400000 flags:0x00000006
Jun 01 15:11:51 cpx541 kernel: Call Trace:
Jun 01 15:11:51 cpx541 kernel:  <TASK>
Jun 01 15:11:51 cpx541 kernel:  __schedule+0x2b6/0x620
Jun 01 15:11:51 cpx541 kernel:  ? fuse_request_queue_background+0x165/0x1a0 [fuse]
Jun 01 15:11:51 cpx541 kernel:  schedule+0x27/0xa0
Jun 01 15:11:51 cpx541 kernel:  io_schedule+0x46/0x70
Jun 01 15:11:51 cpx541 kernel:  folio_wait_bit_common+0x128/0x310
Jun 01 15:11:51 cpx541 kernel:  ? __pfx_wake_page_function+0x10/0x10
Jun 01 15:11:51 cpx541 kernel:  filemap_update_page+0x285/0x2b0
Jun 01 15:11:51 cpx541 kernel:  filemap_get_pages+0x2c3/0x470
Jun 01 15:11:51 cpx541 kernel:  filemap_read+0xfe/0x470
Jun 01 15:11:51 cpx541 kernel:  vfs_read+0x2ae/0x390
Jun 01 15:11:51 cpx541 kernel:  ksys_read+0x74/0xf0
Jun 01 15:11:51 cpx541 kernel:  do_syscall_64+0x7b/0x160
Jun 01 15:11:51 cpx541 kernel:  ? do_syscall_64+0x87/0x160
Jun 01 15:11:51 cpx541 kernel:  ? fdget_pos+0x90/0x160
Jun 01 15:11:51 cpx541 kernel:  ? syscall_exit_to_user_mode+0x10/0x210
Jun 01 15:11:51 cpx541 kernel:  ? do_syscall_64+0x87/0x160
Jun 01 15:11:51 cpx541 kernel:  ? syscall_exit_to_user_mode+0x10/0x210
Jun 01 15:11:51 cpx541 kernel:  ? do_syscall_64+0x87/0x160
Jun 01 15:11:51 cpx541 kernel:  ? sched_clock+0x10/0x30
Jun 01 15:11:51 cpx541 kernel:  ? sched_clock_cpu+0xf/0x230
Jun 01 15:11:51 cpx541 kernel:  ? psi_group_change+0x19e/0x460
Jun 01 15:11:51 cpx541 kernel:  ? update_curr+0x9f/0x290
Jun 01 15:11:51 cpx541 kernel:  ? psi_task_switch+0xb7/0x210
Jun 01 15:11:51 cpx541 kernel:  ? finish_task_switch.isra.0+0x99/0x2c0
Jun 01 15:11:51 cpx541 kernel:  ? rseq_get_rseq_cs+0x19/0x220
Jun 01 15:11:51 cpx541 kernel:  ? rseq_ip_fixup+0x8d/0x1d0
Jun 01 15:11:51 cpx541 kernel:  ? switch_fpu_return+0x4e/0xd0
Jun 01 15:11:51 cpx541 kernel:  ? irqentry_exit_to_user_mode+0x1ca/0x200
Jun 01 15:11:51 cpx541 kernel:  entry_SYSCALL_64_after_hwframe+0x76/0x7e
Jun 01 15:11:51 cpx541 kernel: RIP: 0033:0x7fd4952ade22
Jun 01 15:11:51 cpx541 kernel: RSP: 002b:00007fff49fe5ea8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
Jun 01 15:11:51 cpx541 kernel: RAX: ffffffffffffffda RBX: 000055e16a666b60 RCX: 00007fd4952ade22
Jun 01 15:11:51 cpx541 kernel: RDX: 0000000000001000 RSI: 000055e16abeca70 RDI: 0000000000000019
Jun 01 15:11:51 cpx541 kernel: RBP: 00007fff49fe5ee0 R08: 0000000000000000 R09: 0000000000000000
Jun 01 15:11:51 cpx541 kernel: R10: 0000000000000000 R11: 0000000000000246 R12: 00000000007ef325
Jun 01 15:11:51 cpx541 kernel: R13: 0000000000000325 R14: 00007fd4953f4ea0 R15: 0000000000000000
Jun 01 15:11:51 cpx541 kernel:  </TASK>
Jun 01 15:11:51 cpx541 kernel: OOM killer enabled.
Jun 01 15:11:51 cpx541 kernel: Restarting tasks ... done.
Jun 01 15:11:51 cpx541 rtkit-daemon[1551]: The canary thread is apparently starving. Taking action.
Jun 01 15:11:51 cpx541 rtkit-daemon[1551]: Demoting known real-time threads.
Jun 01 15:11:51 cpx541 rtkit-daemon[1551]: Successfully demoted thread 2819 of process 2217.
Jun 01 15:11:51 cpx541 rtkit-daemon[1551]: Successfully demoted thread 1964 of process 1959.
Jun 01 15:11:51 cpx541 rtkit-daemon[1551]: Successfully demoted thread 1959 of process 1959.
Jun 01 15:11:51 cpx541 rtkit-daemon[1551]: Successfully demoted thread 1799 of process 1787.
Jun 01 15:11:51 cpx541 rtkit-daemon[1551]: Successfully demoted thread 1787 of process 1787.
Jun 01 15:11:51 cpx541 rtkit-daemon[1551]: Successfully demoted thread 1792 of process 1786.
Jun 01 15:11:51 cpx541 rtkit-daemon[1551]: Successfully demoted thread 1786 of process 1786.
Jun 01 15:11:51 cpx541 rtkit-daemon[1551]: Demoted 7 threads.
Jun 01 15:11:51 cpx541 kernel: PM: suspend exit
Jun 01 15:11:51 cpx541 kernel: PM: suspend entry (s2idle)
Jun 01 15:13:16 cpx541 kernel: Linux version 6.14.6-105.bazzite.fc42.x86_64 (builder@dec11c68c264) (gcc (GCC) 15.1.1 20250425 (Red Hat 15.1.1-1), GNU ld version 2.44-3.fc42) #1 SMP PREEMPT_DYNAMIC Tue May 20 18:59:06 UTC 2025

If anyone has any ideas I would appreciate it greatly.

Last edited by endor43 (2025-06-03 08:29:54)

Offline

#2 2025-06-03 08:26:12

endor43
Member
Registered: 2012-11-04
Posts: 25

Re: [SOLVED] pCloud causes freeze on suspend due to systemd bug

Solved this.
These tipped me off:
https://github.com/systemd/systemd/issues/33269
https://forum.manjaro.org/t/system-sudd … d/167019/2

The problem was that pcloud was still mounted and it was preventing the machine from suspending.
It seems related to a systemd bug in 256 which though closed is still happening to me in 257.
Normally in other systems I've had this isn't a problem. Maybe they can sleep with it mounted or maybe they automatically umount and mount when suspending and waking.

Anyways my inelegant solution is as follows:
Created systemd sleep script to umount pcloud when suspending

#!/bin/sh
case $1/$2 in
  pre/*)
    echo "Going to $2..."
    umount /home/USERNAME/pCloudDrive/
    /usr/bin/killall pcloud
    ;;
  post/*)
    echo "Waking up from $2..."
    ;;
esac

Then a script to run pcloud again when device unlocks if pcloud is not already running (put in autostart)

#!/bin/bash

gdbus monitor -y -d org.freedesktop.login1 |

while read x; do

case "$x" in

*"true"*)

echo "Screen locked at $(date)" >> ~/screenlock_log.txt

;;

*"false"*)

echo "Screen unlocked at $(date)" >> ~/screenlock_log.txt
pcldpid=$(pgrep pcloud)
if [[ -z $pcldpid ]]
  then
    pcloud
    echo "starting pcloud from unlock because it did not exist"
fi

;;

esac

done

Make both executable with chmod +x

The reason why I didn't just start pcloud during post case for systemd script is because it runs before network goes up and then fails, so you have to wait for network to come up (only takes 2 secs or less) hence doing it when unlocking.

This is is obv not elegant but it works and allows sleeping on machine while using pcloud
If anyone has a better solution please share.

Last edited by endor43 (2025-06-03 08:26:47)

Offline

Board footer

Powered by FluxBB