FDH2 / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.35k stars 72 forks source link

latency issue with linux kernel 5.15.x on ("Desktop" but not "Lite") Raspberry Pi OS Bullseye #83

Closed fduncanh closed 2 years ago

fduncanh commented 2 years ago

After all the work in getting Uxplay working well with a patch to the GStreamer video4linux2 plugin for hardware decoding on the Pi, the recent kernel update from 5.10 to 5.15 has ruined the latency (time delay) on both Raspbery Pi OS (Bullseye) 32 bit and 64 bit Desktop and Manjaro for RPi 4.

However Ubuntu 21.10 running a 5.13.x kernel and Wayland graphics is working just fine, as is Raspbery OS Lite (no X11) with a 5.15.x kernel and KMS graphics. Maybe the issue in 5.15.x is with OpenGL which is not used by Ubuntu or Rasperry Pi OS Lite.

On ubuntu: use uxplay -rpi -vs waylandsink on RPi OS Lite use uxplay -rpi -vs kmssink

To do this download the January 2022 image for 32 or 64 bit Raspberry Pi OS (Bullseye) desktop on a fresh SD card, and setup up a new Raspberry Pi Desktop system. When you are asked if you want to update the system, decline the offer (choose "Skip"). Then in a terminal window, place a hold on raspberrypi-kernel package, to prevent it being automatically updated: from 5.10.x to 5.15.x:

sudo apt-mark hold raspberrypi-kernel

Now you can update everything else:

sudo apt update
sudo apt upgrade

When you eventually wish to update the kernel (assuming a fixed version is released)

sudo apt-mark unhold raspberrypi-kernel

or just use

sudo upgrade raspberrypi-kernel
fduncanh commented 2 years ago

turns out that using -vs xvimagesink instead of -vs glimagesink fixes things.

The upgrade from 5.10 to 5.15 kernels seems to have broken GPU support for glimagesink in some way

solution: don't specify -vs option, let autovideosink choose. Then things work fine!