You are not logged in.

#1 2015-01-30 16:31:12

deanp
Member
Registered: 2013-01-15
Posts: 9

XPS 12 (9Q33 Haswell) webcam troubleshooting, limited functionality

Hello all,

Arch is purring on my xps 12, but one thing which I have yet not managed to make work, and which is after one year of owning this thing finally starting to annoy me is the webcam. The webcam will work under only very specific resolutions in Cheese or guvcview and will not work under Skype at all. There is a bug report for this in Feb 2014 but nothing really since then, and the description in the link represents the issues I have bang on:

http://permalink.gmane.org/gmane.linux. … ture/74658

It is a long shot, but has anyone managed to find a workaround for this?

Offline

#2 2015-02-15 23:23:56

AElfwine
Member
Registered: 2011-07-12
Posts: 5

Re: XPS 12 (9Q33 Haswell) webcam troubleshooting, limited functionality

I had exactly the same problem for a year and your message motivated me to find a workaround smile The issue seems to be that some applications don't seem to deal properly with this webcam, or maybe its the webcam which supplies a weird format.

Anyway I managed to make it work in Skype by using a virtual webcam which is a reencoded duplicate of the real one. The method I used only needs the v4l2loopback kernel module and gstreamer. You may be able to use webcamstudio for this too but the PKGBUILDs from the AUR dont work very well (issue with java).

Provided you have gstreamer (in particular gstreamer0.10-good-plugins), you just need to install v4l2loopback-git from AUR. You'll need to edit the PKGBUILD to change the install directory to

"$pkgdir/usr/lib/modules/$(uname -r)/kernel/drivers/misc/v4l2loopback.ko"

instead of

"$pkgdir/lib/modules/$(uname -r)/kernel/drivers/misc/v4l2loopback.ko"

(at the end of the PKGBUILD)

I think this is because the PKGBUILD was created a before /lib became a symlink to /usr/lib but I'm not sure. This is a kernel module so you'll need to recompile it with every kernel update sad There is also a dkms version of the package which should avoid that but I didn't try.

Once it is installed, you can load the module:

sudo modprobe v4l2loopback

This will create a virtual webcam in /dev/video1. The real one is /dev/video0. Then I use gstreamer to copy the stream from /dev/video0 to /dev/video1 with this command:

gst-launch-0.10 v4l2src device=/dev/video0 ! "video/x-raw-yuv,width=1280,height=720,framerate=15/1" !  v4l2sink device=/dev/video1

You can also downscale the resolution to 640x360 with this command:

gst-launch-0.10 v4l2src device=/dev/video0 ! "video/x-raw-yuv,width=1280,height=720,framerate=15/1" ! videoscale ! "video/x-raw-yuv, width=640, height=360"  !  v4l2sink device=/dev/video1

The wiki of v4l2loopback gives some examples, and claims you need to set a specific option for skype to be able to read the stream but I didnt have any issue. You can have a look if you encounter issues:
https://github.com/umlaeute/v4l2loopback/wiki/Skype

It should be possible to use mplayer or ffmpeg if you dont have gstreamer too (cf https://github.com/umlaeute/v4l2loopback/wiki) but I didnt try. VLC doesnt seem to be able to stream to a device so I dont think its possible with it.

Last edited by AElfwine (2015-02-16 00:26:20)

Offline

#3 2015-02-15 23:34:28

Pank
Member
From: IT
Registered: 2009-06-13
Posts: 371

Re: XPS 12 (9Q33 Haswell) webcam troubleshooting, limited functionality

Thanks a lot!  Also for posting in the other thread; otherwise I wouldn't have seen your solution.

Have you by any chance tested if the camera works with one of them fancy WebRTC sites?  I know my friend uses those frequently.  E.g. https://talky.io/  (you can test it by creating a new room without necessarily talking to anybody).

I'll be sure to try it the next time I see my friend.  Out of curiosity, did you test it


Arch x64 on Thinkpad X200s/W530

Offline

#4 2015-02-15 23:52:19

AElfwine
Member
Registered: 2011-07-12
Posts: 5

Re: XPS 12 (9Q33 Haswell) webcam troubleshooting, limited functionality

I just test it and it seems to work with chrome. You just need to choose the right webcam in the settings. The virtual one seems to be 'Dummy video device (0x0000)'. Same thing in Firefox.

Remember that to use the gstreamer v4l2 plugin, you'll need to install gstreamer-0.10-good-plugins

Offline

#5 2015-02-16 00:34:04

Pank
Member
From: IT
Registered: 2009-06-13
Posts: 371

Re: XPS 12 (9Q33 Haswell) webcam troubleshooting, limited functionality

OK thanks.  I'll see if I can get it working in Fedora the next time I see my friend.  I hope they've got some sort of dkms package.


Arch x64 on Thinkpad X200s/W530

Offline

#6 2015-03-10 18:48:14

Pank
Member
From: IT
Registered: 2009-06-13
Posts: 371

Re: XPS 12 (9Q33 Haswell) webcam troubleshooting, limited functionality

So AElfwine from your fix is seems like the probem mainly by rescaling the output of the webcam.  However, as I recall I could not get good results by readjust the dimensions in Gnome Cheese.  So it's puzzeling that this works.  Unless there's some magic going on with hte video/x-raw-yuv.

If my understanding of your fix is correct, is it then error then due to either that whatever information the camera provides is inaccurate (wrong resolution, frame rate?) or because the kernel/v4l2(?) interprets it wrongly, somehow.

Did you or somebody else open a bug for this on Kernel?  It seems like it would be worth fixing.  I don't normally have access to this camera, so I can't do it.


Arch x64 on Thinkpad X200s/W530

Offline

#7 2015-03-10 23:06:25

AElfwine
Member
Registered: 2011-07-12
Posts: 5

Re: XPS 12 (9Q33 Haswell) webcam troubleshooting, limited functionality

Yes I am not sure exactly what is going on with this webcam... Do you know where should a bug be filed for this? I guess its not Arch-specific.

Offline

#8 2015-03-10 23:47:47

Pank
Member
From: IT
Registered: 2009-06-13
Posts: 371

Re: XPS 12 (9Q33 Haswell) webcam troubleshooting, limited functionality

No it's present in Fedora, Arch, and Ubuntu last I checked.  It's either a bug in the kernel or a bug in the camera.

I guess you'd report it on the kernel bugzilla or the v4l mailing list under something like:

Product: 	v4l-dvb
Component: 	webcam

here's their guide, I didn't read it closly.


Arch x64 on Thinkpad X200s/W530

Offline

Board footer

Powered by FluxBB