Bug 225738

Summary: Suspend to Disk and USB-Mouse
Product: [openSUSE] openSUSE 10.2 Reporter: karl-dieter steinhoff <karl-dieter.steinhoff>
Component: Mobile DevicesAssignee: Pavel Machek <pavel>
Status: RESOLVED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P5 - None CC: behlert, gianluca.cerminara
Version: RC 1   
Target Milestone: ---   
Hardware: i686   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Logfile after suspend to disk and resume
Messages after suspend to disk and resume
mouse test
Add uhci_hcd to SUSPEND_MODULES
Logfile after add uhci_hcd to SUSPEND_MODULES
Messages after suspend to disk and resume

Description karl-dieter steinhoff 2006-12-04 14:20:48 UTC
Hallo,
das Starten von Suspend to Disk verläuft ordnungsgemäss.
Nach dem Neustart des Systems über "resume" arbeiten Tastatur und Touchpad wieder,
nur die USB-Mouse nicht.

Daten des Systems:
powersave-0.15.8
dbus-1-1.0.0-6
hal-0.5.8_git20061106-12
2.6.18.2-33-default

Fehler in /var/log/messages:

usb usb4: root hub lost power or was reset
Dec  2 14:06:43 tux kernel: ehci_hcd 0000:00:1d.7: debug port 1 IN USE
Dec  2 14:06:43 tux kernel: PCI: cache line size of 32 is not supported by device 0000:00:1d.7
Dec  2 14:06:43 tux kernel: ehci_hcd 0000:00:1d.7: PCI post-resume error -19!
Dec  2 14:06:43 tux kernel: ehci_hcd 0000:00:1d.7: HC died; cleaning up
Dec  2 14:06:43 tux kernel: PM: Writing back config space on device 0000:00:1e.0 at offset 6 (was 20020200, writing 20060200)
Dec  2 14:06:43 tux kernel: PCI: Setting latency timer of device 0000:00:1e.0 to 64
Dec  2 14:06:43 tux kernel: PM: Writing back config space on device 0000:00:1f.5 at offset 1 (was 2900007, writing 2900000)
Dec  2 14:06:43 tux kernel: PCI: Enabling device 0000:00:1f.5 (0000 -> 0003)
Dec  2 14:06:43 tux kernel: ACPI: PCI Interrupt 0000:00:1f.5[B] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10
Dec  2 14:06:43 tux kernel: PCI: Setting latency timer of device 0000:00:1f.5 to 64
Dec  2 14:06:43 tux kernel: ACPI: PCI Interrupt 0000:02:02.0[A] -> Link [LNKD] -> GSI 10 (level, low) -> IRQ 10
Dec  2 14:06:43 tux kernel: uhci_hcd 0000:00:1d.0: host system error, PCI problems?
Dec  2 14:06:43 tux kernel: uhci_hcd 0000:00:1d.0: host controller process error, something bad happened!
Dec  2 14:06:43 tux kernel: uhci_hcd 0000:00:1d.1:
Comment 1 Forgotten User ZhJd0F0L3x 2006-12-04 15:55:11 UTC
Please give more context of /var/log/messages (do "logger XXXXXXXXXXXXXXXXXXXXXXXX", then suspend, resume, "logger XXXXXXXXXXXXXXXXXXXXXXXX" and attach the part of /var/log/messages that is between the two XXXXXX lines to this bug.

Does unplugging and replugging the mouse after resume help?
Does it work if you unplug the mouse before suspend and replug it after resume?

Pavel, Greg: executive summary: USB mouse does not work after suspend to disk
Comment 2 karl-dieter steinhoff 2006-12-10 18:42:21 UTC
Created attachment 109020 [details]
Logfile after suspend to disk and resume
Comment 3 karl-dieter steinhoff 2006-12-10 18:49:12 UTC
Created attachment 109021 [details]
Messages after suspend to disk and resume
Comment 4 Forgotten User ZhJd0F0L3x 2006-12-11 08:18:58 UTC
Greg, the UHCI controller surely looks very confused.
Also, there are many of those:

Dec 10 17:04:15 tux kernel: PM: Writing back config space on device 0000:00:1d.1 at offset f (was 20b, writing ffffffff)
Dec 10 17:04:15 tux kernel: PM: Writing back config space on device 0000:00:1d.1 at offset e (was 0, writing ffffffff)

for different devices, which looks somewhat bodus to me...

Karl-Dieter, does unplugging the mouse before suspend and replugging after resume help? (i doubt it).
Comment 5 karl-dieter steinhoff 2006-12-11 10:15:06 UTC
Created attachment 109103 [details]
mouse test
Comment 6 Greg Kroah-Hartman 2007-01-05 23:58:04 UTC
Stefan, what happened to the "unload all modules before suspending" way of doing things?

I don't know what's going on with this uhci controller, but it doesn't look very good.  Try unloading the module before suspending, and then reloading it on resume.
Comment 7 Forgotten User ZhJd0F0L3x 2007-01-06 12:32:08 UTC
(In reply to comment #6)
> Stefan, what happened to the "unload all modules before suspending" way of
> doing things?

We do not unload anything, because drivers that need to be unloaded are broken and need to be fixed anyway.
^L
At least that's the theory. :-)

> I don't know what's going on with this uhci controller, but it doesn't look
> very good.  Try unloading the module before suspending, and then reloading it
> on resume.

Yes, there is infrastructure for that in /etc/pm/config, the "SUSPEND_MODULES" variable.

Karl-Dieter, please add "uhci_hcd" to the variable SUSPEND_MODULES in /etc/pm/config and try again.
Comment 8 karl-dieter steinhoff 2007-01-08 15:11:18 UTC
Created attachment 111836 [details]
Add uhci_hcd to SUSPEND_MODULES
Comment 9 karl-dieter steinhoff 2007-01-08 15:16:02 UTC
Created attachment 111838 [details]
Logfile after add uhci_hcd to SUSPEND_MODULES
Comment 10 Forgotten User EGKOvZW2-J 2007-01-09 10:38:32 UTC
I have the same problem on LG LS50 laptop. Unfortunately, I cannot provide hardware details right now (I won't see that laptop for a few days).
The problem is that when I do a suspend to disk (from KDE), and then resume it, _sometimes_ (well, most of the time, but not always) the USB mouse (which was connected during suspend) and the touchpad won't react anymore. Re-plugging the mouse doesn't help. If I ctrl-alt-backspace the X server, then the touchpad begins to work and the USB mouse too (however, not always). Sometimes the USB mouse won't work even after X restart.
Suspend to ram basically doesn't do anything (well, it prints some messages that it's doing a suspend but then it returns to desktop right away), so suspend to disk is the only option. But, this USB mouse problem makes it unusable. A cold boot takes 1:30 mins (yes, I disabled almost every service), so that's a real pain. The laptop is Centrino (don't know which one yet) with 512M ram.
Comment 11 Forgotten User ZhJd0F0L3x 2007-01-09 12:02:00 UTC
(In reply to comment #10)
> I have the same problem on LG LS50 laptop. Unfortunately, I cannot provide

Do you also get those USB host controller errors in syslog after resume? Otherwise, it is probably a different problem. In this case, please open a different bug for the different problem :-)

> Suspend to ram basically doesn't do anything (well, it prints some messages
> that it's doing a suspend but then it returns to desktop right away), so

http://en.opensuse.org/S2ram
http://en.opensuse.org/Pm-utils
Comment 12 Forgotten User ZhJd0F0L3x 2007-01-09 12:04:07 UTC
(In reply to comment #9)
> Logfile after add uhci_hcd to SUSPEND_MODULES 

Karl-Dieter, we'd also need the output of "dmesg" after the unsuccessful resume.

The next thing to try would be, to add "ehci_hcd" to SUSPEND_MODULES

SUSPEND_MODULES="button uhci_hcd ehci_hcd"
Comment 13 karl-dieter steinhoff 2007-01-09 14:21:30 UTC
Created attachment 112000 [details]
Messages after suspend to disk and resume
Comment 14 Gianluca Cerminara 2007-02-23 14:52:30 UTC
I have the same problem on my laptop, also after adding 
uhci_hcd to SUSPEND_MODULES

powersave-0.15.11-0.2
pm-utils-0.20.0.20061114-5.2
suspend-0.50-6
dbus-1-1.0.0-7
hal-0.5.8_git20061106-31.1
2.6.18.2-34-default

lspci returns
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 03)

I can post messages and pm logs if needed
Comment 15 Pavel Machek 2007-04-10 07:59:30 UTC
Karl wrote his bug description in language I can't speak, too bad. Now people are saying "mee too". Too bad.

If usb unload/reload solves it, it is not really core swsusp problem. Also can affected people try latest mainline? Perhaps it has fixed USB drivers, already.
Comment 16 Thomas Meindl 2007-04-10 10:40:49 UTC
It's something like this:

Hello,
Suspend to Disk works properly. After rebooting the system with 'resume',both keyboard and touchpad are working, only the USB mouse fails.

System internals:
powersave-0.15.8
dbus-1-1.0.0-6
hal-0.5.8_git20061106-12
2.6.18.2-33-default

Errors in /var/log/messages
usb usb4: root hub lost power or was reset
[kernel log]
Comment 17 Forgotten User ZhJd0F0L3x 2007-04-16 13:34:51 UTC
Ok, so the question is, if all of you for whom it does not work after resume, even when putting uhci_hcd and ehci_hcd intp SUSPEND_MODULES have similar errors than those in dmesg:

ACPI: PCI Interrupt 0000:00:1d.7[D] -> Link [LNKH] -> GSI 10 (level, low) -> IRQ 10
PCI: Setting latency timer of device 0000:00:1d.7 to 64
ehci_hcd 0000:00:1d.7: EHCI Host Controller
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:1d.7: debug port 15 IN USE
PCI: cache line size of 32 is not supported by device 0000:00:1d.7
ehci_hcd 0000:00:1d.7: irq 10, io mem 0xf4000000
ehci_hcd 0000:00:1d.7: startup error -19
ehci_hcd 0000:00:1d.7: USB bus 1 deregistered
ACPI: PCI interrupt for device 0000:00:1d.7 disabled
ehci_hcd 0000:00:1d.7: init 0000:00:1d.7 fail, -19
USB Universal Host Controller Interface driver v3.0
ACPI: PCI Interrupt 0000:00:1d.0[A] -> Link [LNKA] -> GSI 10 (level, low) -> IRQ 10
PCI: Setting latency timer of device 0000:00:1d.0 to 64
uhci_hcd 0000:00:1d.0: UHCI Host Controller
uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:1d.0: HCRESET not completed yet!
uhci_hcd 0000:00:1d.0: irq 10, io base 0x00001200
usb usb1: new device found, idVendor=0000, idProduct=0000
usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: UHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.18.2-34-default uhci_hcd
usb usb1: SerialNumber: 0000:00:1d.0
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 0 ports detected
uhci_hcd 0000:00:1d.0: host system error, PCI problems?
uhci_hcd 0000:00:1d.0: host controller process error, something bad happened!
uhci_hcd 0000:00:1d.0: host controller halted, very bad!
uhci_hcd 0000:00:1d.0: HCRESET not completed yet!
uhci_hcd 0000:00:1d.0: HC died; cleaning up
hub 1-0:1.0: activate --> -108
uhci_hcd 0000:00:1d.0: HC died; cleaning up
ACPI: PCI Interrupt 0000:00:1d.1[B] -> Link [LNKD] -> GSI 10 (level, low) -> IRQ 10
PCI: Setting latency timer of device 0000:00:1d.1 to 64
uhci_hcd 0000:00:1d.1: UHCI Host Controller
uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:1d.1: HCRESET not completed yet!
uhci_hcd 0000:00:1d.1: irq 10, io base 0x00001600
usb usb2: new device found, idVendor=0000, idProduct=0000
usb usb2: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: UHCI Host Controller
usb usb2: Manufacturer: Linux 2.6.18.2-34-default uhci_hcd
usb usb2: SerialNumber: 0000:00:1d.1
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 0 ports detected
uhci_hcd 0000:00:1d.1: host system error, PCI problems?
uhci_hcd 0000:00:1d.1: host controller process error, something bad happened!
uhci_hcd 0000:00:1d.1: host controller halted, very bad!
uhci_hcd 0000:00:1d.1: HCRESET not completed yet!
uhci_hcd 0000:00:1d.1: HC died; cleaning up
hub 2-0:1.0: activate --> -108
uhci_hcd 0000:00:1d.1: HC died; cleaning up
ACPI: PCI Interrupt 0000:00:1d.2[C] -> Link [LNKC] -> GSI 10 (level, low) -> IRQ 10
PCI: Setting latency timer of device 0000:00:1d.2 to 64
uhci_hcd 0000:00:1d.2: UHCI Host Controller
uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:1d.2: HCRESET not completed yet!
uhci_hcd 0000:00:1d.2: irq 10, io base 0x00001700
usb usb3: new device found, idVendor=0000, idProduct=0000
usb usb3: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: UHCI Host Controller
usb usb3: Manufacturer: Linux 2.6.18.2-34-default uhci_hcd
usb usb3: SerialNumber: 0000:00:1d.2
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 0 ports detected
uhci_hcd 0000:00:1d.2: host system error, PCI problems?
uhci_hcd 0000:00:1d.2: host controller process error, something bad happened!
uhci_hcd 0000:00:1d.2: host controller halted, very bad!
uhci_hcd 0000:00:1d.2: HCRESET not completed yet!
uhci_hcd 0000:00:1d.2: HC died; cleaning up
hub 3-0:1.0: activate --> -108
uhci_hcd 0000:00:1d.2: HC died; cleaning up

The reason i am asking is: i'm not sure that you are all seeing the same bug, so it is important to find out.
Comment 18 Pavel Machek 2007-05-28 10:18:38 UTC
I'd like the "latest mainline" test on the affected machine, please.
Comment 19 Pavel Machek 2007-06-09 14:30:26 UTC
Ping? Alternatively, you can test opensuse 10.3.
Comment 20 Pavel Machek 2007-06-14 12:40:16 UTC
-ETIMEDOUT