spice-vdagent seems not to be working in jammy when connecting from noble

Bug #2098014 reported by Bartosz Woronicz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-kvm (Ubuntu)
Confirmed
Low
Edoardo Canepa
Jammy
Confirmed
Low
Unassigned
spice-vdagent (Ubuntu)
Invalid
Undecided
Unassigned
Jammy
Invalid
Undecided
Unassigned

Bug Description

Steps to reproduce

1. Create LXD VM desktop-jammy on Ubuntu 24.04 (Noble) host
lxc init --vm ubuntu:22.04 desktop-jammy
2. lxc start desktop-noble
3. lxc exec desktop-noble bash
4. Install ubuntu-desktop metapackage
apt update
apt install -y ubuntu-desktop
5. Set passwd for ubuntu user
$ passwd ubuntu

6. Disable systemd-networkd-wait-online.service (otherwise it will wait for timeout)
 systemctl disable --now systemd-networkd-wait-online.service

7. Reboot

8. Connect to the vga console
lxc console --type=vga desktop-jammy
Wait for login screen to load

Expected result

The GDM login menu should appear

The actual result

The screen is stuck.
I saw that the daemon is not running
root@desktop-jammy:~# systemctl status spice-vdagentd
○ spice-vdagentd.service - Agent daemon for Spice guests
     Loaded: loaded (/lib/systemd/system/spice-vdagentd.service; indirect; vendor preset: enabled)
     Active: inactive (dead)
TriggeredBy: ● spice-vdagentd.socket
I started it
root@desktop-jammy:~# systemctl start spice-vdagentd
root@desktop-jammy:~# journalctl -u spice-vdagentd -f
Feb 11 17:26:14 desktop-jammy systemd[1]: Starting Agent daemon for Spice guests...
Feb 11 17:26:14 desktop-jammy systemd[1]: Started Agent daemon for Spice guests.
root@desktop-jammy:~# systemctl status spice-vdagentd
● spice-vdagentd.service - Agent daemon for Spice guests
     Loaded: loaded (/lib/systemd/system/spice-vdagentd.service; indirect; vendor preset: enabled)
     Active: active (running) since Tue 2025-02-11 17:26:14 UTC; 9s ago
TriggeredBy: ● spice-vdagentd.socket
    Process: 866 ExecStart=/usr/sbin/spice-vdagentd $SPICE_VDAGENTD_EXTRA_ARGS (code=exited, status=0/SUCCESS)
   Main PID: 867 (spice-vdagentd)
      Tasks: 2 (limit: 8872)
     Memory: 856.0K
        CPU: 6ms
     CGroup: /system.slice/spice-vdagentd.service
             └─867 /usr/sbin/spice-vdagentd

Feb 11 17:26:14 desktop-jammy systemd[1]: Starting Agent daemon for Spice guests...
Feb 11 17:26:14 desktop-jammy systemd[1]: Started Agent daemon for Spice guests.

but still when I retry connecting to vga console the screen is stuck on loading and shows nothing
When you check the systemd status it says
root@desktop-jammy:~# systemd-analyze
Startup finished in 428ms (kernel) + 7.285s (userspace) = 7.713s
graphical.target reached after 7.141s in userspace

When you try the same for ubuntu:24.04 all works as expected and you also see the system logs on loading before seeing the Login screen.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: spice-vdagent 0.22.1-1
ProcVersionSignature: Ubuntu 5.15.0-1073.78-kvm 5.15.168
Uname: Linux 5.15.0-1073-kvm x86_64
ApportVersion: 2.20.11-0ubuntu82.6
Architecture: amd64
CasperMD5CheckResult: unknown
CloudArchitecture: x86_64
CloudID: lxd
CloudName: lxd
CloudPlatform: lxd
CloudSubPlatform: LXD socket API v. 1.0 (/dev/lxd/sock)
Date: Tue Feb 11 17:28:08 2025
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=C.UTF-8
SourcePackage: spice-vdagent
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Bartosz Woronicz (mastier1) wrote :
description: updated
description: updated
Revision history for this message
Bartosz Woronicz (mastier1) wrote :

I think I found the culprit. When installing from ISO it installs HWE kernel.

LXD 5.21 LTS uses the Virtio GPU by default but the ubuntu:22.04 image uses 5.15 generic kernel which does not have virtio_gpu driver

ubuntu@desktop-jammy-vm:~$ lshw -C display
WARNING: you should run this program as super-user.
  *-display
       description: VGA compatible controller
       product: Virtio GPU
       vendor: Red Hat, Inc.
       physical id: 0
       bus info: pci@0000:04:00.0
       version: 01
       width: 64 bits
       clock: 33MHz
       capabilities: vga_controller bus_master cap_list rom
       configuration: driver=virtio-pci latency=0
       resources: iomemory:80-7f irq:21 memory:80000000-807fffff memory:800300000-800303fff memory:80800000-80800fff memory:c0000-dffff
  *-graphics
       product: EFI VGA
       physical id: 1
       logical name: /dev/fb0
       capabilities: fb
       configuration: depth=32 resolution=1280,800
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

The way out of this situation is to install HWE kernel

$ apt install -y linux-virtual-hwe-22.04

and reboot

Revision history for this message
Bartosz Woronicz (mastier1) wrote :

This is weird that generic kernel 5.15 does not have this driver compiled

root@desktop-jammy:~# dpkg -S virtio-gpu.ko
linux-modules-6.8.0-57-generic: /lib/modules/6.8.0-57-generic/kernel/drivers/gpu/drm/virtio/virtio-gpu.ko

root@desktop-jammy:~# apt search linux-modules |grep installed

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

linux-modules-5.15.0-1073-kvm/jammy-updates,jammy-security,now 5.15.0-1073.78 amd64 [installed,automatic]
linux-modules-6.8.0-57-generic/jammy-updates,jammy-security,now 6.8.0-57.59~22.04.1 amd64 [installed,automatic]

Especially because the headers got the driver header file

root@desktop-jammy:~# dpkg -S virtio_gpu
linux-hwe-6.8-headers-6.8.0-57: /usr/src/linux-hwe-6.8-headers-6.8.0-57/include/uapi/linux/virtio_gpu.h
libgl1-mesa-dri:amd64: /usr/lib/x86_64-linux-gnu/dri/virtio_gpu_dri.so
linux-kvm-headers-5.15.0-1073: /usr/src/linux-kvm-headers-5.15.0-1073/include/uapi/linux/virtio_gpu.h

Changed in spice-vdagent (Ubuntu):
status: New → Invalid
Edoardo Canepa (ecanepa)
Changed in linux-kvm (Ubuntu):
status: New → Invalid
importance: Undecided → Low
assignee: nobody → Edoardo Canepa (ecanepa)
Edoardo Canepa (ecanepa)
Changed in spice-vdagent (Ubuntu Jammy):
status: New → Invalid
Changed in linux-kvm (Ubuntu Jammy):
status: New → Confirmed
importance: Undecided → Low
Edoardo Canepa (ecanepa)
Changed in linux-kvm (Ubuntu):
status: Invalid → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.