After a kernel update, one of our Ubuntu VDI desktops on Omnissa Horizon stopped accepting connections. The Horizon client only said “desktop is busy”. Once it was back, gnome-shell was using one to two CPU cores, and the GNOME keyring asked for a password on every login. None of the error messages pointed at the real cause. This post walks through each problem: how Horizon’s display driver, logind seats and GPU rendering fit together, the wrong turns, and the fixes we baked back into the golden image.
Environment: Ubuntu 26.04 LTS, GNOME 50 on Wayland, Omnissa Horizon Agent 8.20 (Linux), vSphere VM with the VMware SVGA adapter, AD-joined via SSSD.
TL;DR
- “Desktop is busy” after a kernel update: Horizon’s
omnkmsdisplay driver was built for the old kernel. Rebuilding it is not enough. Horizon checks a hidden.kernel_versionstamp file, not the module itself. - High gnome-shell CPU: Horizon puts the session on its own seat containing only
omnkms, so GNOME renders with llvmpipe (CPU). Adding VRAM or enabling 3D on the VM does not change that. - Keyring not unlocking: the Horizon Wayland session authenticates through the
loginPAM service, which has nopam_gnome_keyring.
1. “The desktop is busy” after a kernel update
After running apt full-upgrade and rebooting into a new kernel, every connection from the Horizon client failed with a message that the desktop was busy. The VM was up, the agent service was running, and the vSphere console showed a normal GDM login screen.
Finding the real error
The main agent log (/var/log/omnissa/viewagent-debug.log) only says the SSO step failed, with no reason:
ERROR [DesktopHandler] [DesktopID: 1] DesktopDeamon failed to handle ipc request, request name is SSO, error reason: null
Comparing timestamps with a login that worked before the upgrade was the first useful clue. A good login takes about five seconds between “Send password sso creds” and DesktopReady. The failing one was rejected within milliseconds, which means a precondition failed before any session setup happened.
The desktop daemon writes its own logs to a root-only directory under /tmp, not to the journal:
sudo ls -la /tmp/omnissa-root/
sudo tail -30 /tmp/omnissa-root/horizon-DesktopDaemon-*.log
sudo cat /tmp/omnissa-root/horizon-OmnkmsDriverScript.log
That is where the actual errors were:
Er(02) Failed to open /dev/omnctrl, No such file or directory
Er(02) Failed to allocate DRM card; rolling back display number 100.
Er(02) Failed to create desktop: 1.
omnkms driver built for kernel version: 7.0.0-43-generic, current kernel version: 7.0.0-44-generic
Please build the driver for the current kernel version
What omnkms is
On Wayland, Horizon 8.x ships its own virtual KMS display driver, omnkms. The agent loads it at startup, and it creates /dev/omnctrl. Each Horizon session then gets a virtual DRM card that GNOME draws into and that Blast captures. The driver is an out-of-tree kernel module, built from source in:
/usr/lib/omnissa/viewagent/resources/omnkms/
It is not managed by DKMS. When Ubuntu installs a new kernel, nothing rebuilds it.
The gotcha: rebuilding is not enough
The obvious fix is to rebuild the module against the running kernel. The bundled Makefile does that:
cd /usr/lib/omnissa/viewagent/resources/omnkms
sudo make clean && sudo make
modinfo -F vermagic omnkms.ko # now shows the new kernel
We did this and restarted viewagent. It still failed with the same “built for kernel version 7.0.0-43” message, even though modinfo clearly showed the new kernel. Loading the module by hand with insmod worked fine, which ruled out Secure Boot and API breakage.
The answer is in /usr/lib/omnissa/viewagent/bin/OmnkmsDriverScript.sh. Its insert() function never looks at the .ko. It compares uname -r against a stamp file that only the script’s own build() function writes:
built_kernel_version=`cat $OMNKMS_DIR/.kernel_version`
if [ "$kernel_version" != "$built_kernel_version" ]; then
echo "omnkms driver built for kernel version: $built_kernel_version, current kernel version: $kernel_version"
echo "Please build the driver for the current kernel version"
exit 1
fi
A manual make never updates .kernel_version, so the agent keeps refusing to load a perfectly good module.
The fix
cd /usr/lib/omnissa/viewagent/resources/omnkms
sudo make clean && sudo make
uname -r | sudo tee .kernel_version
sudo systemctl restart viewagent
ls -la /dev/omnctrl # should exist, group hznblast, mode 0660
Once /dev/omnctrl existed, Horizon logins worked again.
Making it survive the next kernel update
Ubuntu runs every script in /etc/kernel/postinst.d/ after installing a kernel, passing the new version as $1. This hook rebuilds the driver for the new kernel and writes the stamp, so the agent is ready when the VM reboots into that kernel:
sudo tee /etc/kernel/postinst.d/zz-omnkms >/dev/null <<'EOF'
#!/bin/sh
# Rebuild Horizon omnkms for a newly installed kernel ($1 = version)
cd /usr/lib/omnissa/viewagent/resources/omnkms || exit 0
make clean >/dev/null 2>&1
make -C "/lib/modules/$1/build" M="$PWD" modules > build-"$1".log 2>&1 || echo "omnkms build failed for $1" >&2
echo "$1" > .kernel_version
exit 0
EOF
sudo chmod 755 /etc/kernel/postinst.d/zz-omnkms
To test it immediately against the running kernel:
sudo /etc/kernel/postinst.d/zz-omnkms "$(uname -r)"
Caveats:
- The kernel headers for the new kernel must be installed. On Ubuntu, the
linux-genericmetapackage pulls them in. - The build directory holds one kernel’s module at a time. Between installing a kernel and rebooting, a
viewagentrestart will refuse to load the driver, because the stamp no longer matches the running kernel. The reboot fixes that. - If Secure Boot is enabled, the module must also be signed. Omnissa’s own
build()function handles signing, and this hook does not. - This is a workaround, not an Omnissa-supported procedure. Check whether a newer agent ships DKMS support before relying on it.
2. Why gnome-shell burns CPU on a Horizon Linux desktop
Even after the desktop was working, gnome-shell sat at one to two full cores while the session was in use. The usual advice is to enable 3D on the VM, add VRAM, or add vCPUs. None of that changed anything here, and the reason is worth knowing.
Step 1: confirm software rendering
If gnome-shell has LLVM mapped, Mesa is using llvmpipe, which renders on the CPU:
grep -oE "libLLVM[^ ]*|libgallium[^ ]*" /proc/$(pgrep -u "$USER" -x gnome-shell)/maps | sort -u
# libgallium-26.0.8-1ubuntu0.3.so
# libLLVM.so.21.1
Mutter’s startup log (readable as root) shows which device it picked:
sudo journalctl -b _PID=$(pgrep -u "$USER" -x gnome-shell) | grep -iE "Added device|renderer|primary|accelerated"
Added device '/dev/dri/card1' (omnkms) using atomic mode setting.
Failed to initialize accelerated iGPU/dGPU framebuffer sharing: Not hardware accelerated
Created gbm renderer for '/dev/dri/card1'
Integrated GPU /dev/dri/card1 selected as primary
Mutter only ever adds card1 (omnkms). The VMware SVGA adapter, card0 with the vmwgfx driver, never shows up, even though dmesg reports that it supports 3D (3D, dx, SM4_1).
Step 2: the seat explains it
for c in card0 card1; do
echo "$c $(udevadm info /dev/dri/$c | grep -oE 'ID_SEAT=[^ ]*' || echo 'ID_SEAT=seat0')"
done
loginctl list-seats
loginctl show-session "$XDG_SESSION_ID" -p Seat
card0 ID_SEAT=seat0
card1 ID_SEAT=seat-hznfake
Seat=seat-hznfake
The Horizon agent creates a separate logind seat, seat-hznfake, and assigns only omnkms to it. Logind gives a session only the devices on its own seat, so mutter in the Horizon session cannot see vmwgfx at all. That is why:
- enabling 3D support and adding VRAM on the VM made no difference,
- a udev rule tagging
vmwgfxwithmutter-device-preferred-primarywas ignored, - adding vCPUs only gives llvmpipe more cores to burn.
In principle you can loginctl attach seat-hznfake the vmwgfx device, so mutter can render on it and hand frames to omnkms. That is unsupported. It takes the GPU away from the console GDM greeter, and it risks a black Blast session. We stopped short of rolling it out. If you try it, do it on a throwaway VM with SSH access, and undo it with loginctl flush-devices.
Realistic options: use NVIDIA vGPU (or vSGA where the agent supports it) for pools that need GPU rendering. Otherwise, accept CPU rendering and cut the pixel load: turn off animations (gsettings set org.gnome.desktop.interface enable-animations false), and use fewer or lower-resolution monitors in the client.
3. GNOME keyring prompt on every Horizon login
Every GDM PAM file on the system, including Horizon’s own gdm-hzncred, includes pam_gnome_keyring.so. But the Horizon Wayland session does not use any of them:
loginctl show-session "$XDG_SESSION_ID" -p Service -p Seat
Service=login
Seat=seat-hznfake
It authenticates through the login service, and Ubuntu’s /etc/pam.d/login has no keyring module. The fix is two optional lines, one after each include:
sudo cp -a /etc/pam.d/login /etc/pam.d/login.bak
sudo sed -i '/^@include common-auth/a auth optional pam_gnome_keyring.so' /etc/pam.d/login
sudo sed -i '/^@include common-session/a session optional pam_gnome_keyring.so auto_start' /etc/pam.d/login
Both lines are optional, so they cannot block a login. Still, keep a root shell open while you test.
Golden image checklist
Everything above went back into the image so the next rebuild does not repeat it:
/etc/kernel/postinst.d/zz-omnkmsto rebuildomnkmsand write.kernel_versionon every kernel installpam_gnome_keyring.solines in/etc/pam.d/login
Quick triage for “desktop is busy” on Horizon Linux
uname -r
sudo cat /usr/lib/omnissa/viewagent/resources/omnkms/.kernel_version
ls -la /dev/omnctrl
sudo tail -20 /tmp/omnissa-root/horizon-OmnkmsDriverScript.log
sudo grep -E "Er\(02\)" /tmp/omnissa-root/horizon-DesktopDaemon-*.log | tail
If the first two lines differ, or /dev/omnctrl is missing, you have the kernel-update problem described in section 1.