Wednesday, July 1, 2009

Webcam picture too dark

So this is a problem I had with Skype. Most Linux apps that use a webcam actually provide a way to adjust brightness and contrast. Not Skype. Probably because this requires root privileges, and they know no self-respecting Linux admin is going to give them that.

The fix is actually pretty easy.

First, to see immediate results do this:

echo 4 /sys/module/gspca/parameters/gamma
echo 290 /sys/module/gspca/parameters/GRed
echo 310 /sys/module/gspca/parameters/GGreen
echo 315 /sys/module/gspca/parameters/GBlue

Don’t assume that these parameters are infinitely hackable. For example, I found a gamma of 6 had no effect but that 4 brightened things right up.

If these settings work for you, put them into /etc/modprobe.d/options (if it doesn’t exist yet, create it) so they’ll come back after your next reboot. Thus:

options gspca gamma=4
options gspca GRed=290
options gspca GGreen=310
options gspca GBlue=315

Thanks to user Excalibur on Skype Community for this tip.