Regression: skype webcam (Chicony CNF7129) image very dark on Asus 1000HE on Lucid LTS (10.4) UNE

Bug #542042 reported by Mark Schroeder on 2010-03-19
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
libv4l (Ubuntu)
Undecided
Unassigned

Bug Description

Regression: skype webcam (Chicony CNF7129) image very dark on Asus 1000HE on Karmic (9.10) UNR,
works on Jaunty (9.04) UNR

Summary:

Skype has regressed in Karmic UNR on Asus 1000HE - CNF7129 camera image extremely dark.
Webcam image works in Jaunty UNR on Asus 1000HE.
Specific to skype; cheese works fine on both Jaunty and Karmic. Initial image
is just a little dark on startup, then darkens to almost black after a fraction
of a second.

Hardware: Asus EEE 1000HE / Chicony CNF7129 webcam (builtin)
Skype: skype-ubuntu-intrepid_2.1.0.81-1_i386.deb (current) from
    http://www.skype.com/download/skype/linux/choose/ (Ubuntu 8.10+ 32 bit)
    (The same .deb was tested on Jaunty UNR (works) and Karmic UNR (fails))

Some related packages:
    Jaunty UNR (tested using liveusb and/or installation):
        kernel from distro(liveusb)
        libv4l-0 from distro(liveusb) or 0.5.8-1

        lsmod | fgrep vid
        uvcvideo 63368 0
        compat_ioctl32 9344 1 uvcvideo
        videodev 41600 1 uvcvideo
        v4l1_compat 21764 2 uvcvideo,videodev
        video 25872 0
        output 11008 1 video

     Karmic:
        kernel 2.6.31-20-generic
        libv4l-0 0.6.0-1

        lsmod | fgrep vid
        uvcvideo 59080 0
        videodev 36736 1 uvcvideo
        v4l1_compat 14336 2 uvcvideo,videodev
        video 19380 0
        output 2780 1 video

Other scenarios tested:

- Tried skype_2.0.0.72.orig.tar.gz on Karmic UNR. Webcam image is just as bad/dark.
  Not surprising, given that the latest skype .deb works on Jaunty but gives
  dark images on Karmic. (Both skype's work on Jaunty; latest fails on Karmic.)

- Tried 'LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype'. No effect.

- Tried the latest libv4l-0 from https://launchpad.net/~libv4l/+archive/ppa
  No improvement. According to the page, this includes what's below, but no improvement.

      Package Version Uploaded by
      gtk-v4l 0.1-1 Stephane Marguet (2010-02-25)
      libv4l 0.6.4-1+hg20100220~kkv4l2 Stephane Marguet (2010-03-10)
      v4l-utils 0.7.91-1~kkv4l1 Stephane Marguet (2010-03-12)
      v4l2ucp 2.0.2-1~kkv4l1 Stephane Marguet (2010-01-29)

- Tried luvcview. Adjustments to brightness and/or gamma are not sufficient
  to get an image as bright/balanced as cheese. Changes have an effect,
  but they are minimal, still too dark to be acceptable, and not nearly
  as good as cheese

- Tried xawtv/v4lctl. Effects are the same as luvcview, and still too dark and
  not nearly as good as cheese

- Tried guvcview. Same as luvcview and v4lctl / not enough effect.

- None of the V4L tools above provide access to an auto exposure or auto gain
  setting. Interesting, since the "initially some brighter, fade to almost black"
  effect on startup really seems like an "exposure" adjustment taking place, and
  an auto exposure exposure seems to be in effect for cheese.

These are my current conjectures:

- Problem is not the skype deliverable (.deb). Same .deb file, same hardware.
  Jaunty works, Karmic fails. Not the CNF7129 either, since cheese works on both
  Jaunty and Karmic.

- I've read that Jaunty may be V4L1, Karmic V4L2, skype build uses V4L1.
  If correct, could be a V4L1/2 compatibility problem. Might even be an
  auto exposure or auto gain that is missing from or bad in the compatibility API.
  None of the *uvcview tools show exposure/gain as being settable. The skype
  startup behavior "looks like" a fairly quick exposure compensation on webcam startup.
  As a photographer, this looks *so* much like an auto exposure control missing.
  This could also explain why cheese works and skype fails.

- Could be in the video module/driver (uvcvideo). I don't know how Jaunty differs
  from Karmic in its webcam drivers. (How can this explain cheese working and
  skype failing?)

- Cheese images are somewhat brighter than skype images, even on Jaunty UNR. Not terribly
  different, but brighter. Maybe for Karmic, cheese images were "adjusted down",
  which would make skype images even darker. Again as a photographer, I don't
  think this is the explanation -- the skype images are *much* darker, almost black --
  and much darker than explained by just darkening the cheese images a little bit.
  But I cannot rule this out entirely.

Additional observation -- I've now found that skype images are not *always* darker.
Here in a coffee shop with a really bright spotlight pointed straight at my face,
the cheese and skype webcam images are both well lit.

If I move to the table right next to me (still well lit, but no spotlight pointed right at me),
the skype images are "under-exposed" by what I would guess to be 2-3 stops photographically
(very dark), but the cheese images are similar (well lit) whether in or not in the spotlight.
In my lighting at home, the difference is more like 4 stops (silhouette).

This looks very much like an "auto exposure" setting that cheese is able to set and
skype is unable to set for some reason on Karmic. And both cheese and skype are
able to set it (or whatever setting it is) on Jaunty, since images are well lit using both programs
on Jaunty.

Images (cheese photos / skype screenshots) are available if seeing them would help.
Let me know how I can help debug this issue further.

I am the submitter of this bug, and it should be closed for now. I have not been able to reproduce the correct function of the skype .deb file on Jaunty on the Asus 1000HE, which means this may not be a regression. (Believe me, I've tried... A lot...) Installing the current skype .deb file on Jaunty UNR has not produced good (well lit) webcam images as I believed when I reported this. Something else may have already been on the system because of my testing, but what I do not know. Perhaps something from the Medibuntu repository.

The webcam problem is not resolved -- extremely dark webcam images using the skype .deb from the skype site -- but I cannot demonstrate this to be a regression at this time. If I can reproduce it as a regression again. I will create another bug report with my findings.

description: updated
Changed in ubuntu:
status: New → Confirmed

I had recommended closing this Karmic bug because I cannot prove it's a regression. However, I have now duplicated the dark webcam behavior on Karmic with guvcview only, and it's very interesting. The problem can be demonstrated very simply:

- Start guvcview
- Select the video & files setting tab
- Change the frame rate setting, trying each of the choices

With the Chicony CHF7129 camera, in low light (think a single 60-90 watt bulb):

- 30 fps and 5 fps settings give a reasonably well exposed image
- 20, 15, and 10 fps settings fade immediately to almost completely black
 (just a few reflected highlights from glasses and my balding forehead)

Doing the same test on Karmic with my Logitech Notebook Deluxe Webcam, you get what you'd expect -- the best lighted image is at 5fps and it gets progressively darker as you move toward 30fps. The changes as you increase the fps setting are gradual, and even the darkest one isn't awful or as bad as the CNF7129 at the non-working fps settings.

But doing this test with the CNF7129, you get well exposed and surprising close images at both 30fps and 5fps, and an almost completely black image at all the other fps settings. The 30fps image is the best exposed as if "autoexposure" is on, while the 5fps image is just a little bit dark, but usable. All the other fps settings are unusably dark, but there's still an image. My conjecture is that skype is failing for the same reason -- effectively picking an fps setting that goes extremely dark -- but I can't prove that.

The testing I performed using v4l2ucp gives similar results.

Also, the room light has to be below some threshold to test, but a threshold which really should work ok. It's easy to test and find everything is working, when it's only working because there's a lot more light during the testing. It fails under typical home (incandescent) lighting (60-90 watts), and in coffee shops at night if you don't have a spotlight pointed right at you.

This is a very popular bug (well, unpopular, but often reported), on a very large number of Asus and other laptops. If a fix can be found for this, it makes *a lot* of people happy... (!)

I also tested Windows XP SP3 on the same 1000HE netbook/CNF7219 combo (yeah, I know... sorry, but I needed another comparison), and the Windows driver gets the best image in low light. It's just my impression, but it looks like Windows selects a frame rate in low light that's even lower than 5fps. (Move in front of the camera, and the image gets badly blurred/smeared.)

I've submitted this new information to Hans de Goede (video4linux) as well, and he recommended expanding the discussion to include Laurent Pinchart, which I have done.

affects: ubuntu → libv4l (Ubuntu)

A fix for this issue was just checked into the uvcvideo repository by Laurent Pinchart. It should be picked up by the V4L maintainer soon. Laurent indicated it should be in 2.6.36. I was the person who tested Laurent's change for this camera, and the fix is *very* conservative, safe, and camera specific (via a new quirk). The fix affects the uvcvideo kernel module, which makes it difficult (inaccessible) for most novice Ubuntu users, as the kernel module has to be rebuilt and installed.

What is the process to argue for picking this up in Ubuntu Lucid? 2.6.36 seems a long way away today, and there are so many Asus EEE 1000HE netbooks and other Asus laptops affected by this issue that could be easily fixed in the Lucid LTS.

For additional information, look for the Chicony CNF7129 camera entry (04f2:b071) and footnotes on:

    http://www.ideasonboard.org/uvc/

I'd like to thank Laurent Pinchart here as well for working with me to address this issue.

The patch for this issue has been checked into the uvcvideo V4L/DVB sources. Here is a link to the patch, which I will also include as an attachment:

    http://git.linuxtv.org/media_tree.git?a=commitdiff;h=86d8b6abbbc973a1dd7d3c8f9e3c3e06131703b2

What is the process to get this picked up and if possible backported to the 10.4 LTS?

If you prefer a link to the mainline tree in git.kernel.org, here are the links:

/pub/scm / linux/kernel/git/mchehab/linux-2.6.git:

    2010-10-07 Linus Torvalds Merge branch 'v4l_for_linus' of git://git.kernel.org...
    http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-2.6.git;a=commit;h=a4099ae79d04ecf31bd0fc5aa4c1472b6fa7993a

    2010-09-28 Laurent Pinchart V4L/DVB: uvcvideo: Restrict frame rates for Chicony...
    http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-2.6.git;a=commit;h=86d8b6abbbc973a1dd7d3c8f9e3c3e06131703b2

/pub/scm / linux/kernel/git/mchehab/linux-next.git:

    2010-10-07 Linus Torvalds Merge branch 'v4l_for_linus' of git://git.kernel.org...
    http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-next.git;a=commit;h=a4099ae79d04ecf31bd0fc5aa4c1472b6fa7993a

    2010-09-28 Laurent Pinchart V4L/DVB: uvcvideo: Restrict frame rates for Chicony...
    http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-next.git;a=commit;h=86d8b6abbbc973a1dd7d3c8f9e3c3e06131703b2

In each case, the merge branch (listed first) contains the fix for the Chicony CNF7129 , among other fixes.

What is the process to get this picked up and backported to the 10.4 LTS?

summary: Regression: skype webcam (Chicony CNF7129) image very dark on Asus
- 1000HE on Karmic (9.10) UNR
+ 1000HE on Lucid LTS (10.4) UNE
tags: added: patch
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers