How to Fix Lenovo Camera on Linux Ubuntu

September 2021 · 2 minute read

Things notoriously do not work out of the box on Linux. One such thing is the web camera when your Lenovo laptop also has an infrared (IR) camera, which is used for facial recognition. The IR camera is likely the default camera, and the apps you use do not have the ability to change the camera. In this article, I will show you how to make your normal webcam the default one such that conference apps can pick it up.

First, go to the directory containing the device files.

cd /dev

Then, create a backup file of the IR device.

sudo mv video0 video0.original

Now create a symbolic link from video0 (i.e. the original device pointing to the IR camera) to the video2 device (i.e. the actual web camera).

sudo ln -s /dev/video2 /dev/video0

That’s it. You can now test that it works. On Ubuntu, I test this using Cheese. You can also check the files you interacted with:

➜  /dev ls -lah | grep video
crw-rw----   1 root  video    29,     0 Sep  7 11:33 fb0
crw-rw----   1 root  video   238,     0 Sep  7 11:33 media0
crw-rw----   1 root  video   238,     1 Sep  7 11:33 media1
lrwxrwxrwx   1 root  root            11 Sep  7 11:35 video0 -> /dev/video2
crw-rw----+  1 root  video    81,     0 Sep  7 11:33 video0.original
crw-rw----+  1 root  video    81,     1 Sep  7 11:33 video1
crw-rw----+  1 root  video    81,     2 Sep  7 11:33 video2
crw-rw----+  1 root  video    81,     3 Sep  7 11:33 video3

You may also want to run those commands at startup, otherwise these changes may not persist.

Hopefully this was useful to some of you out there.