1

I recently bought an ACER Aspire 5 with a builtin webcam, and installed Ubuntu 24.04 LTS, but although the webcam is detected, the driver is not loaded. I read that 24.10 with kernel 6.11.0.9 contained a fix for Webcam 0408-4035, so decided to install this beta version instead.

While the fix for 0408-4035 is indeed included, the fix for 0408-4033 is unfortunately not.

So I downloaded the kernel source, made the necessary code change, and recompiled as already described elsewhere. Built in webcam doesn't work - Acer Aspire A515-57G - Ubuntu 24.04 LTS

However, the modules are also compressed and signed, so I tried the following:

  1. generated public/private keys

    openssl req -new -x509 -newkey rsa:2048 -keyout key.priv -outform DER -out key.der -nodes -days 36500
    
  2. signed the generated uvcvideo.ko

    sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ~/key.priv ~/key.der uvcvideo.ko
    
  3. compressed the signed driver

    zstd --ultra -22 uvcvideo.ko
    
  4. copied the compressed driver

    sudo cp uvcvideo.ko.zst /lib/modules/$(uname -r)/kernel/drivers/media/usb/uvc/ 
    
  5. registered the public key into the system's MOK

    sudo mokutil --import ~/key.der
    

After rebooting, modinfo uvcvideo showed the signature changes (signer: cedric) but modprobe indicates the module cannot be loaded:

modprobe: INFO: ../libkmod/libkmod.c:405 kmod_set_log_fn() custom logging function 0x5bdec2fa7f40 registered 
insmod /lib/modules/6.11.0-9-generic/kernel/drivers/media/usb/uvc/uvcvideo.ko.zst
modprobe: INFO: ../libkmod/libkmod-module.c:985 kmod_module_insert_module() Failed to insert module '/lib/modules/6.11.0-9-generic/kernel/drivers/media/usb/uvc/uvcvideo.ko.zst': No such file or directory
modprobe: ERROR: could not insert 'uvcvideo': Unknown symbol in module, or unknown parameter (see dmesg)
modprobe: INFO: ../libkmod/libkmod.c:372 kmod_unref() context 0x5bded6ff83e0 released

dmesg indicates the following:

[  351.589525] uvcvideo: loading out-of-tree module taints kernel. 
[  351.589559] uvcvideo: Unknown symbol vb2_queue_init (err -2) 
[  351.589589] uvcvideo: Unknown symbol vb2_streamoff (err -2) 
[  351.589594] uvcvideo: Unknown symbol vb2_queue_release (err -2) 
[  351.589600] uvcvideo: Unknown symbol vb2_ioctl_streamoff (err -2) 
[  351.589609] uvcvideo: Unknown symbol vb2_poll (err -2) 
[  351.589618] uvcvideo: Unknown symbol vb2_ops_wait_finish (err -2) 
[  351.589625] uvcvideo: Unknown symbol uvc_format_by_guid (err -2)
[  351.589631] uvcvideo: Unknown symbol vb2_dqbuf (err -2)
[  351.589641] uvcvideo: Unknown symbol vb2_ioctl_querybuf (err -2)
[  351.589651] uvcvideo: Unknown symbol vb2_reqbufs (err -2)
[  351.589665] uvcvideo: Unknown symbol vb2_expbuf (err -2)
[  351.589672] uvcvideo: Unknown symbol vb2_fop_release (err -2)
[  351.589677] uvcvideo: Unknown symbol vb2_streamon (err -2)
[  351.589690] uvcvideo: Unknown symbol vb2_ioctl_dqbuf (err -2)
[  351.589694] uvcvideo: Unknown symbol vb2_querybuf (err -2)
[  351.589697] uvcvideo: Unknown symbol vb2_ioctl_create_bufs (err -2)
[  351.589700] uvcvideo: Unknown symbol vb2_ioctl_prepare_buf (err -2)
[  351.589704] uvcvideo: Unknown symbol vb2_qbuf (err -2)
[  351.589712] uvcvideo: Unknown symbol vb2_buffer_done (err -2)
[  351.589715] uvcvideo: Unknown symbol vb2_plane_vaddr (err -2)
[  351.589734] uvcvideo: Unknown symbol vb2_ioctl_qbuf (err -2)
[  351.589737] uvcvideo: Unknown symbol vb2_fop_mmap (err -2)
[  351.589741] uvcvideo: Unknown symbol vb2_vmalloc_memops (err -2)
[  351.589775] uvcvideo: Unknown symbol vb2_ops_wait_prepare (err -2)
[  351.589781] uvcvideo: Unknown symbol vb2_ioctl_streamon (err -2)
[  351.589784] uvcvideo: Unknown symbol vb2_fop_poll (err -2)
[  351.589787] uvcvideo: Unknown symbol vb2_create_bufs (err -2)
[  351.589794] uvcvideo: Unknown symbol vb2_mmap (err -2)
[  351.589807] uvcvideo: Unknown symbol vb2_ioctl_reqbufs (err -2)
karel
  • 122,292
  • 133
  • 301
  • 332

2 Answers2

1

so I switched back to 24.04, disabled secure kernel, rebuilt the kernel module and simply compressed it as I documented above and after rebooting, the webcam started to work.

I guess the same should work for 24.10, which I might try at some point in the future.

Would still be interested to know how the same can be achieved without disabling secure kernel and signing the recompiled module, but considering the amount of responses I got so far, not holding my breath :)

0

Interesting that you found a solution that doesn't seem to involve Pipewire not having all its dependencies, which was the solution to my own problem and the solution to for others with 24.04 Camera issues.

If you'd like to take a go, install libcamera-ipa and pipewire-libcamera then:

systemctl --user restart wireplumber.service

then try the Camera app / snapshot again.

Malady
  • 292