Debian Stretch does not resume from hibernate

Getting your soundcard to work, using Debian on non-i386 hardware, etc

Debian Stretch does not resume from hibernate

Postby centavrvs » 2018-11-01 16:38

Hi everyone,

I'm having trouble with resuming from hibernation in Debian Stretch:

Going into hibernation mode works fine. However, the system either freezes on resume or restarts.

Here are screenshots of the system state before it crashes.
[list=]
[*] With no_console_suspend boot parameter:
http://alcore.de/kram/crash1.JPG
[*] With no_console_suspend and initcall_debug parameters:
http://alcore.de/kram/crash2.JPG
[/list]

My hardware is an Intel Core 2 (32 bit) with an NVIDIA graphics card. The PC is about 10 years old and the hardware was pretty standard back then.

OS is a pretty new Debian Stretch. I am using the nouveau drivers, and I have the firmware-linux-nonfree and firmware-misc-nonfree packages installed. My swap partition is about 10 GB large while I have 4 GB of RAM.

I have spent hours of researching on possible solutions. Here are a few things I have tried without success

[list=]
[*] using the 4.17 or 4.18 kernel from stretch-backports
[*] using the proprietary NVIDIA drivers
[*] unplugging all my USB hardware
[*] Modifying config files to point the system to the place where the image is stored. The boot messages tell me that the image is found and decompressed successfully though, so I removed these modifications again.
[*] At some point, I got a different error message saying something about "uhci_hcd". Unfortunately, I don't have a screenshot and cannot reproduce it. However, I tried the script from

http://chriseiffel.com/uncategorized/ho ... 4-mint-11/

and added "uhci" to the DRIVERS variable. This created a different error message:
http://alcore.de/kram/host_controller.JPG
I rather have the feeling that this script introduced a new problem, however.
[/list]

Any help would be greatly appreciated.

Yours,

centavrvs
centavrvs
 
Posts: 3
Joined: 2018-10-31 22:39

Re: Debian Stretch does not resume from hibernate

Postby bw123 » 2018-11-01 17:07

I did not know about those two kernel parameters, thanks.

Maybe irrelevant, but how are you calling hibernate? Is the problem only with hibernate, or suspend too? Before trying to script a solution, I'd probably try manually remove certain modules from cli, then test. Or killing certain processes relating to power. I wouldn't know which ones to try first. It could be some other things, like backlights or other doodads that aren't present that the system tries to restore on wake/resume anyway. Are you using pkg upower? Have you tried hibernate/suspend from single user mode?

I took a look at crash2.jpg (6mb) but didn't see that it would be very helpful.

I've spent hours on this before as well, it's unfortunate. I have always been able to solve it eventually though.
User avatar
bw123
 
Posts: 3522
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Debian Stretch does not resume from hibernate

Postby centavrvs » 2018-11-01 21:10

bw123 wrote:I did not know about those two kernel parameters, thanks.

Maybe irrelevant, but how are you calling hibernate? Is the problem only with hibernate, or suspend too? Before trying to script a solution, I'd probably try manually remove certain modules from cli, then test. Or killing certain processes relating to power. I wouldn't know which ones to try first. It could be some other things, like backlights or other doodads that aren't present that the system tries to restore on wake/resume anyway. Are you using pkg upower? Have you tried hibernate/suspend from single user mode?

I took a look at crash2.jpg (6mb) but didn't see that it would be very helpful.

I've spent hours on this before as well, it's unfortunate. I have always been able to solve it eventually though.


Thanks alot for your reply. I checked that the package upower is installed. I assume that this is the default configuration as I did not install it myself.

As for backlights etc., this is a PC without any special hardware that should be causing problems. I've also made sure that the hardware configuration does not change between hibernate and resume (i.e., I don't plug in/unplug anything).

I ran the following tests:

First, suspend is not working either.

Second, I tried both hibernate and suspend from recovery mode (which is the same as single user mode?) by calling systemctl hibernate/suspend. Still not working.

In recovery mode, there are about 300 processes running. I'm afraid to kill any of them since I suspect that it should be a minimal setup anyway.

Third, I have tried blacklisting as many hardware-related kernel modules as possible. I tested hibernate/suspend from recovery mode once again and it did not work.

Here is the remaining list of kernel modules (lsmod output):
Code: Select all
Module                  Size  Used by
fuse                   90112  17
evdev                  20480  0
serio_raw              16384  0
sg                     32768  0
rng_core               16384  0
shpchp                 32768  0
button                 16384  0
ppdev                  20480  0
lp                     20480  0
parport                40960  2 lp,ppdev
ip_tables              20480  0
x_tables               20480  1 ip_tables
autofs4                36864  2
ext4                  499712  2
crc16                  16384  1 ext4
jbd2                   77824  1 ext4
crc32c_generic         16384  4
fscrypto               24576  1 ext4
ecb                    16384  0
xts                    16384  0
lrw                    16384  0
gf128mul               20480  2 lrw,xts
ablk_helper            16384  0
cryptd                 20480  1 ablk_helper
aes_i586               20480  0
mbcache                16384  3 ext4
hid_generic            16384  0
usbhid                 45056  0
hid                    94208  2 hid_generic,usbhid
sr_mod                 24576  0
cdrom                  49152  1 sr_mod
sd_mod                 40960  14
ata_generic            16384  0
i2c_i801               24576  0
i2c_smbus              16384  1 i2c_i801
ata_piix               32768  11
libata                192512  2 ata_piix,ata_generic
scsi_mod              180224  4 sd_mod,libata,sr_mod,sg
ehci_pci               16384  0
uhci_hcd               40960  0
ehci_hcd               65536  1 ehci_pci
atl2                   28672  0
usbcore               184320  4 usbhid,ehci_hcd,uhci_hcd,ehci_pci
usb_common             16384  1 usbcore

The USB and HID modules are on the blacklist, but they are loaded anyway for some reason. Any idea which modules I should try removing or how to blacklist the USB/HID stuff?

(edit): This is the blacklist file which I used:
Code: Select all
blacklist iTCO_wdt
blacklist iTCO_vendor_support
blacklist nouveau
blacklist joydev
blacklist mxm_wmi
blacklist wmi
blacklist video
blacklist ttm
blacklist drm_kms_helper
blacklist drm
blacklist coretemp
blacklist kvm
blacklist kvm_intel
blacklist snd_hda_coded_realtek
blacklist snd_hda_codec_generic
blacklist fb_sys_fops
blacklist snd_hda_intel
blacklist syscopyarea
blacklist snd_hda_codec
blacklist c_realtek
blacklist sysfillrect
blacklist snd_hda_core
blacklist sysimgblt
blacklist lpc_ich
blacklist irqbypass
blacklist snd_ens1371
blacklist snd_ac97_codec
blacklist ac97_bus
blacklist pcspkr
blacklist gameport
blacklist snd_rawmidi
blacklist snd_seq_device
blacklist snd_hwdep
blacklist snd_pcm
blacklist snd_timer
blacklist snd
blacklist soundcore
blacklist asus_atk0110
blacklist acpi_cpufreq
blacklist parport_pc
blacklist sunrpc
blacklist usbhid
blacklist sr_mod
blacklist cdrom
blacklist i2c_i801
blacklist i2c_smbus
blacklist ehci_pci
blacklist uhci_hcd
blacklist ehci_hcd
blacklist atl2
blacklist usbcore
blacklist usb_common
centavrvs
 
Posts: 3
Joined: 2018-10-31 22:39

Re: Debian Stretch does not resume from hibernate

Postby bw123 » 2018-11-02 10:42

I don't think using a blacklist like that is the best way to solve it. I would try undoing all that, boot normally to single user mode, kill the upower process and anything else related to power, and try systemctl suspend. I don't know why you'd have 300 or so processes running in single user, that seems kind of high, but I dunno. I guess 'default configuration' means you installed gnome? On problem machines, sometimes I slice off a partition and do a minimal install with only 'standard utilities' or whatever it is called, boot it up and test, no X, no desktop.

You might look for example in /sys/class/backlight and /sys/class/leds and if there are doodads there that don't exist like keyboard backlight or others, that could be a clue. That caused a similar issue on my dell, for whatever reason upower has a bunch of stuff that runs on power events by default, like keyboard backlight, even if you don't have one. From memory, this is somewhere around /etc/dbus-1/system.d/ You can selectively comment out some of the entries and test, it is very time-consuming.

I gave up on this upower pkg and org.freedesktop garbage because it is too complex. Bugs get reported but not fixed, new versions add new bugs that get reported and not fixed, etc.. it's a big waste of time trying to maintain. The devs seem to pass the buck claiming it is someone elses problem. I'd highly recommend a window manager setup instead.

It could be a video card issue, so be sure and do a good search for the problem on your specific graphics hardware.

It's going to be quicker to diagnose on suspend than hibernate. Maybe not much if you have to reboot each time, but saves a write to disk.

Another thing I recall working for some people is using the older pm-utils pkg, and testing it's hibernate/suspend action. pm-utils doesn't integrate with the desktop environments, and it really shouldn't be needed because systemd handles suspend and hibernate pretty well by itself IME. There's also a trick where you can echo to /sys/power/state and that has helped some people narrow down the issue.
User avatar
bw123
 
Posts: 3522
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Debian Stretch does not resume from hibernate

Postby centavrvs » 2018-11-04 14:08

bw123 wrote:I don't think using a blacklist like that is the best way to solve it. I would try undoing all that, boot normally to single user mode, kill the upower process and anything else related to power, and try systemctl suspend. I don't know why you'd have 300 or so processes running in single user, that seems kind of high, but I dunno. I guess 'default configuration' means you installed gnome? On problem machines, sometimes I slice off a partition and do a minimal install with only 'standard utilities' or whatever it is called, boot it up and test, no X, no desktop.

You might look for example in /sys/class/backlight and /sys/class/leds and if there are doodads there that don't exist like keyboard backlight or others, that could be a clue. That caused a similar issue on my dell, for whatever reason upower has a bunch of stuff that runs on power events by default, like keyboard backlight, even if you don't have one. From memory, this is somewhere around /etc/dbus-1/system.d/ You can selectively comment out some of the entries and test, it is very time-consuming.

I gave up on this upower pkg and org.freedesktop garbage because it is too complex. Bugs get reported but not fixed, new versions add new bugs that get reported and not fixed, etc.. it's a big waste of time trying to maintain. The devs seem to pass the buck claiming it is someone elses problem. I'd highly recommend a window manager setup instead.

It could be a video card issue, so be sure and do a good search for the problem on your specific graphics hardware.

It's going to be quicker to diagnose on suspend than hibernate. Maybe not much if you have to reboot each time, but saves a write to disk.

Another thing I recall working for some people is using the older pm-utils pkg, and testing it's hibernate/suspend action. pm-utils doesn't integrate with the desktop environments, and it really shouldn't be needed because systemd handles suspend and hibernate pretty well by itself IME. There's also a trick where you can echo to /sys/power/state and that has helped some people narrow down the issue.


Thank you for your detailled input. I will run the suggested tests once I find the time.

Also, I am starting to suspect that my hardware has some issues. I am experiencing infrequent system freezes, and I am also having trouble with other OS's. Maybe it's about time to get some new gear ...
centavrvs
 
Posts: 3
Joined: 2018-10-31 22:39


Return to Hardware

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable