My system is not willing to hibernate when I use that as a shutdown option. It appears my system is going down, but I always end directly back at SDDM. My system hangs when coming out of suspend mode with a black-screen and a mouse pointer. Forcing me to do a hard reset. I’ve been looking with Google, but haven’t found a solution.
# swapon
NAME TYPE SIZE USED PRIO
/dev/sdc1 partition 16.6G 0B -1
Note: Initially the resume device was sdb1, but Partitioner gave back sdc1 as that is the swap device. I updated that setting by running Yast2 Boot-loader.
These sorts of issues can be challenging to diagnose… it may well relate to the graphics driver behaviour. Often a bug report is needed to help resolve these kinds of issues.
Does the following work successfully?
systemctl hibernate
Following an unsuccessful hibernate/thaw cycle you might try examining the journal log from the previous boot with something like
If you really feel like getting your hands dirty and have the required technical knowledge, there is a diagnostic approach described here which consists of a custom service designed to run a script that will capture process kill events and signal events on shutdown, and some scripts to help with this. I’ve never needed to get ‘under the hood’ to do this so can only offer limited guidance. YMMV.
Post the details of your graphics hardware as well
/usr/sbin/hwinfo --gfxcard
egrep "Unload|LoadModule" /var/log/Xorg.0.log
Once experiment to try…
Switch away to another VT eg Ctrl+Alt+F2, login as same user, do
systemctl hibernate
Does that complete successfully? Wake up the computer and when you finally get the prompt switch back to the graphical desktop session with Ctrl+Alt+F7
If that works, we should be able to automate it with a systemd script in installed in the /usr/lib/systemd/system-sleep/ directory.
It is invoked when hibernating/suspending, and again on resuming/thawing…
#!/bin/bash
case $1 in
pre)
#sleeping
chvt 2
echo "Going to sleep..."
sleep 2
;;
post)
#wakeup
echo "Waking again..."
sleep 2
chvt 7
;;
esac
For more info…
man man systemd-suspend.service
This will only be useful for those who find that they can hibernate (or suspend) successfully from a VT console, but not from a graphical session. Some users with AMD graphics (and proprietary driver) find this is the case.
No the first time I did that I got back to SDDM directly.
I now did it again and my system was frozen. After resetting my system I was expecting to come back in my pre-hibernation state, but that was not the situation, only Grub was skipped upon boot.
sudo journalctl --boot=-1 | tail -n120
Aug 15 16:04:44 MyOS sudo[3239]: tneo : TTY=pts/0 ; PWD=/home/tneo ; USER=root ; COMMAND=/usr/bin/systemctl hibernate
Aug 15 16:04:44 MyOS sudo[3239]: pam_unix(sudo:session): session opened for user root by tneo(uid=0)
Aug 15 16:04:44 MyOS sudo[3239]: pam_systemd(sudo:session): Cannot create session: Already running in a session
Aug 15 16:04:44 MyOS sudo[3239]: pam_unix(sudo:session): session closed for user root
Aug 15 16:04:44 MyOS systemd[1]: Reached target Sleep.
Aug 15 16:04:44 MyOS systemd[1]: Starting Hibernate...
Aug 15 16:04:45 MyOS kernel: PM: Hibernation mode set to 'platform'
Aug 15 16:04:45 MyOS systemd-sleep[3254]: INFO: running /usr/lib/systemd/system-sleep/grub2.sleep for hibernate
Aug 15 16:04:45 MyOS systemd-sleep[3254]: INFO: Running prepare-grub ..
Aug 15 16:04:45 MyOS systemd-sleep[3254]: running kernel is grub menu entry openSUSE Leap 42.3 (vmlinuz-4.4.79-4-default)
Aug 15 16:04:45 MyOS systemd-sleep[3254]: preparing boot-loader: selecting entry openSUSE Leap 42.3, kernel /boot/4.4.79-4-default
Aug 15 16:04:45 MyOS systemd-sleep[3254]: running /usr/sbin/grub2-once "openSUSE Leap 42.3"
Aug 15 16:04:45 MyOS systemd-sleep[3254]: time needed for sync: 0.3 seconds, time needed for grub: 0.1 seconds.
Aug 15 16:04:45 MyOS systemd-sleep[3254]: INFO: Done.
Aug 15 16:04:45 MyOS systemd-sleep[3254]: Suspending system...
19.262] (II) LoadModule: "glx"
19.280] (II) LoadModule: "radeon"
19.283] (II) LoadModule: "fglrx"
19.284] (II) UnloadModule: "fglrx"
19.284] (II) Unloading fglrx
19.284] (II) LoadModule: "ati"
19.476] (II) LoadModule: "modesetting"
19.479] (II) LoadModule: "fbdev"
19.480] (II) LoadModule: "vesa"
19.527] (II) LoadModule: "fbdevhw"
19.561] (II) LoadModule: "fb"
19.563] (II) LoadModule: "dri2"
19.563] (II) LoadModule: "glamoregl"
20.015] (II) LoadModule: "ramdac"
20.015] (II) UnloadModule: "modesetting"
20.015] (II) Unloading modesetting
20.015] (II) UnloadModule: "fbdev"
20.015] (II) Unloading fbdev
20.015] (II) UnloadSubModule: "fbdevhw"
20.015] (II) Unloading fbdevhw
20.015] (II) UnloadModule: "vesa"
20.016] (II) Unloading vesa
20.353] (II) LoadModule: "libinput"
The same happened. System seems to be switching off (as expected), but is not responding to me pressing the power button or any other input. I need to press the reset button to switch my system back on.
Strange. You seem to have the proprietary (and deprecated) ‘fglrx’ driver present, but it doesn’t work on Leap 42.2+, and not surprisingly it is unloaded and the open source radeon driver used instead. Hopefully, others can advise further here.
I’m at the limits of my knowledge here, but perhaps the amdgpu driver (open source graphics driver for the latest AMD Radeon graphics cards) might be an option worth considering? I honestly don’t know whether it will change the hibernation behaviour or not. However, if you’re not adverse to experimentation and reverting if necessary… …then keep reading…
There was a recent thread discussing this driver, and in particular this post described how to install the latest stable kernel and upgrade the Xorg stack (which will be needed to support the “Kaveri [Radeon R7 Graphics]” chipset).
I was in two minds about suggesting it (I don’t have experience with doing this or AMD hardware to play with), but nothing ventured nothing gained, so I’ll be interested in your results. You might try doing nothing more than upgrading the kernel to start with, before taking the additional steps to use the amdgpu driver. Hopefully, others can advise further here.
I upgraded to the 4.12 kernel with success (fixes another issue I had). So that was done.
I followed the other steps as suggested in the post.
After reboot I get the following output for: /sbin/lspci -nnk | grep -A3 VGA
00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Kaveri [Radeon R7 Graphics] [1002:1313]
Subsystem: ASUSTeK Computer Inc. Device [1043:85cb]
Kernel driver in use: radeon
Kernel modules: radeon, amdgpu
So the kernel module is loaded, but the driver is not.
I then continued with the suggested steps to fix:
Added radeon to the blacklist.
Added the suggested 20-amdgpu.conf file
Ran mkinitrd (I saved the screen output to a file if handy)
After reboot I don’t get anywhere, falling to prompt. I reverted changes and got back into X again.
I did not upgrade the X-stack. I was not sure that the X repo was more up to date than my 42.3 install. If that would be the case I can give it another shot.
With regards to the hibernation issue:
It goes into sleep mode and after a few seconds it provides me SDDM to log-in. So there is some improvement as the freeze is gone.