[Lucid] kernel suspend + resume works only once, 2nd timesystem freezes

Bug #592780 reported by ingo
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Lucid by ingo
Nominated for Maverick by ingo

Bug Description

kernel suspend and resume only works once, second suspend resultz in freezing with power consumption 15 watts up.
This works perfect in Hardy with kernel 2.6.24 (all versions).

Hardware (very reliable since years):
MoBo: ASUS M2N-E with Athlon64-X2 and 6GB of ECC-RAM.

I do attach here /var/log/messages as obtained with following steps
17:49 boot
17:51 pm-suspend (ok)
17:53 resume (ok)
17:55 pm-suspend fails, PC freezes, power consumption 15 watts up, monitor ist off. Even can't log in from remote by ssh.
17:57 resume impossible, RESET button pressed (the only way to recover)

I also do attach "pm-suspend.log" and output from "dmidecode".

Probably worth to mention, how I got it work in Hardy:
1. unload and reload modules for suspend: "ehci-hcd ohci-hcd ivtv"
2. stop and resume before/after suspend "apcupsd" daemon listening on one USB-port for my UPS.

I did apply the same settings also to Lucid - except I cannot unload the "ehci-hcd" and "ohci-hcd" modules, as they are compiled into the kernel.

I also tried with mainline kernels 2.6.33 and 2.6.34 without any difference.
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.21.
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: ingo 1670 F.... pulseaudio
 /dev/snd/controlC1: ingo 1670 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'NVidia'/'HDA NVidia at 0xfe024000 irq 21'
   Mixer name : 'Analog Devices AD1988B'
   Components : 'HDA:11d4198b,104381f6,00100200'
   Controls : 48
   Simple ctrls : 26
Card1.Amixer.info:
 Card hw:1 'U0x46d0x9a4'/'USB Device 0x46d:0x9a4 at usb-0000:00:02.1-9, high speed'
   Mixer name : 'USB Mixer'
   Components : 'USB046d:09a4'
   Controls : 2
   Simple ctrls : 1
Card1.Amixer.values:
 Simple mixer control 'Mic',0
   Capabilities: cvolume cvolume-joined cswitch cswitch-joined penum
   Capture channels: Mono
   Limits: Capture 0 - 14
   Mono: Capture 0 [0%] [23.75dB] [on]
DistroRelease: Ubuntu 10.04
HibernationDevice: #RESUME=UUID=ceab86c8-3e16-4896-b9fc-dcf21d30a7ce
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100427.1)
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.
MachineType: System manufacturer System Product Name
NonfreeKernelModules: nvidia
Package: linux (not installed)
ProcCmdLine: root=/dev/sda9 ro splash
ProcEnviron:
 LANG=de_DE.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-22.36-generic 2.6.32.11+drm33.2
Regression: Yes
RelatedPackageVersions: linux-firmware 1.34
Reproducible: Yes
RfKill:

Tags: lucid suspend resume regression-release needs-upstream-testing
Uname: Linux 2.6.32-22-generic x86_64
UserGroups: adm cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 09/25/2006
dmi.bios.vendor: Phoenix Technologies, LTD
dmi.bios.version: ASUS M2N-E ACPI BIOS Revision 0402
dmi.board.name: M2N-E
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: 1.XX
dmi.chassis.asset.tag: 123456789000
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnPhoenixTechnologies,LTD:bvrASUSM2N-EACPIBIOSRevision0402:bd09/25/2006:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnM2N-E:rvr1.XX:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
ingo (ingo-steiner) wrote :
Revision history for this message
ingo (ingo-steiner) wrote :
Revision history for this message
ingo (ingo-steiner) wrote :
tags: added: kernel-suspend
tags: added: kj-triage
Revision history for this message
ingo (ingo-steiner) wrote :

I tested with Debian-Squeeze-amd64 and kernel 2.6.32-5 on same hardware:

precisely the same. Suspends and resumes once, with all hardware working correctly.
Second suspend just frezzes system, power 15 watts up, cannot ssh into the system, only hard RESET helps.

Revision history for this message
nzchicken (nayben) wrote :

I am experiencing this issue with exactly the same hardware. I am running kernel 2.6.32-21-generic.

First suspend works fine. On the second suspend, I have to hard reset.

Revision history for this message
ingo (ingo-steiner) wrote :

@ nzchicken:
please also mark this bug as confirmed, this hopefully speeds up processing. I'll add also detaiiled information on the hardware/configuration with 'apport-collect -p linux 592780' to avoid further delays.

Do you by chance observe this as well:
when In the BIOS I set "Advanced -> PCIPnP -> Plug & Play OS no->yes" Lucid no longer initializes the soundcard (snd-hda-intel) in the nForce-chip and no sound available any more?

Revision history for this message
ingo (ingo-steiner) wrote : AlsaDevices.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
ingo (ingo-steiner) wrote : AplayDevices.txt

apport information

Revision history for this message
ingo (ingo-steiner) wrote : ArecordDevices.txt

apport information

Revision history for this message
ingo (ingo-steiner) wrote : BootDmesg.txt

apport information

Revision history for this message
ingo (ingo-steiner) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
ingo (ingo-steiner) wrote : Card0.Codecs.codec.0.txt

apport information

Revision history for this message
ingo (ingo-steiner) wrote : CurrentDmesg.txt

apport information

Revision history for this message
ingo (ingo-steiner) wrote : Lspci.txt

apport information

Revision history for this message
ingo (ingo-steiner) wrote : Lsusb.txt

apport information

Revision history for this message
ingo (ingo-steiner) wrote : PciMultimedia.txt

apport information

Revision history for this message
ingo (ingo-steiner) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
ingo (ingo-steiner) wrote : ProcInterrupts.txt

apport information

Revision history for this message
ingo (ingo-steiner) wrote : ProcModules.txt

apport information

Revision history for this message
ingo (ingo-steiner) wrote : UdevDb.txt

apport information

Revision history for this message
ingo (ingo-steiner) wrote : UdevLog.txt

apport information

Revision history for this message
ingo (ingo-steiner) wrote : WifiSyslog.txt

apport information

Revision history for this message
ingo (ingo-steiner) wrote :

Please note:

exactly the same hardware works perfect in Ubuntu-Hardy-amd64 and kernel 2.6.24 since years!

Revision history for this message
ingo (ingo-steiner) wrote :

as it has been reproduced by 'nzchicken' on same Hardware, I set it -> confirmed

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
ingo (ingo-steiner) wrote :

Here 3 entries in /var/log messages which indicate that there are missing resume-scripts in Lucid:

kernel: [ 145.693980] snd-usb-audio 1-9:1.2: no reset_resume for driver snd-usb-audio?
kernel: [ 145.693982] snd-usb-audio 1-9:1.3: no reset_resume for driver snd-usb-audio?
...
kernel: [ 146.895035] usblp 2-3:1.0: no reset_resume for driver usblp?

So maybe those devices do not get proper initialized on resume, thus second suspend fails?
I have tried to blacklist the modules 'usblp' and 'snd-usb-audio', however that does not work.

Revision history for this message
ingo (ingo-steiner) wrote :

Also with latest kernel update -> 2.6.32-23 the problem persists:

kernel-suspend and resume works once, second suspend fails (now power consumption remains constant).

Revision history for this message
ingo (ingo-steiner) wrote :

Checked with Maverick-Alpa2:
exactly the same beheaviour. Hardy works perfect as often as you want!

Revision history for this message
ingo (ingo-steiner) wrote :

Additional info:

Lucid (and Maverick) does not respect BIOS settig "wake-up by keyboard event" (space bar configured). This as well is different to Hardy, where this feature works fine. Does that give any hint on the root cause?

Revision history for this message
ingo (ingo-steiner) wrote :

I tried to further pin down to find the root cause:

Stepwise test of suspend (s2ram) done with this configuration:

Single user mode
Boot-parameter: no_console_suspend usbcore.autosuspend=-1 i8042.nopnp

cat decices > /sys/power/pm_test
cat mem > /sys/power/state
 performs/resumes correctly many times without any problems

cat platform > /sys/power/pm_test
cat mem > /sys/power/state
 performs/resumes correctly once, second time during suspend I get this output and system hangs:

Freezing user space processes ... (elapsed 00.0 s) done
Freezing remaining tasks ... (elapsed 00.0 s) done
sd 1:0:0:0: [sdb] Stopping disk
sd 0:0:0:0: [sda] Synchronizing SCSI cache
sd 0:0:0:0: [sda] Stopping disk
serial 00:09: disabled
[drm] nouveau 0000:07:00.0: Evicting buffers ...
[drm] nouveau 0000:07:00.0: Idling channels ...
[drm] nouveau 0000:07:00.0: Suspending GPU objects ...
[drm] nouveau 0000:07:00.0: And we're gone!

I am unable to get any further output on the console.

Next I checked the DSDT table (extracted from proc filesystem):
cat /proc/acpi/dsdt > mydsdt.bin

dis-assemled it with the Intel compiler:
iasl -d mydsdt.bin

re-assembled it.
iasl -sa mydsdt.dsl

During that assembly I got 5 warnings:

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20061109 [May 16 2007]
Copyright (C) 2000 - 2006 Intel Corporation
Supports ACPI Specification Revision 3.0a

mydsdt.dsl 387: Method (\_WAK, 1, NotSerialized)
Warning 1079 - ^ Reserved method must return a value (_WAK)

mydsdt.dsl 4418: Method (RVLT, 1, NotSerialized)
Warning 1086 - ^ Not all control paths return a value (RVLT)

mydsdt.dsl 4546: Method (RTMP, 1, NotSerialized)
Warning 1086 - ^ Not all control paths return a value (RTMP)

mydsdt.dsl 4737: Method (OCOP, 1, NotSerialized)
Warning 1086 - ^ Not all control paths return a value (OCOP)

mydsdt.dsl 6052: Method (GCQV, 1, NotSerialized)
Warning 1086 - ^ Not all control paths return a value (GCQV)

ASL Input: mydsdt.dsl - 9644 lines, 306800 bytes, 4049 keywords
AML Output: mydsdt.aml - 33889 bytes 1137 named objects 2912 executable opcodes

Compilation complete. 0 Errors, 5 Warnings, 0 Remarks, 1214 Optimizations

For your further reference I do attach the dis-assembled DSDT-table here for my ASUS M2N-E

Final remark: all is fine on same hardware with Hardy-amd64!

Revision history for this message
ingo (ingo-steiner) wrote :

Now I de-installed all unnecessary services, blacklisted as many as possible modules, so my module list ist minimal like this:

# lsmod
Module Size Used by
usbhid 41084 0
hid 83440 1 usbhid
k8temp 3912 0
nvidia 8096262 24
forcedeth 55592 0
i2c_nforce2 6099 0
lp 9336 0
parport 37160 1 lp
sata_nv 23778 2

(btw: modules lp and parport are loaded despite blacklisting - another bug?)

Beheaviour is still the same: suspend + resumes perfectly 1x, 2nd time system hangs.

Is this bug just ignoered? If yes, it is obviously useless to report any bugs for Lucid.

Revision history for this message
Thomas (teoverton-gmail) wrote :

Same behaviour consistently since installed Lucid two months back. 1st suspend fine, second suspend freezes computer with fan racing. Asus pundit with athlon x2. Any progress on this bug?

Revision history for this message
ingo (ingo-steiner) wrote :

So, at least I found the root cause: the damned USB-subsystem!

Here I describe what I did and finally found how to confirm that:

Boot Lucid with the kernel parameter "nousb"
(unfortunately my mouse is USB-type, while keyboard is PS/2. So I had to perform these steps)
cange to a console (Ctrl+Alt+F1)
type "echo mem > /sys/power/state" -> system goes to standby
resume by tipping power button results in scrambled console, so
change to x-server screen (Ctrl+Alt+F7) with no mouse here of course
change back to console 1 (Ctrl+Alt+F1) and all is fine!

This you can repeat as often as you like which proves that without USB-subsystem enabled suspend works fine!

Tomorrow I will try with an old PS/2 mouse from graphical screen (x-server) - I'm sure it will work as well.

Revision history for this message
ingo (ingo-steiner) wrote :

Here the result:

with a PS/2 mouse attached and kernel parameter "nousb" all is fine. I can suspend + resume as much as I like!

The same (PS/2 mouse), without "nousb" but no USB-devices attached, it only works 1x and hangs on 2nd suspend.

With Hardy I did unload ohci-hcd module, which is no longer possible in Lucid, as it is compiled into the kernel. And the worst, not only ohci-hcd, but also uhci-hcd and ehci-hcd. This is absolutely wrong, as IMHO there is no hardware which needs OHCI and UHCI at the same time - either, or should be used!

So, with current kernel configuration we are lost on our (quite widely spread) hardware, unless Canonical compiles kernel with USB configured as modules, so we can unload them before or unless they provide proper initialisation scripts :-(

CONFIG_USB=m
CONFIG_USB_EHCI_HCD=m
CONFIG_USB_OHCI_HCD=m
CONFIG_USB_UHCI_HCD=m

Revision history for this message
ingo (ingo-steiner) wrote :

Finally got it working:

1. In the BIOS disabled "USB legacy support"
2. Boot with kernel parameter "usbcore.autosuspend=-1"

This way Lucid suspends and resumes many times. Did not check whether the BIOS settinng is absolutely necessary because my harddisk isn't made for frequent spin-downs.

The Devices now attached to USB are:

Logitech, Inc. Optical mouse
Logitech, Inc. TrackMan Wheel
Logitech, Inc. WebCam E3500
Hewlett-Packard DeskJet 970c/970cse
American Power Conversion Uninterruptible Power Supply
Hewlett-Packard ScanJet 6300c

I think this really is a bug in Lucid's kernel configuration, as they seem to have enabled autosuspend in general for all devices. At least on Desktops it should be left to the user to switch it on.

If set to "on" I at least would expect to set the boot parameter "usbcore.autosuspend=-1" by default on desktops!

Changed in linux (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
ingo (ingo-steiner) wrote :

Here for completeness the detailled list of my (working) USB devices as read with Lucid:

$ lsusb
Bus 002 Device 006: ID 03f0:0601 Hewlett-Packard ScanJet 6300c
Bus 002 Device 005: ID 046d:c404 Logitech, Inc. TrackMan Wheel
Bus 002 Device 004: ID 046d:c03d Logitech, Inc. M-BT96a Pilot Optical Mouse
Bus 002 Device 003: ID 03f0:1004 Hewlett-Packard DeskJet 970c/970cse
Bus 002 Device 002: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 005: ID 046d:09a4 Logitech, Inc. QuickCam E 3500
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

and please keep in mind: also without any device attached suspend will fail with "autosuspend" enabled!

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
ingo (ingo-steiner) wrote :

Thanks Jeremy,

could you please explain what has been fixed which way? This would make it possible to verify.

Resume scripts for snd-usb-audio and usblp added?
Will wake-up by keyboard event from S3 now work?
Will it work with BIOS legacy support (for USB-Keyboard) work now?

Revision history for this message
ingo (ingo-steiner) wrote :

And - pleqase excuse my question, it's caused by bad experience - does the fix apply to Lucid, for which the bug was filed?

Revision history for this message
qiuyao (qiuyaoboy) wrote :

@ingo
My laptop is Asus X50M. My system is ubuntu 9.10 64-bit.
The BIOS does not have option like "USB legacy support".
So I just add the kernel parameter "usbcore.autosuspend=-1".
And It works.
Thanks.

Revision history for this message
Andy Whitcroft (apw) wrote :

@ingo -- Jeremy closed off an old bug which was Fix Committed, and therefore by definition must be Fix Released as Lucid kernels have released since it was marked Fix Committed. The bug was moved Fix Committed by you, which normally implies that a change has been applied to the repository from which the kernel is generated. If that was not the case it should be returned to Triaged.

Revision history for this message
Andy Whitcroft (apw) wrote :

@ingo -- all of the USB host modules are compiled in as that is the only way to ensure probe is done in a sensible order. This ensures you get usb 2.0 performance from devices which support it. If usb suspend is broken on specific devices it should be quirked off for those devices.

Revision history for this message
noras (nora-staack) wrote :

this bug also affects Natty alpha2 on my computer (Asus A8N), as well as some nvidia Intel mainboards (sadly i don't know the exact ones - i just happend to have that problem on a friends pc as well). By the way there is another bug report #355513 which adresses the same problem, therefore it seems this bug was 'introduced' with 8.10...

Revision history for this message
techatdd (techatdd) wrote :

For my Asus Pundit P1-AH1 Barebone with nforce chipset both sugestions are needed:

1. In the BIOS disabled "USB legacy support"
2. Boot with kernel parameter "usbcore.autosuspend=-1"

BTW:
echo PS2K | sudo tee /proc/acpi/wakeup in /etc/rc.local get my power on PS2 Keyboard to work!

And I dont know why there is fix released, when I have to tweak it with a fresh 10.04.3?

Revision history for this message
ingo (ingo-steiner) wrote :

@techatdd

I'm a bit further now and have found that it is sufficient to

1. In the BIOS disabled "USB legacy support"
2. blacklist 'snd-usb-audio' and 'usblp' in a configuration file in /etc/modprobe.d/

Both modules still lack suspend/resume scripts!

According to information found here: https://wiki.archlinux.org/index.php/CUPS#Blacklisting_usblp
"CUPS now uses libusb and printer USB devices (/dev/bus/usb/*) instead of the usblp generated /dev/usb/lpX ones."

Revision history for this message
ingo (ingo-steiner) wrote :

@techatdd,

and many thanks for the hint to enable wake-up by PS2-keyboard - it now works here as well.
I did place following lines (because the echo command just toggles disabled/enabled) into

 /etc/rc.local:

# Enable wake-up from s2ram by PS2-keyboard
grep 'PS2K.*enabled' < /proc/acpi/wakeup >/dev/null || \
  echo PS2K > /proc/acpi/wakeup

Addition:
I forgot to mention in the previous post that after blacklisting the 2 modules it is no longer necessary to
boot with "usbcore.autosuspend=-1" here.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.