mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philippe Troin <phil@fifi.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: Mohamed Ikbel Boulabiar <boulabiar@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: webcam problem after suspend/hibernate
Date: 01 Apr 2010 10:05:52 -0700	[thread overview]
Message-ID: <87aatn9k7j.fsf@old-tantale.fifi.org> (raw)
In-Reply-To: <20100401165606.GA1677@ucw.cz>

Pavel Machek <pavel@ucw.cz> writes:

> > Do you mean the dmesg output ?
> > A full dmesg is included in this address :
> > http://pastebin.com/8XU619Uk
> > Not in all suspend/hibernate the problem comes, only in some of them
> > and this included dmesg output is just after a non working case of
> > webcam fault.
> > 
> > 
> > I also have found this in `/var/log/messages | grep uvcvideo`
> > Mar 31 00:31:16 linux-l365 kernel: [399905.714743] usbcore:
> > deregistering interface driver uvcvideo
> > Mar 31 00:31:24 linux-l365 kernel: [399914.121386] uvcvideo: Found UVC
> > 1.00 device LG Webcam (0c45:62c0)
> > Mar 31 00:31:24 linux-l365 kernel: [399914.135661] usbcore: registered
> > new interface driver uvcvideo
> 
> Also try unloading uvcvideo before suspend and reloading it after
> resume...

I have a similar problem with a Creative Optia webcam.

I have found that removing the ehci_hcd module and reinserting it
fixes the problem.

If your kernel ships with ehci_hcd built-in (F11 and later), the
script included also fixes the problem (it rebind the device).

Of course, I'd love to see this issue fixed.

Phil.

Script: /etc/pm/sleep.d/50kickuvc

#!/bin/sh

case "$1" in
  resume|thaw)
    cd /sys/bus/usb/drivers/uvcvideo || exit 1
    devices=''
    for i in [0-9]*-[0-9]*:*
    do
      [ -L "$i" ] || break
      saved_IFS="$IFS"
      IFS=:
      set -- $i
      IFS="$saved_IFS"
      found=no
      for j in $devices
      do
        if [ "$j" = "$1" ]
        then
          found=yes
        fi
      done
      if [ "$found" = no ]
      then
        devices="$devices $1"
      fi
    done
    if [ "$devices" != "" ]
    then
      cd /sys/bus/usb/drivers/usb || exit 1
      for i in $devices
      do
        echo $i > unbind
        sleep 1
        echo $i > bind
      done
    fi
    ;;
esac

  reply	other threads:[~2010-04-01 17:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30 21:55 Mohamed Ikbel Boulabiar
2010-03-30 23:25 ` Laurent Pinchart
2010-03-31 19:51   ` Mohamed Ikbel Boulabiar
2010-04-01 16:56     ` Pavel Machek
2010-04-01 17:05       ` Philippe Troin [this message]
2010-04-04 13:22         ` Pavel Machek
2010-04-04 18:58           ` Philippe Troin
2010-04-04 19:34             ` Pavel Machek
2010-04-06  9:32               ` Mohamed Ikbel Boulabiar
2010-04-06 13:30                 ` Pavel Machek
2010-04-11 10:53               ` Laurent Pinchart
2010-04-11 15:44                 ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87aatn9k7j.fsf@old-tantale.fifi.org \
    --to=phil@fifi.org \
    --cc=boulabiar@gmail.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®