systemd-tools and udev are in conflict


13 posts
by Fuzzwah » Mon Jun 04, 2012 9:16 am
I'm just running through the initial setup of my RPi. I've gone with the archlinux distro (as my 1st project is webcam related and I've read here on the forum that arch "just works").

When I run the pacman -Syu command I see the following:

Code: Select all
[root@alarmpi /]# pacman -Syu
:: Synchronizing package databases...
 core                      38.6 KiB  43.1K/s 00:01 [######################] 100%
 extra                    424.5 KiB  36.2K/s 00:12 [######################] 100%
 community                397.4 KiB  14.8K/s 00:27 [######################] 100%
 alarm                      2.2 KiB  6.45K/s 00:00 [######################] 100%
 aur                       10.2 KiB  4.02K/s 00:03 [######################] 100%
:: The following packages should be upgraded first :
    pacman
:: Do you want to cancel the current operation
:: and upgrade these packages now? [Y/n] y

resolving dependencies...
:: There are 2 providers available for udev:
:: Repository core
   1) systemd-tools  2) udev-oxnas

Enter a number (default=1):
looking for inter-conflicts...
:: systemd-tools and udev are in conflict. Remove udev? [y/N]


I went with the default figuring that would be the safest, but I currently don't know what systemd-tools or udev are.

Any tips?
User avatar
Posts: 7
Joined: Mon Jun 04, 2012 6:29 am
by BPK » Mon Jun 04, 2012 10:24 am
Hi,
Same for me, I am trying to get a Logitech C300 webcam up and running. I tried various different things on the debian squeeze distro such as trying to get v4l installed as a module (no joy for me probably not enough Linux knowledge) and using the latest rasp pi image as specified at http://www.raspberrypi.org/phpBB3/viewtopic.php?f=38&t=6942&p=90589&hilit=webcam#p90589

I had more luck with the latest pi image in which I could see v4l and video0 in /dev but still could not playback the webcam (I was trying it in VLC).

So I abandoned the Debian Squeeze distro and went for the arch Linux approach as described by Jeremy http://jeremyblythe.blogspot.co.uk/2012/05/raspberry-pi-webcam.html

After I changed IP address and name server and I run
Code: Select all
pacman -Syu

I get the following:
Code: Select all
:: The following packages should be upgraded first :
    pacman
:: Do you want to cancel the current operation
:: and upgrade these packages now? [Y/n]

I say Y and then as above get asked
Code: Select all
resolving dependencies...
:: There are 2 providers available for udev:
:: Repository core
   1) systemd-tools  2) udev-oxnas

Enter a number (default=1):


After choosing 1 and then getting
Code: Select all
:: systemd-tools and udev are in conflict. Remove udev? [y/N]


Which I choose Y and then choose to proceed with installation, I get:
Code: Select all
Proceed with installation? [Y/n] Y
(27/27) checking package integrity                 [######################] 100%
(27/27) loading package files                      [######################] 100%
(27/27) checking for file conflicts                [######################] 100%
error: failed to commit transaction (conflicting files)
hwids: /usr/share/hwdata/pci.ids exists in filesystem
hwids: /usr/share/hwdata/usb.ids exists in filesystem
systemd-tools: /usr/share/man/man5/hostname.5.gz exists in filesystem
systemd-tools: /usr/share/man/man5/locale.conf.5.gz exists in filesystem
systemd-tools: /usr/share/man/man5/vconsole.conf.5.gz exists in filesystem
Errors occurred, no packages were upgraded.


Sorry for the long post but I think a few may have this issue as I imagine lots will be wanting to connext a webcam so if someone can answer it will help us all out :)
Barnaby Kent
http://www.pi-cars.com
Control your radio controlled car through your Raspberry Pi
Posts: 30
Joined: Mon Jun 04, 2012 10:12 am
Location: Bristol, United Kingdom
by BPK » Mon Jun 04, 2012 1:07 pm
First mistake was choosing y when asked:
Code: Select all
:: The following packages should be upgraded first :
    pacman
:: Do you want to cancel the current operation
:: and upgrade these packages now? [Y/n]


I have since chosen n and got on much further, I'll update when I run into the next thing
Barnaby Kent
http://www.pi-cars.com
Control your radio controlled car through your Raspberry Pi
Posts: 30
Joined: Mon Jun 04, 2012 10:12 am
Location: Bristol, United Kingdom
by pepedog » Mon Jun 04, 2012 1:27 pm
It's wierd that if pacman needs upgrading first, you should say no. Have found it's best to do that though.
To overcome next step
pacman -Syyuf
systemd replaces udev, udev is inside it
Posts: 980
Joined: Fri Oct 07, 2011 9:55 am
by BPK » Mon Jun 04, 2012 2:06 pm
ok so got a bit further. Now have installed everything ok. I can see my webcam using
Code: Select all
[root@alarmpi dev]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 012: ID 046d:081b Logitech, Inc. Webcam C310
[root@alarmpi dev]#


And also have a /dev/video1

Code: Select all
[root@alarmpi dev]# cd /dev/
[root@alarmpi dev]# ls -l vid*
crw-rw---- 1 root video 81, 1 Jun  4 14:58 video1
[root@alarmpi dev]#


Using the example in http://jeremyblythe.blogspot.co.uk/ I should then run:
Code: Select all
ffserver -f /root/ffserver.conf & ffmpeg -v 2 -r 5 -s 640x480 -f video4linux2 -i /dev/video0 http://localhost:8090/webcam.ffm


This did now seem to be working - my browser just timed out and I could not telnet to 8090. So I tried to just get ffmpeg collecting and writing to a local file with the following
Code: Select all
 ffmpeg -f v4l2 -s 640x480 -i /dev/video0 out.mpg


Which did not seem to work also I got:
Code: Select all
ffmpeg -f v4l2 -s 640x480 -i /dev/video1 out.mpg
ffmpeg version 0.10.3 Copyright (c) 2000-2012 the FFmpeg developers
  built on May 10 2012 14:43:09 with gcc 4.6.3
  configuration: --prefix=/usr --enable-libmp3lame --enable-libvorbis --enable-l                       ibxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-libgsm --ena                       ble-libspeex --enable-postproc --enable-shared --enable-x11grab --enable-libopen                       core_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenj                       peg --enable-librtmp --enable-libpulse --enable-gpl --enable-version3 --enable-r                       untime-cpudetect --disable-debug --disable-static
  libavutil      51. 35.100 / 51. 35.100
  libavcodec     53. 61.100 / 53. 61.100
  libavformat    53. 32.100 / 53. 32.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 61.100 /  2. 61.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
[video4linux2,v4l2 @ 0xae2b20] ioctl(VIDIOC_DQBUF): No such device
[video4linux2,v4l2 @ 0xae2b20] Estimating duration from bitrate, this may be ina                       ccurate
Input #0, video4linux2,v4l2, from '/dev/video1':
  Duration: N/A, bitrate: 147456 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456 k                       b/s, 30 tbr, 1000k tbn, 30 tbc
Incompatible pixel format 'yuyv422' for codec 'mpeg1video', auto-selecting forma                       t 'yuv420p'
[buffer @ 0xae0860] w:640 h:480 pixfmt:yuyv422 tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0xae0b00] auto-inserting filter 'auto-inserted scale 0' between th                       e filter 'src' and the filter 'out'
[scale @ 0xae0f80] w:640 h:480 fmt:yuyv422 -> w:640 h:480 fmt:yuv420p flags:0x4
[mpeg @ 0xadd020] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'out.mpg':
  Metadata:
    encoder         : Lavf53.32.100
    Stream #0:0: Video: mpeg1video, yuv420p, 640x480, q=2-31, 200 kb/s, 90k tbn,                        30 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
Press [q] to stop, [?] for help
[video4linux2,v4l2 @ 0xae2b20] ioctl(VIDIOC_DQBUF): No such device
frame=    0 fps=  0 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=   0.0kbits/                       s
video:0kB audio:0kB global headers:0kB muxing overhead nan%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters i                       f used)


I think I am also making it a bit unhappy as the webcam seems to keep shifting from /dev/video0 to /dev/video1
Barnaby Kent
http://www.pi-cars.com
Control your radio controlled car through your Raspberry Pi
Posts: 30
Joined: Mon Jun 04, 2012 10:12 am
Location: Bristol, United Kingdom
by jerbly » Mon Jun 04, 2012 2:56 pm
I'm no expert here at all, but you could try something with mplayer instead. This command tries to grab 10 frames as jpegs from the webcam:
Code: Select all
mplayer tv:// -frames 10 -tv fps=5:driver=v4l2:width=640:height=480:device=/dev/video0 -vo jpeg

I'm now using a Microsoft Life Cam Cinema with Motion and this seems a stable combo too.
Hope that helps.

J.
Posts: 6
Joined: Tue May 15, 2012 7:25 am
by BPK » Tue Jun 05, 2012 10:18 am
Thanks jerbly for the idea when I run it, it does take some images but they are all green screens.

I know the Logitech webcam works but am wondering whether I need to do anything else to install drivers?

As I put in an earlier post I can see it when I do

Code: Select all
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 015: ID 046d:081b Logitech, Inc. Webcam C310
[root@alarmpi ~]#


I have also seen that it is listed in the supported USB devcies at http://www.linux-usb.org/usb.ids

But I am not sure if I am supposed to do something else to install a driver

It is also weird that although I do have a /dev/video0, when I use ffmpeg or mplayer it switches to video1

Any ideas anyone?
Barnaby Kent
http://www.pi-cars.com
Control your radio controlled car through your Raspberry Pi
Posts: 30
Joined: Mon Jun 04, 2012 10:12 am
Location: Bristol, United Kingdom
by BPK » Tue Jun 05, 2012 11:16 am
I think I have found the answer to my question above of whether I needed to install an extra driver. The following page was useful for this https://wiki.archlinux.org/index.php/Webcam_Setup

But before that I found this page https://wiki.ubuntu.com/HardwareSupportComponentsMultimediaWebCamerasLogitech which let me know that my Logitech C310 actually uses the uvcvideo driver.

Back to the arch linux page https://wiki.archlinux.org/index.php/Webcam_Setup#Make_sure_the_module_is_loaded_for_your_webcam which let me know that the driver should be automatically loaded by the kernel which you can see by running dmesg and after I did a reboot I saw

Code: Select all
Linux media interface: v0.10
Linux video capture interface: v2.00
uvcvideo: Found UVC 1.00 device <unnamed> (046d:081b)
input: UVC Camera (046d:081b) as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1$
usbcore: registered new interface driver uvcvideo
USB Video Class driver (1.1.1)


So I think the driver is installed and ready to go, I just need to work out why I cannot get even get an image from it :(
Barnaby Kent
http://www.pi-cars.com
Control your radio controlled car through your Raspberry Pi
Posts: 30
Joined: Mon Jun 04, 2012 10:12 am
Location: Bristol, United Kingdom
by fleet » Tue Jun 05, 2012 1:58 pm
Haven't read thread, but refer to archlinux.org if you are in doubt in the future:
http://www.archlinux.org/news/systemd-t ... aces-udev/
Posts: 2
Joined: Sat May 26, 2012 4:11 pm
by BPK » Tue Jun 05, 2012 7:56 pm
Note that the title from this thread is slightly misleading as it is mainly about attempting to get a webcam working with Raspberry PI.

I did find that the arch linux wiki did seem very good and in particular the following page http://www.raspberrypi.org/phpBB3/viewtopic.php?f=53&t=7435&p=92290&hilit=webcam#p92290 helped me understand things greatly.

I still have not been able to get anything working with arch linux and am back on the updated debian squeeze distro - http://www.raspberrypi.org/phpBB3/viewtopic.php?f=38&t=6942&p=90589&hilit=webcam#p90589 as I can see that I have a /dev/video0 and I have a GUI, I'll post here my success or failures for others.
Barnaby Kent
http://www.pi-cars.com
Control your radio controlled car through your Raspberry Pi
Posts: 30
Joined: Mon Jun 04, 2012 10:12 am
Location: Bristol, United Kingdom
by jecxjo » Tue Jun 05, 2012 10:03 pm
I knew I should have recorded what I did to clear this issue up. Its actually straight forward and typical type of situation when you use Arch.

The problem is that some files were previously controlled by one package and now is controlled by a new package. So for instance the lines:
Code: Select all
hwids: /usr/share/hwdata/pci.ids exists in filesystem
hwids: /usr/share/hwdata/usb.ids exists in filesystem


Means that /usr/share/hwdata/pci.ids exists and the package being installed that is trying to write here is not currently the owner of the file. If you perform:
Code: Select all
[jeff@jeffpi ~]$ pacman -Qo /usr/share/hwdata/pci.ids
/usr/share/hwdata/pci.ids is owned by hwids 20120512-1
[jeff@jeffpi ~]$


NOTE: The files listed in my example are the final package used so you'll probably get a different name.

So now that you know which package owns the file you can first try installing the owner package to see if pacman is just not seeing the update (usually the case when there is a pacman update pending). The other option is to remove the package and then do the update, though this could cause problems so try upgrading first, and only if that fails try removing it.

I think the two packages controlling the hwids files is pciutils and usbutils. Try

Code: Select all
pacman -Syy usbutils pciutils hwids


The following link explains the same situation but for the systemd situation you have going on.

https://bbs.archlinux.org/viewtopic.php?id=142508
IRC (w/ SSL Support): jecxjo.mdns.org
Blog: http://jecxjo.motd.org/code
ProjectEuler Friend: 79556084281370_44d12dd95e92b1d9453aba2bdc94101b
User avatar
Posts: 157
Joined: Sat May 19, 2012 5:22 pm
Location: Ames, IA (USA)
by pld7 » Thu Jun 07, 2012 9:37 am
I think this thread is describing the same problem. The solution seems a bit more elegant too.

viewtopic.php?f=53&t=7625
Posts: 13
Joined: Thu May 31, 2012 10:12 am
by BPK » Thu Jun 07, 2012 9:55 pm
Update on my webcam attempts, as noted above I went back to the updated Debian squeeze distro which I could see was creating a /dev/video0 when I plugged the webcam in. I now understand that this means that the webcam driver is installed and working. I can also see this from running dmesg which lets me know that the webcam has been detected:

Code: Select all
usb 1-1.2: new high speed USB device number 6 using dwc_otg
usb 1-1.2: New USB device found, idVendor=0ac8, idProduct=0332
usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1.2: Product: USB 2.0 Camera
usb 1-1.2: Manufacturer: Vimicro Corp.
uvcvideo: Found UVC 1.00 device USB 2.0 Camera (0ac8:0332)
input: USB 2.0 Camera as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0/input/input3


I ran the IDE on the pi and from the terminal ran xawtv this worked and provided video from the the webcam.

For my needs I wanted to record video from the data so used ffmpeg, this seemed to get very fussy about the resolution I requested but after seeing in the xawtv messages the resolution it was using I got the following command line working:

Code: Select all
ffmpeg -v 5 -f video4linux2 -s 352x288 -y  -r 30 -sameq -i /dev/video0 -vcodec copy out.avi


If I did not use vcodec copy tag ffmpeg attempted to try and encode the output as well which made the pi work too hard and not practical. Using the copy does make very large file sizes but for my purposes this was ok.
Barnaby Kent
http://www.pi-cars.com
Control your radio controlled car through your Raspberry Pi
Posts: 30
Joined: Mon Jun 04, 2012 10:12 am
Location: Bristol, United Kingdom