Status of Ubuntu support for Lenovo ThinkPad X13s

After an update and reboot, now the camera works as well with Cheese and Camera; does not work with firefox, Brave or Chromium

Did you set this value to “true” in Firefox’s about:config page?

media.webrtc.camera.allow-pipewire

I did, but the camera is not recognized either via WebCam test or in google meet

Hello. You said above that you got the camera to work with cheese. But now you say it doesn’t work via WebCam test. I don’t get it. Could you be more specific?

For me qcam works, nothing else. I also wish the webcam would work with zoom/teams, then this otherwise very nice computer could be my main travel computer.

My webcam works in poor quality in Firefox. See the test page.
It also works in Meet and Teams.



In case this wasn’t already well known:
The network randomly stops working after several days (mostly, also happened after just a few hours once), requiring to reset the driver with:

sudo modprobe -r ath11k_pci
sudo modprobe -r ath11k

sudo modprobe ath11k
sudo modprobe ath11k_pci

Dmesg log (repeated spam):

[41369.968144] ath11k_warn: 5 callbacks suppressed
[41369.968157] ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 428, expected 1492
[41372.274348] ath11k_pci 0006:01:00.0: wmi command 12289 timeout
[41372.274360] ath11k_pci 0006:01:00.0: failed to send WMI_START_SCAN_CMDID
[41372.274366] ath11k_pci 0006:01:00.0: failed to start hw scan: -11
[41376.305846] ath11k_pci 0006:01:00.0: wmi command 12289 timeout
[41376.305860] ath11k_pci 0006:01:00.0: failed to send WMI_START_SCAN_CMDID
[41376.305868] ath11k_pci 0006:01:00.0: failed to start hw scan: -11
[41380.338154] ath11k_pci 0006:01:00.0: wmi command 12289 timeout
[41380.338181] ath11k_pci 0006:01:00.0: failed to send WMI_START_SCAN_CMDID
[41380.338196] ath11k_pci 0006:01:00.0: failed to start hw scan: -11
[41384.370178] ath11k_pci 0006:01:00.0: wmi command 12289 timeout
[41384.370194] ath11k_pci 0006:01:00.0: failed to send WMI_START_SCAN_CMDID
[41384.370203] ath11k_pci 0006:01:00.0: failed to start hw scan: -11
[41387.994500] ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1472, expected 1488
[41387.995310] ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1484, expected 1492
[41387.995404] ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1480, expected 1484
[41387.996527] ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1480, expected 1484
[41387.997331] ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1476, expected 1492
[41387.997889] ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1480, expected 1484
[41387.998355] ath11k_pci 0006:01:00.0: HTC Rx: insufficient length, got 1452, expected 1480

Nice, any specific settings?

No, exactly what is being discussed here, but without the unsigned kernel.

See also my post of 29 January and media.webrtc.camera.allow-pipewire set to TRUE in Firefox.

I installed oracular on my x13s with latest everything on the Windows side. only thing not working so far with clean install of ubuntu is the camera.

OK! Doesn’t work for me, so I am problably missing something.

I have changed different things thoughout (kernels etc) and I haven’t kept track unfortunately. Moreover, I first installed 23.10, then upgraded to first 24.04 and then 24.10. Perhaps be a reason too?

I also updated from 24.04 to 24.10. Other than that, I did everything as described in the 29 January post.
The webcam application from KDE, Kamoso, works right away. Webcamoid does not work.
In Firefox the webcam works with media.webrtc.camera.allow-pipewire after restarting Firefox.
I am running Firefox from ppa:mozillateam/ppa and not as snap.
Also note that I have removed Gnome and am using Kubuntu Desktop, i.e. KDE.

FWIW, I just did a clean install of Plucky using the daily ISO from here which was surprisingly uneventful :slight_smile: After installing libcamera-tools, qcam worked out of the box:

$ sudo apt install libcamera-tools
$ qcam

What seems to be missing to get Firefox to play with the camera is the libcamera plugin for pipewire. Installed that plus helvum for debugging:

$ sudo apt install pipewire-libcamera helvum

You need to reboot (or maybe logout/login is enough) or restart pipewire/wireplumber for this to take effect:

$ systemctl --user stop wireplumber
$ systemctl --user stop pipewire
$ systemctl --user start wireplumber

Now run helvum and check that the camera is visible (Built-in Front Camera):

I haven’t tried the camera with the Firefox snap but I doubt that’s working. So I removed the snap:

$ sudo snap remove firefox
$ sudo apt purge firefox
$ echo '
Package: firefox
Pin: release o=Ubuntu
Pin-Priority: -1
' | sudo tee /etc/apt/preferences.d/ubuntu-firefox

The last command above makes sure it doesn’t come back…

Then installed Firefox from the Mozilla repo by following this guide. As mentioned previously, it’s required to browse to about:config and flip media.webrtc.camera.allow-pipewire to true.

With all that, the camera is (somewhat) working when browsing to gUM Test Page.

1 Like

And for cheese you also need libcamera-v4l2:

$ sudo apt install libcamera-v4l2
1 Like

Something’s still not quite right. Firefox doesn’t see the camera (again) after logging out and back in, even though helvum shows it. It requires a pipewire restart:

$ systemctl --user restart pipewire

Bug #2102108 “Missing camera pipeline dependencies” : Bugs : ubuntu-x13s-settings package : Ubuntu for the missing dependencies (fixed in Plucky 25.04.2).

gnome-snapshot also seems to work. Apparently that’s the new thing to replace cheese.

WOW! Thanks for the tip @juergh ! I didn’t install plucky, but I did the other things and the webcam now sort of works in gnome-snapshot and on the gUM Test Page (that you linked). Tomorrow I will test the webcam in TEAMS (and possibly Zoom). I that works, I can use the X13s as my only travel device. Light, small and soundless. Almost perfection!

Following the tips from @juergh above (Status of Ubuntu support for Lenovo ThinkPad X13s - #192 by juergh), I can now do video chats in TEAMS using Firefox and the built in webcam on the X13s! I did not upgrade to 25.04, I am still on 24.10. This device can now work as a daily driver for my work and leisure. Teaching/supervision, report writing, programming, light computations (sending heavy computations to Linux clusters), web browsing and YouTube. That covers 99% of my computer work!
Thanks for making this happen!

1 Like

Sound completely stopped coming out of the laptop’s speakers.
Bluetooth still works fine.
In the past I had this happen again and “fixed” it by simply overwriting my asoundrc or some similar file with the one juergh posted from his own laptop.

  1. Anyone know how to “reset” the sound system maybe so it works again like out of the box?
  2. Alternatively I’ll be ok with overwriting my alsa/whatever audio config files with anyone’s who has working speakers, too, doesn’t really matter as long as I can use the speakers again.

My /var/lib/alsa/asound.state on Noble: https://dpaste.com/B52PJCWWX I think that’s the one that is saved/restored at shutdown/boot. But there are also configuration files all over the place that could be messed up. Check /usr/share/alsa/alsa.conf what and where these are.