Suspend Not Functioning (XFS Related??)

I have an HP i7 laptop which I dual boot Win7 & TumbleWeed. The laptop has 2 SSDs. The 1st SSD is a Samsung 750GB 840 EVO which contains my Win7 & TW partitions. My TW setup on this SSD contains an EXT4 “/” partition and XFS /home partition. The 2nd SSD is a 1GB Samsung 850 EVO completely formatted with XFS.

I’ve recently had issues getting my laptop to suspend. I’m not sure if it’s coincided with the 4.4 kernel upgrade. But whenever I try to suspend, my system freezes for a minute or two then becomes responsive without actually suspending. After the last attempt I checked journalctl and received what looked like an error related to XFS (I’ve highlighted the interesting parts in red below). Please note that manually unmounting my 2nd drive results in successfully suspending. Anyone have ideas on how to get my laptop to suspend without unmounting first? Is it a kernel bug as it worked flawlessly previously?

Basic TW info:


ME@Tumbleweed:~>uname -a
Linux Tumbleweed.home 4.4.0-2-default #1 SMP PREEMPT Thu Jan 21 07:47:10 UTC 2016 (b56b151) x86_64 x86_64 x86_64 GNU/Linux

Here’s my fstab file:


/dev/sda5       swap    swap    defaults 0 0 
/dev/sda6       /       ext4    acl,user_xattr 1 1 
/dev/sda7       /home   xfs     defaults 1 2 

#Windows
/dev/sda2       /home/ME/Win7 ntfs-3g users,gid=users,fmask=113,dmask=002,locale=en_US.UTF-8 0 0

#Backup
/dev/sdb1       /run/media/ME/Data    xfs     defaults 1 2 

Then when I type the following:


ME@Tumbleweed:~> sudo systemctl suspend
root's password:
A dependency job for suspend.target failed. See 'journalctl -xe' for details.

So naturally I check for details. Below is a snippet of what I see in journalctl


ME@Tumbleweed:~>sudo journalctl -xe


-- The system has now entered the suspend sleep state.
Jan 27 23:24:15 Tumbleweed.home kernel: PM: Syncing filesystems ... done.
Jan 27 23:24:15 Tumbleweed.home kernel: PM: Preparing system for sleep (mem)
Jan 27 23:24:15 Tumbleweed.home kernel: Freezing user space processes ... (elapsed 0.002 seconds) done.
Jan 27 23:24:15 Tumbleweed.home kernel: Freezing remaining freezable tasks ... 
Jan 27 23:24:15 Tumbleweed.home kernel: Freezing of tasks failed after 20.009 seconds (1 tasks refusing to freeze, wq_busy=0):
Jan 27 23:24:15 Tumbleweed.home kernel: xfsaild/sdb1    S ffff880098143e08     0  1117      2 0x00000080
Jan 27 23:24:15 Tumbleweed.home kernel:  ffff880098143e08 0000000000000000 ffff88017e98e180 ffff88017e7c2180
Jan 27 23:24:15 Tumbleweed.home kernel:  ffff880098144000 ffff88017e7c2180 ffffffffa0ca38b0 ffff88025389cbc0
Jan 27 23:24:15 Tumbleweed.home kernel:  0000000000000000 ffff880098143e20 ffffffff816a5cdc 0000000000000000
Jan 27 23:24:15 Tumbleweed.home kernel: Call Trace:
Jan 27 23:24:15 Tumbleweed.home kernel:  <ffffffff816a5cdc>] schedule+0x3c/0x90
Jan 27 23:24:15 Tumbleweed.home kernel:  <ffffffffa0ca3ebd>] xfsaild+0x60d/0x640 [xfs]
Jan 27 23:24:15 Tumbleweed.home kernel:  <ffffffff8109aea9>] kthread+0xc9/0xe0
Jan 27 23:24:15 Tumbleweed.home kernel:  <ffffffff816aa40f>] ret_from_fork+0x3f/0x70
Jan 27 23:24:15 Tumbleweed.home kernel: DWARF2 unwinder stuck at ret_from_fork+0x3f/0x70
Jan 27 23:24:15 Tumbleweed.home kernel: 
Jan 27 23:24:15 Tumbleweed.home kernel: Leftover inexact backtrace:
Jan 27 23:24:15 Tumbleweed.home kernel:  <ffffffff8109ade0>] ? kthread_worker_fn+0x170/0x170
Jan 27 23:24:15 Tumbleweed.home kernel: 
Jan 27 23:24:15 Tumbleweed.home kernel: Restarting kernel threads ... done.
Jan 27 23:24:15 Tumbleweed.home kernel: Restarting tasks ... done.
Jan 27 23:24:15 Tumbleweed.home kernel: video LNXVIDEO:00: Restoring backlight state
Jan 27 23:24:15 Tumbleweed.home kernel: video LNXVIDEO:01: Restoring backlight state
Jan 27 23:24:15 Tumbleweed.home rtkit-daemon[2140]: The canary thread is apparently starving. Taking action.
Jan 27 23:24:15 Tumbleweed.home rtkit-daemon[2140]: Demoting known real-time threads.
Jan 27 23:24:15 Tumbleweed.home rtkit-daemon[2140]: Successfully demoted thread 2149 of process 2139 (/usr/bin/pulseaudio).
Jan 27 23:24:15 Tumbleweed.home rtkit-daemon[2140]: Successfully demoted thread 2148 of process 2139 (/usr/bin/pulseaudio).
Jan 27 23:24:15 Tumbleweed.home rtkit-daemon[2140]: Successfully demoted thread 2139 of process 2139 (/usr/bin/pulseaudio).
Jan 27 23:24:15 Tumbleweed.home rtkit-daemon[2140]: Demoted 3 threads.
Jan 27 23:24:15 Tumbleweed.home kernel: PM: Syncing filesystems ... done.
Jan 27 23:24:15 Tumbleweed.home kernel: PM: Preparing system for sleep (freeze)
Jan 27 23:24:35 Tumbleweed.home kernel: Freezing user space processes ... (elapsed 0.002 seconds) done.
Jan 27 23:24:35 Tumbleweed.home kernel: Freezing remaining freezable tasks ... 
Jan 27 23:24:35 Tumbleweed.home kernel: Freezing of tasks failed after 20.002 seconds (1 tasks refusing to freeze, wq_busy=0):
Jan 27 23:24:35 Tumbleweed.home kernel: xfsaild/sdb1    S ffff880098143e08     0  1117      2 0x00000080
Jan 27 23:24:35 Tumbleweed.home kernel:  ffff880098143e08 0000000000000002 ffff88017e9a2200 ffff88017e7c2180
Jan 27 23:24:35 Tumbleweed.home kernel:  ffff880098144000 ffff88017e7c2180 ffffffffa0ca38b0 ffff88025389cbc0
Jan 27 23:24:35 Tumbleweed.home kernel:  0000000000000000 ffff880098143e20 ffffffff816a5cdc 0000000000000000
Jan 27 23:24:35 Tumbleweed.home kernel: Call Trace:
Jan 27 23:24:35 Tumbleweed.home kernel:  <ffffffff816a5cdc>] schedule+0x3c/0x90
Jan 27 23:24:35 Tumbleweed.home kernel:  <ffffffffa0ca3ebd>] xfsaild+0x60d/0x640 [xfs]
Jan 27 23:24:35 Tumbleweed.home kernel:  <ffffffff8109aea9>] kthread+0xc9/0xe0
Jan 27 23:24:35 Tumbleweed.home kernel:  <ffffffff816aa40f>] ret_from_fork+0x3f/0x70
Jan 27 23:24:35 Tumbleweed.home kernel: DWARF2 unwinder stuck at ret_from_fork+0x3f/0x70
Jan 27 23:24:35 Tumbleweed.home kernel: 
Jan 27 23:24:35 Tumbleweed.home kernel: Leftover inexact backtrace:
Jan 27 23:24:35 Tumbleweed.home kernel:  <ffffffff8109ade0>] ? kthread_worker_fn+0x170/0x170
Jan 27 23:24:35 Tumbleweed.home kernel: 
Jan 27 23:24:35 Tumbleweed.home kernel: Restarting kernel threads ... done.
Jan 27 23:24:35 Tumbleweed.home kernel: Restarting tasks ... done.
Jan 27 23:24:35 Tumbleweed.home kernel: video LNXVIDEO:00: Restoring backlight state
Jan 27 23:24:35 Tumbleweed.home rtkit-daemon[2140]: The canary thread is apparently starving. Taking action.
Jan 27 23:24:35 Tumbleweed.home rtkit-daemon[2140]: Demoting known real-time threads.
Jan 27 23:24:35 Tumbleweed.home rtkit-daemon[2140]: Successfully demoted thread 2149 of process 2139 (/usr/bin/pulseaudio).
Jan 27 23:24:35 Tumbleweed.home rtkit-daemon[2140]: Successfully demoted thread 2148 of process 2139 (/usr/bin/pulseaudio).
Jan 27 23:24:35 Tumbleweed.home rtkit-daemon[2140]: Successfully demoted thread 2139 of process 2139 (/usr/bin/pulseaudio).
Jan 27 23:24:35 Tumbleweed.home rtkit-daemon[2140]: Demoted 3 threads.
Jan 27 23:24:35 Tumbleweed.home kernel: video LNXVIDEO:01: Restoring backlight state
Jan 27 23:24:35 Tumbleweed.home systemd[1]: systemd-suspend.service: Main process exited, code=exited, status=1/FAILURE
Jan 27 23:24:35 Tumbleweed.home systemd[1]: Failed to start Suspend.
-- Subject: Unit systemd-suspend.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit systemd-suspend.service has failed.
-- 
-- The result is failed.
Jan 27 23:24:35 Tumbleweed.home audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-suspend comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Jan 27 23:24:35 Tumbleweed.home systemd[1]: Dependency failed for Suspend.
-- Subject: Unit suspend.target has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit suspend.target has failed.
-- 
-- The result is dependency.
Jan 27 23:24:35 Tumbleweed.home systemd[1]: suspend.target: Job suspend.target/start failed with result 'dependency'.
Jan 27 23:24:35 Tumbleweed.home systemd[1]: sleep.target: Unit not needed anymore. Stopping.
Jan 27 23:24:35 Tumbleweed.home sudo[3047]: pam_unix(sudo:session): session closed for user root
Jan 27 23:24:35 Tumbleweed.home systemd[1]: systemd-suspend.service: Unit entered failed state.
Jan 27 23:24:35 Tumbleweed.home audit[3047]: USER_END pid=3047 uid=0 auid=1000 ses=1 msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_umask,pam_systemd,pam_gnome_keyring,pam_env acct="root" exe="/usr/bin/sudo" hostname=? addr=? t
Jan 27 23:24:35 Tumbleweed.home systemd[1]: systemd-suspend.service: Failed with result 'exit-code'.
Jan 27 23:24:35 Tumbleweed.home audit[3047]: CRED_DISP pid=3047 uid=0 auid=1000 ses=1 msg='op=PAM:setcred grantors=pam_gnome_keyring,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Jan 27 23:24:35 Tumbleweed.home systemd[1]: Stopped target Sleep.
-- Subject: Unit sleep.target has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit sleep.target has finished shutting down.
Jan 27 23:24:35 Tumbleweed.home polkitd[1216]: Unregistered Authentication Agent for unix-process:3048:13978 (system bus name :1.48, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Jan 27 23:25:12 Tumbleweed.home kernel: nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead.
Jan 27 23:26:53 Tumbleweed.home org.kde.KScreen[1799]: kscreen: Primary output changed from KScreen::Output(Id: 124 , Name: "LVDS2" ) ( "LVDS2" ) to KScreen::Output(Id: 124 , Name: "LVDS2" ) ( "LVDS2" )

This is a regression in the xfs code in kernel 4.4. See https://bugzilla.opensuse.org/show_bug.cgi?id=962250 for more details.
The problem is going to be fixed upstream, but this may take a couple of days. I’m using now a self compiled kernel with the patch from bug 962250.

Hendrik

Thank you for the update. I’ll keep my eye out for the fix.