uvcvideo module prevents system from suspending or hibernating

Bug #147757 reported by Brian Murray on 2007-10-01
10
Affects Status Importance Assigned to Milestone
linux-ubuntu-modules-2.6.22 (Ubuntu)
Medium
Unassigned
linux-ubuntu-modules-2.6.24 (Ubuntu)
Medium
Unassigned

Bug Description

When the uvcvideo module is loaded on my laptop I am unable to suspend the system. I received the following error messages in dmesg when running kernel version 2.6.22-12.39-generic and linux-ubuntu-modules version 2.6.22-12.32:

[ 83.816850] usb_endpoint usbdev5.2_ep82: PM: suspend 0->2, parent 5-4:1.0 already 2
[ 83.816863] uvcvideo 5-4:1.1: suspend error -22

I was able to suspend and hibernate my system earlier in Gutsy development. I browsed through the linux-ubuntu-modules git tree and believe that I was able to suspend before git commit 616d7243b60bb3eb2abed6cf99fe4d3edfc6a874. If I just unload the uvcvideo module I am then able to suspend and hibernate.

Tim Gardner (timg-tpi) wrote :

Gutsy lum commit cbf553367663435a9ea69f1223a1a2bae5cc5f46

Changed in linux-ubuntu-modules-2.6.22:
assignee: nobody → timg-tpi
importance: Undecided → Medium
status: New → Fix Committed
Marco Rodrigues (gothicx) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it, because your description didn't include enough information.

Please include the information requested at [WWW] https://wiki.ubuntu.com/DebuggingACPI as separate attachments.

Marco Rodrigues (gothicx) wrote :

Ups, fix already commited.. that was fast.. thanks Tim!

Kyle McMartin (kyle) wrote :

linux-ubuntu-modules-2.6.22 (2.6.22-13.33) gutsy; urgency=low

  [Ben Collins]

  * ubuntu/d-i: Add atl2 module to udeb
    - LP: #148532

  [Matthew Garrett]

  * Work around uvc suspend issues
    - LP: #147757
  * Force-enable speakers on recent Thinkpads
    - LP: #140609

  [Tim Gardner]

  * Added et131x Gigabit ethernet driver support.
    - LP: #102291
  * AppArmor patch for disconnected path reporting
  * prism javelin/xbow works out-of-box, but the module is not loaded by
    default
    - LP: #133823
  * System freeze when bringing up rt2500pci interface
    - LP: #129183
  * [xps1330] microphone built-in doesn't work
    - LP: #147682
  * FUJITSU SIEMENS XTB70 snd-hda-intel fix
    - LP: #147827
  * Add ivtv-fb and saa717x support
    - LP: #147886

 -- Kyle McMartin <email address hidden> Thu, 04 Oct 2007 16:09:03 +0000

Changed in linux-ubuntu-modules-2.6.22:
status: Fix Committed → Fix Released
Tim Gardner (timg-tpi) on 2007-10-05
Changed in linux-ubuntu-modules-2.6.22:
assignee: timg-tpi → nobody
Brian Murray (brian-murray) wrote :

I was iso testing the Edubuntu amd64 daily build from 20080131.1 with kernel version 2.6.24-5.8-generic and I encountered this bug again. When trying to suspend with the module loaded the system failed to susupend. After manually removing the module via 'sudo rmmod uvcvideo' I was able to suspend the system and resume.

Looks like the patch that was incorporated in Gutsy lum isn't in Hardy lum. Reassigning to the kernel team. Thanks.

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: New → Triaged
Michael Frey (mfrey) wrote :

Fix was pulled into Hardy lum yesterday.

Changed in linux-ubuntu-modules-2.6.24:
status: Triaged → Fix Committed
Brian Murray (brian-murray) wrote :

I"ve tested this using l-u-m package version 2.6.24-8.13 and my laptop still fails to suspend. Removing the uvcvideo driver before trying to suspend allows it to successfully suspend.

Changed in linux-ubuntu-modules-2.6.24:
status: Fix Committed → Triaged
Ben Collins (ben-collins) wrote :

This patch already seems to be applied to the latest lum-2.6.24 uvcvideo code.

Changed in linux-ubuntu-modules-2.6.24:
status: Triaged → Fix Released
Brian Murray (brian-murray) wrote :

Is 2.6.24-8.13 the latest or is there a later one?

Brian Murray (brian-murray) wrote :

My laptop still fails to suspend with linux-ubuntu-modules version 2.6.24-12.17 when the uvcvideo driver is loaded.

Changed in linux-ubuntu-modules-2.6.24:
status: Fix Released → Triaged
Brian Murray (brian-murray) wrote :

One of the 'return -EINVAL;' s was changed in the driver to 'return uvc_status_suspend(dev);' subsequently this is now causing my laptop to fail to suspend. I changed 'return uvc_status_supend(dev);' to 'return 0;' and I can suspend again with the driver loaded.

I've attached a patch that does just that.

Brian Murray (brian-murray) wrote :

Hmm, looking further it was actually an upstream code change that changed the behavior of the driver. It's in commit id commit cfaedfa5dede743749abe253b5966aeaa8e86a59 .

Brian Murray (brian-murray) wrote :

I did some further research and it seems my webcam is supported by the r5u870 driver - http://wiki.mediati.org/R5u870 . I'm guessing that driver wouldn't make it for Hardy even without the firmware issues. However, it seems to me that blacklisting 05ca:1810, and maybe 05ca:1870, and the uvcvideo driver would be the best solution.

Incidentally, here are the alias entries created for the r5u870 driver:
alias usb:v05CAp183Bd*dc*dsc*dp*ic0Eisc01ip00* r5u870
alias usb:v05CAp183Ad*dc*dsc*dp*ic0Eisc01ip00* r5u870
alias usb:v05CAp1839d*dc*dsc*dp*ic0Eisc01ip00* r5u870
alias usb:v05CAp1837d*dc*dsc*dp*ic0Eisc01ip00* r5u870
alias usb:v05CAp1836d*dc*dsc*dp*ic0Eisc01ip00* r5u870
alias usb:v05CAp1835d*dc*dsc*dp*ic0Eisc01ip00* r5u870
alias usb:v05CAp1812d*dc*dsc*dp*ic0Eisc01ip00* r5u870
alias usb:v05CAp1810d*dc*dsc*dp*ic0Eisc01ip00* r5u870
alias usb:v05CAp1870d*dc*dsc*dp*ic*isc*ip* r5u870
alias usb:v05CAp1834d*dc*dsc*dp*ic*isc*ip* r5u870
alias usb:v05CAp1833d*dc*dsc*dp*ic*isc*ip* r5u870
alias usb:v05CAp1832d*dc*dsc*dp*ic*isc*ip* r5u870
alias usb:v05CAp1830d*dc*dsc*dp*ic*isc*ip* r5u870

There seems to be a fair bit of overlap between it and this uvcvideo driver alias:
alias usb:v*p*d*dc*dsc*dp*ic0Eisc01ip00* uvcvideo

TJ (tj) wrote :

Also affects Sony Vaio VGN-FE41Z with Hardy Beta amd64. Unloading the driver prior to suspend/hibernate solves the 'failed to suspend/hibernate' issue:

echo "SUSPEND_MODULES=\"uvcvideo\"" >/etc/pm/config.d/unload_modules
chmod +x /etc/pm/config.d/unload_modules

Confirmed with Hardy on a Sony VAIO VGN-TZ26GN, running Hardy (lum 2.6.24-16.23).

Blacklisting or rmmod'ing uvcvideo works. On this hw, uvcvideo does not actually drive the webcam, so I have to agree with Bryan, the uvcvideo driver is overstating its abilities ;-)

A manually compiled and installed R5u870 does drive the webcam OTOH.

This seems to affect Supend for most VAIOs, so it'd be great to see it fixed for the wider public.

Tim Gardner (timg-tpi) wrote :

This bug does not qualify for an SRU fix. The method in https://bugs.edge.launchpad.net/ubuntu/+bug/147757/comments/15 is the right way to work around suspend/resume issues.

Changed in linux-ubuntu-modules-2.6.24:
status: Triaged → Won't Fix

Tim - sad to hear that it doesn't meet the SRU criteria for Hardy, this does seem to affect many users with embedded webcams on their laptops.

WRT the next release, what's the process? This is a regression in the uvcvideo driver.

April 2007 discussion of merging "almost-UVC-Ricoh-webcam" support into uvcvideo. Sam is the author of the R5u870 driver.
http://lists.berlios.de/pipermail/linux-uvc-devel/2007-April/001563.html

Unfortunately, the merge doesn't seem to have happened.

Sam Revitch went MIA at some point last year. Since then Alex Hixon has
taken on the task of maintaining the driver:

http://wiki.mediati.org/R5u870

We've been updating and patching for various issues over the past few
months but there's no real push for merging it into uvcvideo.

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

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

Other bug subscribers