We are beginning to include Pi 5 units in our digital signage deployment
that is built on Ubuntu Core 24 and ubuntu-frame using a mix of
amd64/arm64 devices. We ran into this issue when using Pi 5. We've
automated the workaround from juergh in post #5 using a systemd service
and a script. The service automates the fix after a kernel
update+reboot. Testing ok for us so far.
pi5-display-fix.service:
```
[Unit]
Description=Ensure Pi 5 Display Overlay is Correct
After=snapd.service
[Service]
Type=oneshot
ExecStart=/bin/bash /home/ubuntu/pi5-display-fix.sh
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
```
pi5-display-fix.sh:
```
#!/bin/bash
echo "Checking Raspberry Pi 5 Long-Path Overlay status..."
# find the newest pi-kernel snap directory
KERNEL_DIR=$(ls -d /boot/piboot/pi-kernel_*.snap | sort -V | tail -n 1)
if [ -z "$KERNEL_DIR" ]; then
echo "Error: Could not find pi-kernel directory in /boot/piboot/"
exit 1
fi
# Check if fix is already applied for this kernel
if [ -f "$KERNEL_DIR/overlays/vc4-pi5.dtbo" ] && grep -q "dtoverlay=vc4-pi5"
/run/mnt/ubuntu-seed/config.txt; then
echo "Fix already applied for active kernel ($KERNEL_DIR)."
exit 0
fi
echo "New kernel detected or fix missing. Applying fix to: $KERNEL_DIR"
# 1. Copy the overlay to the shortened name
sudo cp "$KERNEL_DIR/overlays/vc4-kms-v3d-pi5.dtbo"
"$KERNEL_DIR/overlays/vc4-pi5.dtbo"
# 2. Update config.txt
sudo sed -i 's/dtoverlay=vc4-fkms-v3d,cma-128/dtoverlay=vc4-pi5/'
/run/mnt/ubuntu-seed/config.txt
sudo sed -i 's/dtoverlay=vc4-kms-v3d-pi5/dtoverlay=vc4-pi5/'
/run/mnt/ubuntu-seed/config.txt
echo "Fix applied! Rebooting..."
sleep 5
sudo reboot
exit 0
```
...in case anyone else needs an automated way around this until the bug is
fixed.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2128161
Title:
pi-kernel VC4-KMS not working with CM5
To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-kernel-snaps/+bug/2128161/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs