System suddenly wont suspend/wake while any smb are mounted?

One guess is that the wifi is shutoff before the smb mounts has been unmounted thus causing your system to hang when waking up as there is no network connection until your system is fully operable after the suspension.

Usually a matter of configuration and one of the reason I avoid system supension when having network mounts active.

Create units for your smb moutns - instead of fstab mounts.

See → [root tip] [How To] Use systemd to mount ANY device
And → [root tip] [How To] systemd mount unit samples

The steps

  1. Unmount your smb mounts
  2. Comment your smb mount in fstab
  3. Create mount unit for each smb mount
    • follow the rules
      • don’t be tempted to use your home or /mnt
      • create a new tree from root folder containing your mountpoints
      • e.g. /a/smb1
      • name the units according to the mountpoint
        • a-smb1.mount
        • a-smb1.automount
    • test the mount units
    • ensure the mount units are stopped and disabled
  4. Create a complimentary automount unit for each smb mount
    • start and enable the automount units

The benefits are obvious

  • automount will activate the mount unit when you access the mountpoint
  • automount will unmount when no longer accessed (defined inactivity in automount unit)

The end result is that your system will resume succesfully from a suspend.

Another approach is to use small gvfs mount scripts.

See → [root tip] [Utility Script] GIO mount samba share
And a mogrified version → Re: [Utility Script] GIO mount samba share - #3 by pheiduck

1 Like