@qkiel Thanks for putting the very useful instructions together. I tried your updated profile for running Ubuntu containers with Ubuntu 24.04 as host.
I recently moved to an openSUSE Tumbleweed host (I was using Kubuntu 24.04 before), but I still run Ubuntu containers from the standard Incus server image repository. Almost everything works (I successfully tested wayland, x11, camera, video, rendering, etc), except for the sound!
I used the instructions to the letter, but I couldn’t manage to get the sound in the container working. I tried many things that didn’t work (e.g. passing the pipewire/pulse devices as container/proxy, installing various packages and libraries, using other ubuntu versions (22.04 and 24.10)…).
Any ideas very much welcome!
------- FYI ------
My incus YAML profile:
name: wayland_new2
description: >-
Requires ‘incus_ct_gui.sh’ script. GUI Wayland and xWayland profile with
pipewire and pulseaudio, shifting enabled for all socket.
devices:
camera1:
busnum: ‘3’
devnum: ‘4’
gid: ‘1000’
productid: b756
type: usb
uid: ‘1000’
vendorid: 04f2
controlC0:
gid: ‘29’
source: /dev/snd/controlC0
type: unix-char
dri_card0:
gid: ‘44’
source: /dev/dri/card1
type: unix-char
dri_renderD128:
gid: ‘992’
source: /dev/dri/renderD128
type: unix-char
gpu:
gid: ‘44’
pci: ‘0000:00:02.0’
type: gpu
pipewire_manager_socket:
bind: container
connect: unix:/run/user/1000/pipewire-0-manager
gid: ‘1000’
listen: unix:/mnt/.container_sockets/pipewire-0-manager
mode: ‘0777’
security.gid: ‘1000’
security.uid: ‘1000’
type: proxy
uid: ‘1000’
pipewire_socket:
bind: container
connect: unix:/run/user/1000/pipewire-0
gid: ‘1000’
listen: unix:/mnt/.container_sockets/pipewire-0
mode: ‘0777’
security.gid: ‘1000’
security.uid: ‘1000’
type: proxy
uid: ‘1000’
pulseaudio_socket:
bind: container
connect: unix:/run/user/1000/pulse/native
gid: ‘1000’
listen: unix:/mnt/.container_sockets/native
mode: ‘0777’
security.gid: ‘1000’
security.uid: ‘1000’
type: proxy
uid: ‘1000’
video0:
gid: ‘44’
source: /dev/video0
type: unix-char
video1:
gid: ‘44’
source: /dev/video1
type: unix-char
video2:
gid: ‘44’
source: /dev/video2
type: unix-char
video3:
gid: ‘44’
source: /dev/video3
type: unix-char
wayland_socket:
path: /mnt/.container_sockets/wayland-0
shift: ‘true’
source: /run/user/1000/wayland-0
type: disk
xauthority_cookie:
path: /mnt/.container_sockets/.mutter-Xwaylandauth.copy
shift: ‘true’
source: /run/user/1000/.mutter-Xwaylandauth.incus
type: disk
xwayland_socket:
path: /mnt/.container_sockets/X1
shift: ‘true’
source: /tmp/.X11-unix/X1
type: disk
config:
security.nesting: ‘true’
raw.idmap: |-
uid 1000 1000
gid 1000 1000
project: default
The instance YAML configuration:
architecture: x86_64
config:
image.architecture: amd64
image.description: Ubuntu noble amd64 (20241230_07:42)
image.os: Ubuntu
image.release: noble
image.requirements.cgroup: v2
image.serial: ‘20241230_07:42’
image.type: squashfs
image.variant: default
volatile.base_image: 76128cb718e52dd32143c009bf15258ac14777884ddd666635e98b08f311054a
volatile.cloud-init.instance-id: 8fa97ee6-d6da-4736-8fdc-5ce2cd3f9a61
volatile.eth0.host_name: veth8227f039
volatile.eth0.hwaddr: 00:16:3e:d6:73:5f
volatile.eth0.name: eth0
volatile.idmap.base: ‘0’
volatile.idmap.current: >-
[{“Isuid”:true,“Isgid”:false,“Hostid”:400000000,“Nsid”:0,“Maprange”:1000},{“Isuid”:true,“Isgid”:false,“Hostid”:1000,“Nsid”:1000,“Maprange”:1},{“Isuid”:true,“Isgid”:false,“Hostid”:400001001,“Nsid”:1001,“Maprange”:499999000},{“Isuid”:false,“Isgid”:true,“Hostid”:400000000,“Nsid”:0,“Maprange”:1000},{“Isuid”:false,“Isgid”:true,“Hostid”:1000,“Nsid”:1000,“Maprange”:1},{“Isuid”:false,“Isgid”:true,“Hostid”:400001001,“Nsid”:1001,“Maprange”:499999000}]
volatile.idmap.next: >-
[{“Isuid”:true,“Isgid”:false,“Hostid”:400000000,“Nsid”:0,“Maprange”:1000},{“Isuid”:true,“Isgid”:false,“Hostid”:1000,“Nsid”:1000,“Maprange”:1},{“Isuid”:true,“Isgid”:false,“Hostid”:400001001,“Nsid”:1001,“Maprange”:499999000},{“Isuid”:false,“Isgid”:true,“Hostid”:400000000,“Nsid”:0,“Maprange”:1000},{“Isuid”:false,“Isgid”:true,“Hostid”:1000,“Nsid”:1000,“Maprange”:1},{“Isuid”:false,“Isgid”:true,“Hostid”:400001001,“Nsid”:1001,“Maprange”:499999000}]
volatile.last_state.idmap: ‘’
volatile.last_state.power: RUNNING
volatile.last_state.ready: ‘false’
volatile.uuid: 093e5759-2234-4efa-91ca-d4cd6112d549
volatile.uuid.generation: 093e5759-2234-4efa-91ca-d4cd6112d549
devices: {}
ephemeral: false
profiles:
- default
- wayland_new
stateful: false
description: ubuntu 24.04
created_at: ‘2025-01-02T23:42:10.186448033Z’
name: ubuntu
status: Running
status_code: 103
last_used_at: ‘2025-01-02T23:53:56.15397395Z’
location: none
type: container
project: default
From the container:
ubuntu@ubuntu:~$ ll /tmp/.X11-unix/X?
ll /run/user/*/
ll /run/user/*/pulse/
lrwxrwxrwx 1 ubuntu ubuntu 26 Jan 2 23:54 /tmp/.X11-unix/X1 → /mnt/.container_sockets/X1=
total 4
drwx------ 6 ubuntu ubuntu 280 Jan 2 23:54 ./
drwxr-xr-x 3 root root 60 Jan 2 23:54 …/
srw-rw-rw- 1 ubuntu ubuntu 0 Jan 2 23:54 bus=
drwx------ 3 ubuntu ubuntu 60 Jan 2 23:54 dbus-1/
drwx------ 2 ubuntu ubuntu 160 Jan 2 23:54 gnupg/
-rw------- 1 ubuntu ubuntu 94 Jan 2 23:54 .mutter-Xwaylandauth.copy
srw-rw-rw- 1 ubuntu ubuntu 0 Jan 2 23:54 pipewire-0=
-rw-rw---- 1 ubuntu ubuntu 0 Jan 2 23:54 pipewire-0.lock
srw-rw-rw- 1 ubuntu ubuntu 0 Jan 2 23:54 pipewire-0-manager=
-rw-rw---- 1 ubuntu ubuntu 0 Jan 2 23:54 pipewire-0-manager.lock
drwxr-xr-x 2 ubuntu ubuntu 80 Jan 2 23:54 pulse/
srw-rw-rw- 1 ubuntu ubuntu 0 Jan 2 23:54 snapd-session-agent.socket=
drwxr-xr-x 6 ubuntu ubuntu 160 Jan 2 23:54 systemd/
lrwxrwxrwx 1 ubuntu ubuntu 33 Jan 2 23:54 wayland-0 → /mnt/.container_sockets/wayland-0=
total 4
drwxr-xr-x 2 ubuntu ubuntu 80 Jan 2 23:54 ./
drwx------ 6 ubuntu ubuntu 280 Jan 2 23:54 …/
srw-rw-rw- 1 ubuntu ubuntu 0 Jan 2 23:54 native=
-rw-rw-r-- 1 ubuntu ubuntu 4 Jan 2 23:54 pid
ubuntu@ubuntu:~$ systemctl --user status pipewire pipewire-pulse wireplumber
● pipewire.service - PipeWire Multimedia Service
Loaded: loaded (/usr/lib/systemd/user/pipewire.service; enabled; preset: enabled)
Active: active (running) since Thu 2025-01-02 23:54:01 UTC; 5min ago
TriggeredBy: ● pipewire.socket
Main PID: 449 (pipewire)
Tasks: 3 (limit: 18686)
Memory: 3.4M (peak: 4.1M)
CPU: 225ms
CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service
└─449 /usr/bin/pipewireJan 02 23:54:01 ubuntu systemd[440]: Started pipewire.service - PipeWire Multimedia Service.
Jan 02 23:54:01 ubuntu pipewire[449]: mod.jackdbus-detect: Failed to receive jackdbus reply: org.freedesktop.DBus.Error.ServiceUnknown: The name org.jackaudio.service was not provided by any .service files● pipewire-pulse.service - PipeWire PulseAudio
Loaded: loaded (/usr/lib/systemd/user/pipewire-pulse.service; enabled; preset: enabled)
Active: active (running) since Thu 2025-01-02 23:54:01 UTC; 5min ago
TriggeredBy: ● pipewire-pulse.socket
Main PID: 453 (pipewire-pulse)
Tasks: 3 (limit: 18686)
Memory: 6.9M (peak: 7.8M)
CPU: 328ms
CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-pulse.service
└─453 /usr/bin/pipewire-pulseJan 02 23:54:01 ubuntu systemd[440]: Started pipewire-pulse.service - PipeWire PulseAudio.
Jan 02 23:54:56 ubuntu pipewire-pulse[453]: default: snap_get_audio_permissions: kernel lacks ‘fine grained unix mediation’; snap audio permissions won’t be honored.
Jan 02 23:54:56 ubuntu pipewire-pulse[453]: default: snap_get_audio_permissions: kernel lacks ‘fine grained unix mediation’; snap audio permissions won’t be honored.
Jan 02 23:55:13 ubuntu pipewire-pulse[453]: default: snap_get_audio_permissions: kernel lacks ‘fine grained unix mediation’; snap audio permissions won’t be honored.● wireplumber.service - Multimedia Service Session Manager
Loaded: loaded (/usr/lib/systemd/user/wireplumber.service; enabled; preset: enabled)
Active: active (running) since Thu 2025-01-02 23:54:01 UTC; 5min ago
Main PID: 451 (wireplumber)
Tasks: 6 (limit: 18686)
Memory: 3.4M (peak: 3.9M)
CPU: 40ms
CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/wireplumber.service
└─451 /usr/bin/wireplumberJan 02 23:54:01 ubuntu systemd[440]: Started wireplumber.service - Multimedia Service Session Manager.
Jan 02 23:54:01 ubuntu wireplumber[451]: SPA handle ‘api.libcamera.enum.manager’ could not be loaded; is it installed?
Jan 02 23:54:01 ubuntu wireplumber[451]: PipeWire’s libcamera SPA missing or broken. libcamera not supported.
Jan 02 23:54:01 ubuntu wireplumber[451]: SPA handle ‘api.bluez5.enum.dbus’ could not be loaded; is it installed?
Jan 02 23:54:01 ubuntu wireplumber[451]: PipeWire’s BlueZ SPA missing or broken. Bluetooth not supported.
Jan 02 23:54:01 ubuntu wireplumber[451]: WpPortalPermissionStorePlugin:0x55c3f2194e10 Failed to call Lookup: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.impl.portal.PermissionSt>
Jan 02 23:54:01 ubuntu wireplumber[451]: WpPortalPermissionStorePlugin:0x55c3f2194e10 Failed to call Lookup: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.impl.portal.Permissi
pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 64
Tile Size: 65472
User Name: ubuntu
Host Name: ubuntu
Server Name: PulseAudio (on PipeWire 1.0.5)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: auto_null
Default Source: auto_null.monitor
Cookie: 8b93:070f
from my user’s .profile
[[ ! -d “/run/user/1000/pulse” ]] && mkdir -m 700 “/run/user/1000/pulse”
[[ -S “/mnt/.container_sockets/native” && -d “/run/user/1000/pulse” && ! -e “/run/user/1000/pulse/native” ]] && ln -s “/mnt/.container_sockets/native” “/run/user/1000/pulse/native”
[[ -S “/mnt/.container_sockets/pipewire-0” && ! -e “/run/user/1000/pipewire-0” ]] && ln -s “/mnt/.container_sockets/pipewire-0” “/run/user/1000/pipewire-0”
[[ -S “/mnt/.container_sockets/pipewire-0-manager” && ! -e “/run/user/1000/pipewire-0-manager” ]] && ln -s “/mnt/.container_sockets/pipewire-0-manager” “/run/user/1000/pipewire-0-manager”
[[ -S “/mnt/.container_sockets/wayland-0” && ! -e “/run/user/1000/wayland-0” ]] && ln -s “/mnt/.container_sockets/wayland-0” “/run/user/1000/wayland-0”
[[ -S “/mnt/.container_sockets/X1” && ! -e “/tmp/.X11-unix/X1” ]] && ln -s “/mnt/.container_sockets/X1” “/tmp/.X11-unix/X1”
[[ -f “/mnt/.container_sockets/.mutter-Xwaylandauth.copy” && ! -e “/run/user/1000/.mutter-Xwaylandauth.copy” ]] && cp “/mnt/.container_sockets/.mutter-Xwaylandauth.copy” “/run/user/1000/.mutter-Xwaylandauth.copy”
export WAYLAND_DISPLAY=wayland-0
export XDG_SESSION_TYPE=wayland
export QT_QPA_PLATFORM=wayland
export DISPLAY=:1
export XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.copy
export NO_AT_BRIDGE=1
export QT_QPA_PLATFORM=wayland
export QT_QPA_PLATFORMTHEME=qt5ct
export CLUTTER_BACKEND=wayland
export SDL_VIDEODRIVER=wayland
export GDK_BACKEND=wayland
export WINIT_UNIX_BACKEND=wayland
export XIM=ibus
export XIM_PROGRAM=/usr/bin/ibus
export QT_IM_MODULE=ibus
export GTK_IM_MODULE=ibus
export XMODIFIERS=ibus
export DefaultIMModule=ibus
export PULSE_SERVER=/run/user/1000/pulse/native
export PIPEWIRE_REMOTE=/run/user/1000/pipewire-0-manager
ibus-daemon -drx
My Tumbleweed host:
Operating System: openSUSE Tumbleweed 20241226
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.12.6-1-default (64-bit)
Graphics Platform: Wayland
Processors: 20 × 12th Gen Intel® Core™ i7-12700H
Memory: 16,5 GB of RAM
Graphics Processor: Mesa Intel® Iris® Xe Graphics
Manufacturer: LENOVO
Product Name: 82UT
System Version: Yoga Slim 7 Pro 14IAH7