PDA

View Full Version : [ubuntu] (12.04) hangs after waking from suspend



mzimmers
June 10th, 2012, 01:10 AM
Hi -

I recently moved to 12.04, and have found some undesirable behavior when waking from a suspend.

First, the system won't wake from the keyboard or mouse; I have to push the power button. (Annoying but livable if need be.)

Then, shortly after awakening, my system hangs. I have to press and hold the power button to turn it off (not good at all).

So, two questions:


is there a better way to try to "un-hang?"
is anyone else experiencing anything like this? I searched the forum but didn't find this exact problem.


Thanks.

ahallubuntu
June 10th, 2012, 01:20 AM
What make and model of computer?

Did you run a previous version of Ubuntu on it successfully without suspend/resume problems?

These issues vary greatly depending on the exact hardware you are using. Open up a terminal and type

lspci

and post the results here.

mzimmers
June 10th, 2012, 01:32 AM
Here it is:


mzimmers@mzimmers-desktop:~$ lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b5)
00:1c.5 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 6 (rev b5)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation Z68 Express Chipset Family LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
03:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller
mzimmers@mzimmers-desktop:~$


Thanks.

matt_symes
June 10th, 2012, 01:33 AM
Hi

Use the magic key combination to shutdown or reboot safely.

https://en.wikipedia.org/wiki/Magic_SysRq_key

When you say it hangs, is X freezing or is it a kernel panic. If you can reboot using the above method then it's not a kernel panic.

Post the output of


cat /proc/acpi/wakeup

and


cat /proc/cmdline

Is the keyboard and mouse USB ? Have you checked the BIOS to see if there are any wakeup settings in it ?

Open a terminal and type


echo "" | sudo tee /var/log/pm-suspend.log

Suspend and try to awaken the machine. Use the magic key combination if you can to reboot the machine and post the log back here.


cat /var/log/pm-suspend.log

Maybe the log will have some information in it.

As asked above, please detail the make and model of your computer and the hardware in it.


lspci -nnk

Kind regards

mzimmers
June 10th, 2012, 01:51 AM
Thank you, Matt.


mzimmers@mzimmers-desktop:~$ cat /proc/acpi/wakeup
Device S-state Status Sysfs node
CIR S3 *enabled pnp:00:03
BR20 S4 *disabled
EUSB S4 *enabled pci:0000:00:1d.0
USBE S4 *enabled pci:0000:00:1a.0
PEX0 S4 *disabled pci:0000:00:1c.0
PEX1 S4 *disabled
PEX2 S4 *disabled
PEX3 S4 *disabled pci:0000:00:1c.3
PEX4 S4 *disabled
PEX5 S4 *disabled pci:0000:00:1c.5
PEX6 S4 *disabled
PEX7 S4 *disabled
P0P1 S4 *disabled
P0P2 S4 *disabled
P0P3 S4 *disabled
P0P4 S4 *disabled
mzimmers@mzimmers-desktop:~$



mzimmers@mzimmers-desktop:~$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-3.2.0-24-generic root=UUID=2b3a266c-5751-4de4-81c7-72eeb3a9cc15 ro quiet splash vt.handoff=7
mzimmers@mzimmers-desktop:~$


The keyboard is a Logitech K350. It doesn't have a key labelled anything like "SysReq" and a cursory google search didn't reveal anything definitive, though it appears that "Print Screen" is a substitute in earlier versions of this keyboard. (Kbd and mouse are USB wireless).

I couldn't get from the Wiki page what exactly is the key combination/sequence for the unfreeze, either. Is it holding Alt and PrintScreen while entering REISUB?

Thanks.

matt_symes
June 10th, 2012, 02:12 AM
Hi


I couldn't get from the Wiki page what exactly is the key combination/sequence for the unfreeze, either. Is it holding Alt and PrintScreen while entering REISUB?

Yes the combination is...

Press and hold (right) ALT + SYSREQ (Print screen may work) and the hit the keys R E I S U B leaving a 5 second gap between each key press.

This should reboot the PC. Change the last letter to an O instead of R to turn the PC Off.

Practice it now while the PC is not stuck. It's a very useful key combination to know.

Kind regards

mzimmers
June 10th, 2012, 02:31 AM
The key sequence seemed to work, in the sense that the system did reboot. Shortly after boot, however, I got a window proclaiming "System Error" and an invitation to report it. When I tried to report it, I got a message:


TypeError(Error('Incorrect Padding',),)

Do you still want me to do any of that other stuff you cited in a post above?

Thanks.

matt_symes
June 10th, 2012, 02:40 AM
Hi

Is your keyboard and mouse USB ?

According to /proc/acpi/wakeup your USB is set to wakeup for state S4.

So let's look at sysfs instead. Can you post the output of


cat /sys/bus/usb/devices/usb?/power/wakeup

How are you getting on with the magic key combination. You do need to find out how to use that on your PC. It's very useful.

Kind regards

matt_symes
June 10th, 2012, 02:41 AM
Hi


The key sequence seemed to work, in the sense that the system did reboot. Shortly after boot, however, I got a window proclaiming "System Error" and an invitation to report it. When I tried to report it, I got a message:



Do you still want me to do any of that other stuff you cited in a post above?

Thanks.

That sounds like a different issue; Apport reporting an error after reboot. Hopefully not related to rebooting the PC.

Yes. Please post the other stuff.

Kind regards

mzimmers
June 10th, 2012, 02:50 AM
Sorry if I wasn't clear; the magic key combination appears to work. I manually suspended, and successfully rebooted using magic keys (though it did produce the aforementioned problem that you said was probably unrelated).

Here's the output of that latest command:


mzimmers@mzimmers-desktop:~$ cat /sys/bus/usb/devices/usb?/power/wakeup
disabled
disabled
disabled
disabled
mzimmers@mzimmers-desktop:~$

matt_symes
June 10th, 2012, 02:56 AM
Hi

Open a terminal and type


echo enabled | sudo tee /sys/bus/usb/devices/usb?/power/wakeup

Suspend your laptop and then try to wake it using the keyboard. If it tries to wake up then we can find out which USB port the keyboard is connected to and set it up.

After that we can look at why it's freezing when woken up. The usual suspects are graphics or network related.

EDIT: I edited this post as you did specify the keyboard and mouse was USB. My apologies. It's 3.00am here.

Kind regards

mzimmers
June 10th, 2012, 03:03 AM
Hi

I'm still assuming your keyboard and mouse and USB here, because you still have not told me.

Actually I did (in post #5), but it was rather terse. Sorry.


Anyway, assuming they are, open a terminal and type


echo enabled | sudo tee /sys/bus/usb/devices/usb?/power/wakeup


mzimmers@mzimmers-desktop:~$ echo enabled | sudo tee /sys/bus/usb/devices/usb?/power/wakeup
[sudo] password for mzimmers:
enabled


Suspend your laptop

Desktop, actually.


and then try to wake it using the keyboard. If it tries to wake up then we can find out which USB port the keyboard is connected to and set it up.

After that we can look at why it's freezing when woken up. The usual suspects are graphics or network related.

I've already done that (no luck); if you want me to try again, I'll be happy to, but the only thing that has changed is my running that echo/tee command line above.

matt_symes
June 10th, 2012, 03:43 AM
Hi

Try to wake the PC using the mouse. Does that work ?

Let's find out your BIOS and board binformation as well. Maybe there's something to configure in the BIOS.


sudo apt-get install dmidecode


sudo dmidecode -t 0 -t 2

Kind regards

mzimmers
June 10th, 2012, 03:59 AM
Hi

Try to wake the PC using the mouse. Does that work ?[/qhote]

No. And the magic keys didn't work this time, either.

[quote]Let's find out your BIOS and board binformation as well. Maybe there's something to configure in the BIOS.


sudo apt-get install dmidecode


mzimmers@mzimmers-desktop:~$ sudo apt-get install dmidecode
[sudo] password for mzimmers:
Reading package lists... Done
Building dependency tree
Reading state information... Done
dmidecode is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
mzimmers@mzimmers-desktop:~$




sudo dmidecode -t 0 -t 2

Kind regards


mzimmers@mzimmers-desktop:~$ sudo dmidecode -t 0 -t 2
# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor: American Megatrends Inc.
Version: P1.20
Release Date: 08/16/2011
Address: 0xF0000
Runtime Size: 64 kB
ROM Size: 8192 kB
Characteristics:
PCI is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
BIOS ROM is socketed
EDD is supported
5.25"/1.2 MB floppy services are supported (int 13h)
3.5"/720 kB floppy services are supported (int 13h)
3.5"/2.88 MB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
ACPI is supported
USB legacy is supported
BIOS boot specification is supported
Targeted content distribution is supported
UEFI is supported
BIOS Revision: 4.6

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: ASRock
Product Name: Z68M-ITX/HT
Version:
Serial Number:
Asset Tag:
Features:
Board is a hosting board
Board is replaceable
Location In Chassis:
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0

mzimmers@mzimmers-desktop:~$

matt_symes
June 10th, 2012, 04:22 AM
Hi

It seems to me your not having much luck.

Can you try to resume with a keyboard or mouse that is not wireless ?

You may need to run the command to enable wakeup again though.

Kind regards

mzimmers
June 10th, 2012, 04:30 AM
I need to knock off for the evening. I'll dig up another keyboard in the morning.

Which command exactly do I run to enable wakeup? Is it something that should go into a startup file?

Thanks for all your help.

mzimmers
June 10th, 2012, 03:50 PM
Well...this is interesting.

I plugged in a wired keyboard and manually suspended. I then pressed a key on the wired keyboard, and the system woke up.

I then suspended again, and pressed a key on the wireless keyboard, and the system woke up.

I then *removed* the wired keyboard, suspended, and the system almost immediately woke itself up, and hung. Magic keys don't seem to be working.

I did notice that some error message (in tiny font) flashed by before the suspend, something about an "ato2 error COMRESET 16."

matt_symes
June 10th, 2012, 07:23 PM
Hi

The command you would need to run is.


echo enabled | sudo tee /sys/bus/usb/devices/usb?/power/wakeup

I'm still a bit unsure if the reason why it's hanging is because the keyboard cannot wake it up or if it's because it's actually hanging after it's started waking up.

I don't own a Logitech wireless keyboard and i am hoping if we can try a standard keyboard it will eliminate some things.

When you suspend there are a couple of log files that get written to. One is pm-suspend and the other is syslog. If it is freezeing after being woken up i'm hoping something will be in those logs. There is also Xorg.0.log that can be looked into.

Kind regards

matt_symes
June 10th, 2012, 07:26 PM
Hi


Well...this is interesting.

I plugged in a wired keyboard and manually suspended. I then pressed a key on the wired keyboard, and the system woke up.

I then suspended again, and pressed a key on the wireless keyboard, and the system woke up.

I then *removed* the wired keyboard, suspended, and the system almost immediately woke itself up, and hung. Magic keys don't seem to be working.

I did notice that some error message (in tiny font) flashed by before the suspend, something about an "ato2 error COMRESET 16."

I missed your message. I have my reply (last post) on my PC for 4 or so hours before hitting the post button. I was looking at another laptop here.

It looks like the problem may be the wireless keyboard and mouse then. I was wondering if it was a case of the keyboard just not waking up the system correctly.

I will look into that error message.

Kind regards

matt_symes
June 10th, 2012, 07:29 PM
Hi

Was the error


ata2 error COMRESET 16.
(ata) and not


ato2 error COMRESET 16.

(ato) ?

Kind regards

mzimmers
June 10th, 2012, 07:39 PM
Yes, it was indeed ata2.

Do you still want me to run some other tests?

matt_symes
June 10th, 2012, 08:15 PM
Hi

ata is connected with hard drives and cd/dvd roms. I will look into that for you.

This is going to be a bit of a pain. You can you plug in the wired (not Logitech) keyboard and mouse and suspend and resume for 20 or so times.

Post back if it fails to resume. I really want to implicate/eliminate the wireless keyboard and mouse.

I am interested in seeing if that ata error rears its head again as well and, if it does, whether it stops the resume process.

Kind regards

mzimmers
June 10th, 2012, 09:12 PM
Well, I tried multiple suspend/restarts with the wired keyboard. After the 4th attempt, the system hung. And yes, during the suspend, I did receive that error message again. In fact, I believe there were two lines of error, with nearly identical messages.

While I've been doing this, I've had the wireless keyboard receiver attached, but I don't imagine this is affecting anything, is it?

matt_symes
June 13th, 2012, 09:56 PM
Hi

Sorry for the delay. Been a bit busy.

Let's have a look at what the device ata2 actually is.

Open a terminal and type


grep "] ata2" /var/log/syslog | tail -n 50

One of those lines should tell us what the device is.

I'm not convinced that's causing the problem but if you are seeing a correlation between that error message and suspend hanging, it's worth looking into.

Kind regards

mzimmers
June 14th, 2012, 02:30 AM
mzimmers@mzimmers-desktop:~$ grep "] ata2" /var/log/syslog | tail -n 50
Jun 13 10:48:46 mzimmers-desktop kernel: [ 4.467045] ata2: SATA max UDMA/133 abar m2048@0xfe505000 port 0xfe505180 irq 43
Jun 13 10:48:46 mzimmers-desktop kernel: [ 5.104665] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Jun 13 10:48:46 mzimmers-desktop kernel: [ 5.107768] ata2.00: ATA-8: WDC WD10EARX-00PASB0, 51.0AB51, max UDMA/133
Jun 13 10:48:46 mzimmers-desktop kernel: [ 5.107773] ata2.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
Jun 13 10:48:46 mzimmers-desktop kernel: [ 5.111323] ata2.00: configured for UDMA/133
Jun 13 18:26:20 mzimmers-desktop kernel: [ 4.464135] ata2: SATA max UDMA/133 abar m2048@0xfe505000 port 0xfe505180 irq 43
Jun 13 18:26:20 mzimmers-desktop kernel: [ 5.101758] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Jun 13 18:26:20 mzimmers-desktop kernel: [ 5.104862] ata2.00: ATA-8: WDC WD10EARX-00PASB0, 51.0AB51, max UDMA/133
Jun 13 18:26:20 mzimmers-desktop kernel: [ 5.104867] ata2.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
Jun 13 18:26:20 mzimmers-desktop kernel: [ 5.108063] ata2.00: configured for UDMA/133
mzimmers@mzimmers-desktop:~$