Why does Ubuntu create at one day /dev/video0 and at another day /dev/video1?
Detlef.Lechner at gmx.net
Wed Nov 18 12:23:53 UTC 2009
Nils Kassube wrote:
> From your remark "after thawing" I suppose you had the machine in sleep
> Yes. This is correct.
> As you are probably talking about your USB webcam, this fact seems
> to be important to me.
> The kernel uses video0 for the first installed device then video1 for
> the second device and so on. However if the expected device name is in
> use, the kernel takes the next name. You can check it if you insert your
> webcam and start the program cheese (xawtv may work also). Unplug the
> webcam while cheese is still running and plug it in again. Then stop
> cheese and check which devices you have - it should be /dev/video1 if it
> was /dev/video0 before.
I have made this test. The outcome was as you predicted.
> Now if you put the machine in sleep mode, you may have left xawtv
> running while you put it to sleep.
Apparently this was the case, yes.
> When the machine wakes up, it powers
> up the USB port and the webcam is found but video0 is in use by xawtv
> which lets the kernel use video1 instead.
A convincing explanation. -- Thank you.
>> day '~$ xawtv /dev/video1;
>> This is xawtv-3.95.dfsg.1, running on Linux/i686 (2.6.31-14-generic);
>> xinerama 0: 1400x1050+0+0;
>> WARNING: No DGA direct video mode for this display.
>> can't open /dev/video0: No such file or directory.'
>> Why does this program tell me this? I've told it to use /dev/video1.
> No, you didn't. If you want it to use video1, the command would be
> "xawtv -c /dev/video1".
Ah, ok. This works too. Thank you very much.
More information about the ubuntu-users