How to fix upside-down / inverted web camera laptop Asus K51AC issue on Ubuntu Linux and Debian GNU / Linux

Skype Video Inverted bat like linux screenshot

Does your camera show video correctly in cheese but shows captured video upside-down (inverted) in skype ?
This is an issue a friend of mine experienced on his Asus K51AC-SX037D laptop on both Ubuntu and Debian Linux.
As you can see in the picture above it is funny as with this bug the person looks like a batman ;)
As the webcam upside-down issue was present on both latest Ubuntu 11.10 and latest stable Debian Squeeze 6.02, my guess was other GNU / Linux rpm based distro like Fedora might have applied a fix to this weird Skype inverted video (bat human like) issue.
Unfortunately testing the webcam with Skype on latest both Fedora 16 and Linux Mint 12 appeared to produce the same webcam bug.

A bit of research for the issue online and try outs of a number of suggested methods to resolve the issue led finally to a work around, thanks to this post
Here is few steps to follow to make the webcam show video like it should:

1. Install libv4l-0 package

root@linux:~# apt-get --yes install libv4-0
...

Onwards to start skype directly from terminal and test the camera type:

hipo@linux:~$ LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype

This is the work around for 32 bit Linux install, most people however will probably have installed 64 bit Linux, for 64bit Linux installs the above command should be little different:

hipo@linux:~$ LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype

Once skype is launched test the camera and see if the camera capture is now uninverted, through menus:

S -> Options -> Video Devices -> Test

Skype Options Video devices screenshot

2. Create a skype Wrapper script Launcher

To make skype launch everytime with exported shell variable:
LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so

A new skype wrapper bash shell script should be created in /usr/local/bin/skype , the file should contain:

#!/bin/sh
LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so
/usr/bin/skype

To create the script with echo in a root terminal issue;

root@linux:~# echo '#!/bin/sh' >> /usr/local/bin/skype
root@linux:~# echo 'LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so' >> /usr/local/bin/skype
root@linux:~# echo '/usr/bin/skype' >> /usr/local/bin/skype
root@linux:~# chmod +x /usr/local/bin/skype

3. Edit the Skype gnome menu to substitute /usr/bin/skype Skype Launcher with /usr/local/bin/skype

Gnome 2 has a handy menu launcher, allowing to edit and add new menus and submenus (menus and items) to the Application menu, to launch the editor one has to click over Applications with last mouse button (right button) and choose Edit Menus

GNOME Edit menus screenshot

The menu editor like the one in the below screenshot will appear:

GNOME 2 Menu Editor Screenshot

In the preceeding Launcher properties window, Command: skype has to be substituted with:

GNOME2 Skype screenshot Launcher properties

Command: /usr/local/bin/skype

For console freaks who doesn't want to bother in editting Skype Launcher via GUI /usr/share/applications/skype.desktop file can be editted in terminal. Inside skype.desktop substitute:

Exec=skype

with

Exec=/usr/local/bin/skype

Skype fixed inverted bat like screenshot

As one can imagine the upside-down video image in Skype is not a problem because of Linux, but rather another bug in Skype (non-free) software program.
By the way everyone, who is using his computer with Free Software operating system FreeBSD, Linux etc. knows pretty well by experience, that Skype is a very problematic software; It is often a cause for system unexpected increased system loads, problems with (microphone not capturing), camera issues, issues with pulseaudio, problem with audio playbacks … Besides the long list of bugs there are unexpected display bugs in skype tray icon, bugs in skype messanger windows and at some rare occasions the program completely hangs and had to be killed with kill command and re-launched again.

Another worrying fact is Skype's versions available for GNU / Linux and BSD is completely out of date with its "competitor" operating systems MS Windows, MacOS X etc.
For people like me and my friend who want to use free operating system the latest available skype version is not even stable … current version fod download from skype's website is (Skype 2.2Beta)!

On FreeBSD the skype situation is even worser, freebsd have only option to run Skype ver 1.3 or v. 2.0 at best, as far as I know skype 2.2 and 2.2beta is not there.

Just as matter of comparison the latest Skype version on Windows is 5.x. Windows release is ages ahead its Linux and BSD ver. From a functional point of view the difference between Linux's 2.x and Windows 5.x is not that much different, what makes difference is is the amount of bugs which Linux and BSD skype versions contain…
Skype was about 6 months ago bought by Microsoft, therefore the prognosis for Skype Linux support in future is probably even darker. Microsoft will not probably bother to release new version of Skype for their competitor free as in freedom OSes.

I would like to thank my friend and brother in Christ Stelian for supplying me with the Skype screenshots, as well as for being kind to share how he fixed his camera with me.

Share this on

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

18 Responses to “How to fix upside-down / inverted web camera laptop Asus K51AC issue on Ubuntu Linux and Debian GNU / Linux”

  1. hip0 says:

    By the way the inverted head image can be also considered as a hack ;)

  2. gunt says:

    Hi, thank you for creating this post.

    I run all the codes and the image upside down on my webcam got fixed.
    I create the shell script with your instructions, but when i run skype again
    the image webcam still have the same issue. I look my face and it seems I want to be batman too.

    I think that the Exec=/usr/local/bin/skype is not executing properly.
    Do i need to reload, restart or reset those setting to take effect. sorry my english is not so good but I think you get the point.

    I follow all your instructions with no errors or warnings at all.
    After I add the >>> Exec=/usr/local/bin/skype <<<< to /usr/share/applications/skype.desktop. do i need to reload settings?
    How can i do that?

    My webcam image is fixed with the LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype from terminal.
    but not whith the run dialog gui. Any ideas ?
    My system is (amd64)
    Thank you once again for this post

    • admin Epiphany Debian GNU/Linux says:

      Maybe you need to log out from GNOME and login again. If you can’t make it work through /usr/share/applications/skype.desktop, you can also try to use the edit menus method and put a path to the /usr/local/bin/skype (as you can read me describe in the tutorial). Tell me if this works for you. Also make sure you have made /usr/local/bin/skype executable setting the +x executable flag.

      Best,
      Georgi

      • Sara says:

        Hi i’m having the same problem, but what i can’t do, mostly because i don’t know how, is how to make /usr/local/bin/skype executable. The permits don’t allow me. Any suggestions?

        Thanks

        • admin NETHERLANDS Mozilla Firefox Windows says:

          Hi Sara,
          chmod +x /usr/local/bin/skype makes it executable.

          Best
          Georgi

          • Sara says:

            Thanks, it is an executable now, the problem is that i need to change the script because i will need to put the LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype solution. It won’t allow me to change it, how do i undo the executable? Sorry for all the questions and the not chequing the script first.

          • Sara says:

            I did change the script with the sudo gedit… but it’s not working
            when i do the LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype it works, putting the image right but after i close skype it shows in the terminal an error of libv4l2, i don’t know if that’s relevant…
            thanks

          • admin NETHERLANDS Mozilla Firefox Windows says:

            Hi Sara,
            It is not problem you have some warnings after it quits. If skype works normal all is fine you can make the script to not output anything. If you start it like so
            LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype >/dev/null 2>&1

            Georgi

          • Sara says:

            Yeah it works like that in the terminal but still not in the script, i guess it doesn’t loads it, no idea what’s going on, lol

          • admin NETHERLANDS Epiphany Debian GNU/Linux says:

            Hi Sara,
            Try to exec the script like so:

            echo ‘#!/bin/sh’ >> /usr/local/bin/skype
            echo ‘LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so >/dev/null 2>&1′ >> /usr/local/bin/skype
            echo ‘/usr/bin/skype’ >> /usr/local/bin/skype
            chmod +x /usr/local/bin/skype

            This should work :)

            Happy Christ Birth
            Georgi

          • Sara says:

            when i write the first line in the terminal it says bash: /usr/local/bin/skype: permit denied,

          • admin NETHERLANDS Mozilla Firefox Windows says:

            type: ls -al /usr/local/bin/skype
            and paste me what it says.

    • Sara says:

      -rwxr-xr-x 1 root root 98 dic 30 23:34 /usr/local/bin/skype

  3. Alleen says:

    You hear on a regular basis that you are required to “spend money to make money”. All that does is make your wallet lighter without making you any richer. The result is that you end up spending more and more money without making any money and at the terminal point of the day, that’s the exact opposite of what you intend to do.

  4. tales says:

    lot of thanks
    i have an u36sd and my solution was this: LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype

    but i have used your solution for the script

Leave a Reply