Guter_Hirte
Posts: 9
Joined: Tue Mar 03, 2015 2:21 pm

USB device suspend mode not working on RaspberryPi 2

Thu Mar 05, 2015 4:46 pm

I have a problem with my USB devices wich do not go into suspend mode at all on the raspberry pi 2, but do it on every other desktop PC with ubuntu. After some googling I found out, that the common way to put a USB device into suspend mode is by autosuspend, whitch is controlled by the file /sys/bus/usb/devices/x-x.x/power/autosuspend or /level or /control (https://searchcode.com/codesearch/view/37920475/, http://stackoverflow.com/questions/4702 ... with-linux). But when I go to this location, the only file existing is "persist". So I connected my USB mouse to the Pi and had a look there, and in this case some more "wakeup..." files appeared, but no autosuspend, level or control file.

So I connected the same devices to my desktop ubuntu PC and checked the files, and here all of them are existent. I thought maybe my Raspbian installation went wrong, so I deleted it and installed it again. But no progress. I have opencv and lib4l packages installed.

Can this be a problem with the distribution or the USB drivers? is there another option to put USB devices into suspend mode?

rahlquist
Posts: 149
Joined: Tue Jan 21, 2014 1:02 pm

Re: USB device suspend mode not working on RaspberryPi 2

Thu Mar 05, 2015 6:01 pm

If you have suspended it in Ubuntu as you mention in your other post, what driver was it using? Is that the same driver Raspberry is using?

Guter_Hirte
Posts: 9
Joined: Tue Mar 03, 2015 2:21 pm

Re: USB device suspend mode not working on RaspberryPi 2

Thu Mar 05, 2015 6:30 pm

how can i find out which driver is used on a specific device? I think that both are using video4linux, because i have installed it on both devices and a entry can be found in: /sys/bus/usb/devices/1-1.2/driver/1-1.2/1-1.2:1.0/video4linux (it is a directory that contains the video0 directory)
Is the existence of the "power" directory in /sys/bus/usb/devices/1-1.2 dependent on the driver used? When I plug a mouse to the USB connector, it also do not have the "power" directory, but on the Ubuntu PC it does. I do not think that it is the specific device driver, it must be some issue with the drivers for the raspberry pi components or the distribution.

rahlquist
Posts: 149
Joined: Tue Jan 21, 2014 1:02 pm

Re: USB device suspend mode not working on RaspberryPi 2

Thu Mar 05, 2015 6:39 pm

Lets start with;

lsusb && lsmod

with the camera plugged in. Report back with the result and we can go from there.

Guter_Hirte
Posts: 9
Joined: Tue Mar 03, 2015 2:21 pm

Re: USB device suspend mode not working on RaspberryPi 2

Thu Mar 05, 2015 7:03 pm

The output on the Pi is:

Code: Select all

Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 2b16:6689  
Bus 001 Device 005: ID 046d:c016 Logitech, Inc. Optical Wheel Mouse
Module                  Size  Used by
snd_bcm2835            18665  0 
snd_pcm                73475  1 snd_bcm2835
snd_seq                53078  0 
snd_seq_device          5628  1 snd_seq
snd_timer              17784  2 snd_pcm,snd_seq
snd                    50998  5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device
uvcvideo               69936  0 
videobuf2_vmalloc       3009  1 uvcvideo
videobuf2_memops        1552  1 videobuf2_vmalloc
videobuf2_core         33578  1 uvcvideo
v4l2_common             5077  1 videobuf2_core
videodev              122487  3 uvcvideo,v4l2_common,videobuf2_core
media                  11577  2 uvcvideo,videodev
evdev                   9950  2 
uio_pdrv_genirq         2958  0 
uio                     8119  1 uio_pdrv_genirq
The output of the PC is:

Code: Select all

Bus 002 Device 002: ID 0bda:0111 Realtek Semiconductor Corp. RTS5111 Card Reader Controller
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 048: ID 2b16:6689  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 003: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse
Bus 005 Device 002: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Module                  Size  Used by
uvcvideo               80885  0 
videobuf2_vmalloc      13216  1 uvcvideo
videobuf2_memops       13362  1 videobuf2_vmalloc
videobuf2_core         40664  1 uvcvideo
videodev              134688  2 uvcvideo,videobuf2_core
cdc_acm                28803  0 
bnep                   19624  2 
rfcomm                 69160  0 
bluetooth             391136  10 bnep,rfcomm
snd_hda_codec_hdmi     46368  4 
snd_hda_codec_realtek    65580  1 
joydev                 17381  0 
nouveau              1097199  4 
hid_generic            12548  0 
usbhid                 52659  0 
hid                   106148  2 hid_generic,usbhid
mxm_wmi                13021  1 nouveau
wmi                    19177  2 mxm_wmi,nouveau
video                  19476  1 nouveau
ttm                    93424  1 nouveau
drm_kms_helper         55071  1 nouveau
snd_hda_intel          56531  5 
drm                   303102  6 ttm,drm_kms_helper,nouveau
snd_hda_codec         192906  3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
i2c_algo_bit           13413  1 nouveau
snd_hwdep              13602  1 snd_hda_codec
snd_pcm               102099  3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
gpio_ich               13476  0 
snd_page_alloc         18710  2 snd_pcm,snd_hda_intel
snd_seq_midi           13324  0 
coretemp               13435  0 
snd_seq_midi_event     14899  1 snd_seq_midi
snd_rawmidi            30144  1 snd_seq_midi
snd_seq                61560  2 snd_seq_midi_event,snd_seq_midi
kvm                   455835  0 
snd_seq_device         14497  3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer              29482  2 snd_pcm,snd_seq
snd                    69322  21 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec,snd_hda_intel,snd_seq_device,snd_seq_midi
serio_raw              13462  0 
lpc_ich                21080  0 
soundcore              12680  1 snd
mei_me                 18627  0 
mei                    82276  1 mei_me
shpchp                 37032  0 
tpm_infineon           17372  0 
mac_hid                13205  0 
parport_pc             32701  1 
ppdev                  17671  0 
lp                     17759  0 
parport                42348  3 lp,ppdev,parport_pc
psmouse               106714  0 
usb_storage            62209  0 
floppy                 69418  0 
e1000e                254433  0 
ptp                    18933  1 e1000e
pps_core               19382  1 ptp
pata_acpi              13038  0 

rahlquist
Posts: 149
Joined: Tue Jan 21, 2014 1:02 pm

Re: USB device suspend mode not working on RaspberryPi 2

Thu Mar 05, 2015 9:44 pm

That was very helpful. So it appears the camera uses the uvcvideo projects driver. So you need to look into if that driver supports power management with your device.

Return to “General discussion”