Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 374529 - sys-kernel/gentoo-sources-2.6.39: Logitech C310 Webcam black after suspend to RAM
Summary: sys-kernel/gentoo-sources-2.6.39: Logitech C310 Webcam black after suspend to...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-09 10:37 UTC by Alexander Haensch
Modified: 2011-12-11 19:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
dmesg output after several suspends (dmesg.txt,30.18 KB, text/plain)
2011-07-10 17:55 UTC, Alexander Haensch
Details
lsusb -v of Logitech C310 (lsusb,59.42 KB, text/plain)
2011-07-13 20:20 UTC, Alexander Haensch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Haensch 2011-07-09 10:37:39 UTC
The Webcam is not initialized correctly after suspend to ram.
Problem is that the system is setting the value of 
/sys/bus/usb/devices/ $usbid /power/persist to the value of 1
By setting the value to 0 everything works fine.

I do not understand why persist is set to 1. Webcams are relativly complex hardware why linux thinks its not needed to reinitialize them after suspend?


Can i tell the system to set the value to 0 permanently?
Something like a udev rule?


Reproducible: Always

Steps to Reproduce:
1. suspend to ram
2. power on again
3. webcam not working
Actual Results:  
Microphone working.
Video is black.

Expected Results:  
Video shows image.
Comment 1 Pacho Ramos gentoo-dev 2011-07-10 17:38:55 UTC
Please post "emerge --info" output and attach "dmesg" output after resuming
Comment 2 Alexander Haensch 2011-07-10 17:52:42 UTC
emerge --info

Portage 2.1.10.4 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.2, glibc-2.13-r2, 2.6.39-gentoo x86_64)
=================================================================
System uname: Linux-2.6.39-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1055T_Processor-with-gentoo-2.0.3
Timestamp of tree: Sat, 09 Jul 2011 07:00:01 +0000
ccache version 3.1.5 [enabled]
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2, 3.2
dev-util/ccache:          3.1.5
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21.1
sys-devel/gcc:            4.5.2
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)
sys-libs/glibc:           2.13-r2
Repositories: gentoo mozilla
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -mabm -msse4a"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=amdfam10 -O2 -mabm -msse4a"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs buildpkg ccache distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/ http://gentoo.mneisen.org/ http://gentoo.wheel.sk/ http://gentoo.supp.name/ http://gentoo.mirror.pw.edu.pl/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en"
MAKEOPTS="-j7"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/mozilla"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="#dv 3dnow 3dnowext X a52 aac aalib accessibility acpi alsa amd64 apm asf atm automount avahi bash-completion berkdb bidi bluetooth bogofilter branding btrfs bzip2 cairo caps cdda cdr cgi cjk clamav cli consolekit cpudetection cracklib css ctype cxx dbus declarative dillo divx divx4linux djbfft djvu dlna dri dts dv dvb dvd dvdr dvdread dynamicplugin emboss encode exif extra facebook fam fat fbcondecor fbdev fbsplash ffmpeg firefox firefox3 flac fontconfig fontforge fortran gd gdbm gdu gecko-sdk gif glibc-omitfp gmedia gnutls gpm graphviz gstreamer gtk gtk2 h323 hbci httpd iconv imagemagick imap ipv6 jack java jfs jingle jpeg kde kerberos kipi kontact kpathsea lcms ldap libnotify libwww live lm_sensors lzma mad mail-wrapper matroska mdadm mmx mmxext mng modplug modules mono mozilla mp3 mp4 mpeg mplayer msn mudflap multilib musicbrainz mysql mysqli nas nautilus ncurses nepomuk network nls nptl nptlonly nsplugin ntfs nvidia oav ogg opengl openmp pam pango pch pcre pda pdf perl phonon phyton plasma pmu png policykit postgres ppds pppd publishers pulseaudio python qt qt3support qt4 readline realmedia reiserfs rtc rtsp samba science sdl semantic-desktop session simplexml skype sms spamassassin spell sql sqlite sse sse2 ssl ssse3 startup-notification stream svg swat sysfs taglib tcpd tex4ht theora threads threadsafe thunderbird tiff tk tkinter truetype udev unicode upnp usb v4l v4l2 vaapi vcd vdpau video visualization vlm vorbis wmp wxwidgets wxwindows x264 xcb xcomposite xetex xfs xine xinerama xml xorg xscreensaver xulrunner xv xvid xvmc yv12 zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" LIRC_DEVICES="bte" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" SANE_BACKENDS="plustek" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Alexander Haensch 2011-07-10 17:55:12 UTC
Created attachment 279663 [details]
dmesg output after several suspends

there is nothing added to dmesg after suspend
Comment 4 Stratos Psomadakis (RETIRED) gentoo-dev 2011-07-13 10:35:40 UTC
Can you please post the output of lsusb? 

Is this an intergrated webcam?

You can have a script in rc.local to manually set power/persist to zero. 

After a quick look at the code, I think that  atm all of the usb devices persist during suspends/hibernates etc, except for some devices with known quirks.

You can report the bug upstream, and maybe ask them to add your webcam to the list of the devices known not to work with USB persist. You can report that either at bugzilla.kernel.org or at the linux-usb mailing list.
Comment 5 Alexander Haensch 2011-07-13 20:20:08 UTC
Created attachment 280015 [details]
lsusb -v of Logitech C310
Comment 6 Alexander Haensch 2011-07-13 20:21:10 UTC
The cam is externally plugged to the internal USB 2.0 hub.
Comment 7 Mike Pagano gentoo-dev 2011-09-02 22:11:47 UTC
What is contained in this file?

/sys/bus/usb/devices/1-2/power/persist