Device '/dev/video0' is busy

Bug #1445039 reported by themusicgod1
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
cheese (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

First time I run cheese during the day, an attempt to take a picture typically results in an error being displayed on a black background in the preview pane "There was an error playing video from the webcam" (odd for two reasons, one I'm taking a picture, not video, and two... it's an error message that indicated something indeed went wrong)

(cheese:2506): cheese-WARNING **: Device '/dev/video0' is busy: gstv4l2object.c(2838): gst_v4l2_object_set_format (): /GstCameraBin:camerabin/GstWrapperCameraBinSrc:camera_source/GstBin:bin18/GstV4l2Src:video_source:
Call to S_FMT failed for YU12 @ 1280x720: Device or resource busy

webcam:
                      description: Video
                      product: HD WebCam
                      vendor: NC.21411.01N415006E5LM0002
                      physical id: 1
                      bus info: usb@3:1.1
                      version: 0.02
                      capabilities: usb-2.00
                      configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s

linux:
Linux Hedy 3.19.0-13-generic #13-Ubuntu SMP Thu Apr 9 22:56:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

ubuntu : 15.04

cheese:
  Installed: 3.14.1-2ubuntu4
  Candidate: 3.14.1-2ubuntu4

The timer goes off, flash goes off, but no photo is saved in my ~/Webcam directory.

Attempts to take video, or attempts to take a few pictures using root seem to clear this problem up and after I have done so, cheese seems to be initialized correctly, and it works fine for awhile.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: cheese 3.14.1-2ubuntu4
ProcVersionSignature: Ubuntu 3.19.0-13.13-generic 3.19.3
Uname: Linux 3.19.0-13-generic x86_64
ApportVersion: 2.17.1-0ubuntu1
Architecture: amd64
CurrentDesktop: GNOME
Date: Thu Apr 16 10:20:25 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-07-09 (280 days ago)
InstallationMedia: Ubuntu-GNOME 14.10 "Utopic Unicorn" - Alpha amd64 (20140708)
SourcePackage: cheese
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
themusicgod1 (themusicgod1) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cheese (Ubuntu):
status: New → Confirmed
Changed in cheese (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Andrea Lazzarotto (Lazza) (andrea-lazzarotto) wrote :

«attempts to take a few pictures using root seem to clear this problem up»

If you mean you run it with sudo, this does not work for me as workaround. I get the same error.

Revision history for this message
heynnema (heynnema) wrote :

I have the same problem.

Revision history for this message
themusicgod1 (themusicgod1) wrote :

@andrea: it isn't a reliable workaround, but sometimes it seems to work. Course it could just be me seeing patterns that aren't there...it barely works at all.

Revision history for this message
themusicgod1 (themusicgod1) wrote :

This seems to have stopped happening an update or two into wily. cheese: 3.16.1-1ubuntu1

Revision history for this message
Eronides Junior (juniordireitouft) wrote :

I have the same problem.

no longer affects: cheese
Revision history for this message
Joshua Coats (rhwlo) wrote :

I ran into the same problem, and checked out the permissions on /dev/video0:

crw-rw----+ 1 root video 81, 0 Aug 22 11:14 /dev/video0

I also ran $(groups) to check my group membership and found that I wasn't in the group video. To rectify this, I ran $(sudo usermod -a -G video `whoami`), and after logging out and back in, I could use cheese normally again.

Revision history for this message
Patrick Brueckner (madmuffin) wrote :

rhwlo's workaround partially fixes the issue, but apparently only for the first picture taken within the session. The second picture will fail again with the exact same message.

When I create a new session (using su - `whoami`) it works fine for one picture, but a second try will not, and apparently it doesn't matter wether or not I restart cheese.

As soon as I close that session and create a new one, it works fine - for a single picture.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.