libfuse / sshfs

A network filesystem client to connect to SSH servers
GNU General Public License v2.0
5.73k stars 488 forks source link

Keeps system from suspending #279

Open paulmenzel opened 2 years ago

paulmenzel commented 2 years ago

Linux’s FUSE maintainer suggests to disconnect any mounts when suspending:

Can this be worked around?

Yes, killing the sshfs process will enable the suspend to continue.

I suspect it would make sense for the suspend scritps to perform this by default, since the ssh connection will likely be broken anyway after resuming.

Could such suspend scripts be provided?

Nikratio commented 2 years ago

killall sshfs doesn't seem to need a special script...

porg commented 2 years ago

Related if not duplicate issue: #137

porg commented 2 years ago

FYI: On macOS SSHFS / FUSE do not create an assertion to stay awake. This itself does not say that sleep/standby/wake works flawlessly. I just say that the typical mechanism in which background processes block sleep (by pmset assertions) is not used from SSHFS / FUSE.

11.6.5 Big Sur • SSHFS version 2.10 • FUSE library version: 2.9.9

➜  pmset -g assertions

Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  1
   PreventUserIdleSystemSleep     1
   NetworkClientActive            0
Listed by owning process:
   pid 221(coreaudiod): [0x0003833e00019b6f] 06:01:18 PreventUserIdleSystemSleep named: "com.apple.audio.AppleHDAEngineOutput:1B,0,1,1:0.context.preventuseridlesleep"  
    Created for PID: 17014. 
   pid 101(powerd): [0x000017b6000884ea] 144:51:09 ExternalMedia named: "com.apple.powermanagement.externalmediamounted"  
   pid 160(WindowServer): [0x0003ca840009a369] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle serviceID:100000818 name:AppleEmbeddedKeyboa product:Apple Internal Keyb eventType:3"  
    Timeout will fire in 240 secs Action=TimeoutActionRelease
   pid 418(sharingd): [0x0003d79d0001a57b] 00:01:20 PreventUserIdleSystemSleep named: "Handoff"  
   pid 17014(Music): [0x0003833e00019b7e] 06:01:18 PreventUserIdleSystemSleep named: "com.apple.Music.playback"  
No kernel assertions.
Idle sleep preventers: IODisplayWrangler