Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
No input devices on return from hibernation
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2951
Location: Illinois, USA

PostPosted: Fri Jun 26, 2015 2:28 am    Post subject: No input devices on return from hibernation Reply with quote

On return from hibernation, the screen is shown with the programs that were running when hibernating, i.e. two terminals and Firefox. No mouse, no keyboard and can't ssh in from another PC on the LAN. Screen looks great though.

Kernel 4.0.5, tried both gentoo-sources and tuxonice-sources. OpenRC eudev xdm & Mate. Nouveau driver on EVGA GeForce 8400GS video card.

Mobo Gigabyte GA-880GA-UD3H
CPU Socket M3 Phenom II X6 1090T
Memory 8G DDR3

Followed seven year old wiki howto on tuxonice. rtcwake works with -m off, but with -m at mem or disk, the same thing happens.

Dual booting with XP. Hibernation and Standy work fine with XP, so the hardware is capable.

Any advice on how to troubleshoot this? Any data that I can provide?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7070
Location: almost Mile High in the USA

PostPosted: Fri Jun 26, 2015 7:22 pm    Post subject: Reply with quote

A lot of these problems are motherboard specific unfortunately as there aren't a whole bunch of options... Plus unless Gigabyte is Linux friendly, since Windows works, they won't care about Linux... Are you using the latest BIOS?

So the computer looks completely dead on resume except the screen is like it was before suspend? Are the keyboard LEDs flashing if you have a PS/2 keyboard?

I suppose suspend works properly however?

Are the two kernel sources you used both 4.0.5? Tried a different version (3.x perhaps?)

(Speaking from a "works for me" perspective... though I have not upgraded to 4.0.5 yet. I'm still using a 3.1x era Gentoo-sources which works for my machines.)
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2951
Location: Illinois, USA

PostPosted: Fri Jun 26, 2015 8:56 pm    Post subject: Reply with quote

Yes, I'm using the latest BIOS which is several years old.

I have a PS/2 keyboard. On resume, no lights at all. Although the BIOS is set to resume on any keypress r mouse double-click, neither works. I restart by power button, just a quick press, when four seconds is supposed to be required for reboot. Tuxonice actually asks me if I want to resume (press keybar) or cancel (Press C). I press the key bar but that's the last time it responds. Either with or without tuxonice, the keyboard works to continue booting until the screen comes up.

Both kernel sources were 4.0.5. I have just tried with 3.19.0 and it is even uglier. The boot process stops and the screen goes green.

Heres the grub lines:
Quote:
#
title=Gentoo Linux (4.0.5-tuxonice)
root (hd1,0)
kernel /kernel-genkernel-x86_64-4.0.5-tuxonice vga=0x314 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sdb3 real_resume=/dev/sdb2 tuxonice_resume=/dev/sdb2 acpi_osi=Linux agp=o$
initrd /initramfs-genkernel-x86_64-4.0.5-tuxonice vga=893


#
title=Gentoo Linux (4.0.5-gentoo)
root (hd1,0)
kernel /kernel-genkernel-x86_64-4.0.5-gentoo vga=0x314 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sdb3 agp=off acpi_osi=Linux udev
initrd /initramfs-genkernel-x86_64-4.0.5-gentoo vga=893




Here is the output of acpitool -e
Code:
  Kernel version : 4.1.0-gentoo   -    ACPI version : 20150410
  -----------------------------------------------------------
  Battery status : <not available>

  AC adapter     : <info not available or off-line>
  Fan            : <not available>

  CPU type               : AMD Phenom(tm) II X6 1090T Processor
  Min/Max frequency      : 800/3200 MHz
  Current frequency      : 800 MHz
  Frequency governor     : ondemand
  Freq. scaling driver   : acpi-cpufreq
  Cache size             : 800.000 KB
  Bogomips               : 6428.43
  Bogomips               : 6428.43
  Bogomips               : 6428.43
  Bogomips               : 6428.43
  Bogomips               : 6428.43
  Bogomips               : 6428.43
  Function Show_CPU_Info : could not read directory /proc/acpi/processor/
  Make sure your kernel has ACPI processor support enabled.

  Thermal info   : <not available>

   Device   S-state     Status   Sysfs node
  ---------------------------------------
  1. PCI0     S5   *disabled  no-bus:pci0000:00
  2. USB0     S3   *enabled   pci:0000:00:12.0
  3. USB1     S3   *enabled   pci:0000:00:12.2
  4. USB2     S3   *enabled   pci:0000:00:13.0
  5. USB3     S3   *enabled   pci:0000:00:13.2
  6. USB4     S3   *enabled   pci:0000:00:16.0
  7. USB5     S3   *enabled   pci:0000:00:16.2
  8. USB6     S3   *enabled   pci:0000:00:14.5
  9. SBAZ     S4   *disabled  pci:0000:00:14.2
  10. PEX0     S5   *disabled  pci:0000:00:15.0
  11. PEX1     S5   *disabled  pci:0000:00:15.1
  12. PEX2     S5   *disabled
  13. PEX3     S5   *disabled
  14. P2P     S5   *disabled  pci:0000:00:14.4
  15. PCE2     S4   *disabled  pci:0000:00:02.0
  16. PCE3     S4   *disabled
  17. PCE4     S4   *disabled
  18. PCE5     S4   *disabled
  19. PCE6     S4   *disabled
  20. PCE7     S4   *disabled
  21. PCE9     S4   *disabled  pci:0000:00:09.0
  22. PCEA     S4   *disabled  pci:0000:00:0a.0
  23. PCEB     S4   *disabled
  24. PCEC     S4   *disabled
  25. PS2M     S5   *disabled
  26. PS2K     S5   *disabled

And the kernel params are here (4.0.5 tuxonice) https://bpaste.net/show/d7e2ce25d86b
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7070
Location: almost Mile High in the USA

PostPosted: Fri Jun 26, 2015 10:20 pm    Post subject: Reply with quote

I've never used tuxonice, just the built-in which seems to hibernate just fine... I'm kind of confused which variations you're using, and unfortunately I don't know if tuxonice has any recent issues with recent machines or not.

The in-kernel hibernate goes completely to S5 so you will need to use the power switch to resume. Also the in-kernel hibernate does not accept any keyboard commands from when it starts loading the image (optionally, in initramfs, unless the spacebar/etc cmd is taken from initramfs instead of the kernel) until restore state completes... so I suspect all your experiments were on tuxonice?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2951
Location: Illinois, USA

PostPosted: Fri Jun 26, 2015 11:10 pm    Post subject: Reply with quote

No, tuxonice was the last thing I tried. I did get rtcwake going by adding the acpi_osi=linux parameter to the boot file. I have another system, pure Gentoo that has an MSI board that will neither hibernate/suspend nor rtcwake. It will wake on lan, although that took a bit of work too. I thought it easiest to start with the computer that does do all those things with Windows.

I'm rather bothered by that "Function Show_CPU_Info : could not read directory /proc/acpi/processor/
Make sure your kernel has ACPI processor support enabled. " from acpitools. AFAIK, it IS enabled in the kernel. Perhaps I need to force it on the command line?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7070
Location: almost Mile High in the USA

PostPosted: Fri Jun 26, 2015 11:28 pm    Post subject: Reply with quote

For software hibernation in Linux, I don't think it actually needs firmware/ACPI support. S3 suspend, however, ACPI firmware support is necessary.

For recent versions of Linux I've found most of my boards/machines work just fine with the in-kernel hibernate-to-disk. The problematic components tends to be the video card for closed source, but since you're using nouveau it should work. Most of my machines are using Intel video, unsure if more regression testing by the kernel devs were done on this hardware set...

The error you're getting may be due to the acpitool being out of date, as most of this data migrated from /proc/acpi to /sys somewhere... You can enable "legacy acpi /proc/acpi" support in the kernel to make it show up.

I'd want to make sure you're seeing a complete hang versus all your input devices are dead upon resume... Can you ascertain that? (perhaps run some animated gif before hibernating?)
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2951
Location: Illinois, USA

PostPosted: Sat Jun 27, 2015 12:21 pm    Post subject: Reply with quote

A very good suggestion, eccerr0r! Running kernel 4.0.5, gentoo-sources, not tuxonice, I ran a video in xine, with the sound on. On return from s2ram, the video was frozen with no sound.
On return from s2disk, it appeared to be a normal boot. I had to log in and there was no trace of the xine or terminal windows.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7070
Location: almost Mile High in the USA

PostPosted: Sat Jun 27, 2015 12:44 pm    Post subject: Reply with quote

Ok it looks like your machine is totally hanging. Can you suspend to ram when not in graphics mode? Run 'top' or something once again that changes.

It looks like your suspend to disk (or at least the resume part) is not setup properly...hmm... in-kernel resume from hibernation requires resume=/dev/sdb2, might need to add that along with real_resume (is this a "real" option?), tuxonice_resume.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2951
Location: Illinois, USA

PostPosted: Sat Jun 27, 2015 9:46 pm    Post subject: Reply with quote

I found this troubleshooting guide:https://www.kernel.org/doc/Documentation/power/basic-pm-debugging.txt
I ran the tests and everything was fine. the computer shutdown and came back five seconds later with no trouble, but won't from s2ram or s2disk.
After yet another unsuccesful attempt, I found this in /var/log/debug
Quote:
Jun 27 10:34:44 CASTI kernel: pci 0000:01:00.0: Video device with shadowed ROM
Jun 27 10:34:44 CASTI kernel: PCI: CLS 4 bytes, default 64
Jun 27 10:34:44 CASTI kernel: ahci 0000:00:11.0: version 3.0
Jun 27 10:34:44 CASTI kernel: PM: Checking hibernation image partition /dev/sdb2
Jun 27 10:34:44 CASTI kernel: sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
Jun 27 10:34:44 CASTI kernel: sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
Jun 27 10:34:44 CASTI kernel: sr 6:0:0:0: Attached scsi CD-ROM sr0
Jun 27 10:34:44 CASTI kernel: sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
Jun 27 10:34:44 CASTI kernel: sr 6:0:1:0: Attached scsi CD-ROM sr1
Jun 27 10:34:44 CASTI kernel: PM: Hibernation image partition 8:18 present
Jun 27 10:34:44 CASTI kernel: PM: Looking for hibernation image.
Jun 27 10:34:44 CASTI kernel: PM: Image not found (code -22)
Jun 27 10:34:44 CASTI kernel: PM: Hibernation image not present or could not be loaded.
Jun 27 10:34:44 CASTI kernel: QUIRK: Enable AMD PLL fix
Jun 27 10:34:44 CASTI kernel: PM: Hibernation image partition 8:18 present
Jun 27 10:34:44 CASTI kernel: PM: Looking for hibernation image.
Jun 27 10:34:44 CASTI kernel: PM: Image not found (code -22)
Jun 27 10:34:44 CASTI kernel: PM: Hibernation image not present or could not be loaded.
Jun 27 10:34:44 CASTI kernel: checking generic (cf000000 e00000) vs hw (b0000000 10000000)
Jun 27 10:34:44 CASTI kernel: checking generic (cf000000 e00000) vs hw (ce000000 2000000)


Thinking that maybe the kernel can't compress my 8GB memory into a 2GB partition, I switched to a swap file with this grub line:
Quote:
title=Gentoo Linux (4.0.6-gentoo)
root (hd1,0)
kernel /kernel-genkernel-x86_64-4.0.6-gentoo vga=0x314 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sdb3 resume=/dev/sdb3 real_resume=/dev/sdb3 resume offset = 29044736 acpi_osi=Linux agp=off
initrd /initramfs-genkernel-x86_64-4.0.6-gentoo resume=/dev/sdb3 resume offset = 29044736 vga=893


Upon reboot:
Quote:
Jun 27 15:25:22 CASTI kernel: PCI: CLS 4 bytes, default 64
Jun 27 15:25:22 CASTI kernel: ahci 0000:00:11.0: version 3.0
Jun 27 15:25:22 CASTI kernel: PM: Checking hibernation image partition /dev/sdb3
Jun 27 15:25:22 CASTI kernel: sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
Jun 27 15:25:22 CASTI kernel: sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
Jun 27 15:25:22 CASTI kernel: sr 6:0:0:0: Attached scsi CD-ROM sr0
Jun 27 15:25:22 CASTI kernel: sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
Jun 27 15:25:22 CASTI kernel: sr 6:0:1:0: Attached scsi CD-ROM sr1
Jun 27 15:25:22 CASTI kernel: PM: Hibernation image partition 8:19 present
Jun 27 15:25:22 CASTI kernel: PM: Looking for hibernation image.
Jun 27 15:25:22 CASTI kernel: PM: Image not found (code -22)
Jun 27 15:25:22 CASTI kernel: PM: Hibernation image not present or could not be loaded.
Jun 27 15:25:22 CASTI kernel: QUIRK: Enable AMD PLL fix
Jun 27 15:25:22 CASTI kernel: PM: Hibernation image partition 8:19 present
Jun 27 15:25:22 CASTI kernel: PM: Looking for hibernation image.
Jun 27 15:25:22 CASTI kernel: PM: Image not found (code -22)
Jun 27 15:25:22 CASTI kernel: PM: Hibernation image not present or could not be loaded.
Jun 27 15:25:22 CASTI kernel: checking generic (cf000000 e00000) vs hw (b0000000 10000000)
Jun 27 15:25:22 CASTI kernel: checking generic (cf000000 e00000) vs hw (ce000000 2000000)


Wish I knew what code -22 meant.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7070
Location: almost Mile High in the USA

PostPosted: Sat Jun 27, 2015 11:54 pm    Post subject: Reply with quote

Make sure it's resume_offset=xxxx without spaces...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2951
Location: Illinois, USA

PostPosted: Sun Jun 28, 2015 4:47 pm    Post subject: Reply with quote

eccerr0r wrote:
Make sure it's resume_offset=xxxx without spaces...


Good catch! But fixing that didn't help either. I delved into the kernel code and found the -22 was really -EINVAL. Then I put a pr_debug statement at every return of EINVAL to see what was triggering it. Here's from the latest /var/log/debug:
Quote:
Jun 28 10:31:35 CASTI kernel: PM: Checking hibernation image partition /dev/sdb2
Jun 28 10:31:35 CASTI kernel: sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
Jun 28 10:31:35 CASTI kernel: sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
Jun 28 10:31:35 CASTI kernel: sr 6:0:0:0: Attached scsi CD-ROM sr0
Jun 28 10:31:35 CASTI kernel: sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
Jun 28 10:31:35 CASTI kernel: sr 6:0:1:0: Attached scsi CD-ROM sr1
Jun 28 10:31:35 CASTI kernel: PM: Hibernation image partition 8:18 (major:minor) present
Jun 28 10:31:35 CASTI kernel: PM: Looking for hibernation image.
Jun 28 10:31:35 CASTI kernel: PM: ERROR - wrong signature should be S1SUSPEND but is SWAPSPACE2 at line 1471 file kernel/power/swap.c
Jun 28 10:31:35 CASTI kernel: PM: Image signature NOT found
Jun 28 10:31:35 CASTI kernel: PM: Image not found (code -22) 0xffffffea
Jun 28 10:31:35 CASTI kernel: PM: swsusp_check failed 0xffffffea -22
Jun 28 10:31:35 CASTI kernel: PM: Hibernation image not present or could not be loaded.


Major 8, minor 18 is indeed /dev/sdb2. I changed back to swap partition from sawpfile when I found that I am actually using 675M of my 8G memory which should fit on the 1.9G swap partition even without compression.

It would appear that s2disk should be writing a signature (or is it the kernel?) but is failing to do so.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7070
Location: almost Mile High in the USA

PostPosted: Sun Jun 28, 2015 5:08 pm    Post subject: Reply with quote

I'd suppose the signature for the different versions of suspend (tuxonice, default in-kernel, etc.) needs to match the same version as you hibernated on. Make sure you don't have them mixed up (can't resume a tuxonice image with in-kernel hibernate, etc.)

Perhaps it was an old suspend experiment that still had the signature written but never got cleared from a successful resume?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2951
Location: Illinois, USA

PostPosted: Tue Jun 30, 2015 10:00 pm    Post subject: Reply with quote

After examining the source code for suspend-1.0 and kernel/power/swap.c, I concluded that the signatures were incompatible. I switched to the later hibernate-script package which resulted in:
Quote:
Jun 30 16:48:44 CASTI kernel: PM: Hibernation image partition 8:18 present
Jun 30 16:48:44 CASTI kernel: PM: Looking for hibernation image.
Jun 30 16:48:44 CASTI kernel: PM: ERROR - wrong signature should be S1SUSPEND but is ULSUSPEND at line 1471 file kernel/power/swap.c
Jun 30 16:48:44 CASTI kernel: PM: Image signature NOT found
Jun 30 16:48:44 CASTI kernel: PM: Image not found (code -22)


i.e. the kernel is looking for the S1SUSPEND signature but the script is providing ULSUSPEND (userland suspend?). I followed the Arch wiki because there was newer stuff there. After reading the numerous warnings about trashing my drive, I decided to quit poking at it without real knowledge of how this is supposed to work and move on to a more rewarding project.

Many thanks to eccerr0r for helping me.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7070
Location: almost Mile High in the USA

PostPosted: Tue Jun 30, 2015 11:03 pm    Post subject: Reply with quote

I think you should simply stick with one suspend/resume implementation and dont bother with the others. I personally use the in-kernel one (i.e., not user land suspend, not tuxonice) because I am lazy and no patches are needed, and with current pm-utils/consolekit/systemd, it "just works." I haven't had too many complaints about it, as I do have several machines which work (finally!) - I have had problems with it in the past however, and still have occasional problems currently - as hinted, it's the closed source video card driver that bites the most. I think my i7 desktop with RadeonHD desktop fails to come out of suspend-to-ram about 1 out of 5 times, which unfortunately is too much for me to use. As it is a systemd/ssd machine, boot times are negligible, I just power down the machine and don't bother with suspend.

The first machine I found it to work "just fine" was my eeePC. This started the quest for me to finally enable it and get it working for all of my other machines/laptops mixture between xfce4/gnome3, both openrc and systemd.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2951
Location: Illinois, USA

PostPosted: Thu Oct 01, 2015 11:57 pm    Post subject: Reply with quote

I note a new symptom. I dual boot with Windows XP. Now that i am readily putting XP into standby I note that although a key press or mouse click will return the computer from suspensiom, they are inoperative after return. they are revided by unplugging and replugging the USB connectors, so maybe it's a BIOS problem?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum