Skip to content

X11 at Raspberry Pi5 #1471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conf/machine/raspberrypi5.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RPI_KERNEL_DEVICETREE = " \
SDIMG_KERNELIMAGE ?= "kernel_2712.img"
SERIAL_CONSOLES ?= "115200;ttyAMA10"

VC4DTBO ?= "vc4-kms-v3d"
VC4DTBO ?= "vc4-kms-v3d-pi5"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a common change that will affect wayland/weston or eglfs images as well. Can you see if core-image-weston boots for your case on pi5 ?

Copy link

@danielfdickinson danielfdickinson Jul 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't needed this with either a pi5 or cm5 with I/O board. When did you need it?

With cm5 I needed updated mesa, however.


# When u-boot is enabled we need to use the "Image" format and the "booti"
# command to load the kernel
Expand Down
5 changes: 5 additions & 0 deletions recipes-bsp/bootfiles/rpi-config_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ do_deploy:append:raspberrypi3-64() {
echo "dtparam=audio=on" >> $CONFIG
}

do_deploy:append:raspberrypi5() {
echo "max_framebuffers=2" >> $CONFIG
echo "disable_fw_kms_setup=1" >> $CONFIG
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, it becomes effective for all kind of graphics stacks on top of pi5

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above. I haven't needed this with a pi5 or cm5 with I/O board. With cm5 I needed updated mesa however.

}

do_deploy:append() {
if grep -q -E '^.{80}.$' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt; then
bbwarn "config.txt contains lines longer than 80 characters, this is not supported"
Expand Down
6 changes: 1 addition & 5 deletions recipes-graphics/mesa/mesa.bbappend
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
# DRI3 note:
# With oe-core commit 8509e2e1a87578882b71948ccef3b50ccf1228b3 dri3 is set
# as default. To state out clearly that Raspi needs dri3 and to avoid surprises
# in case oe-core changes this default, we set dri3 explicitly.
PACKAGECONFIG:append:rpi = " gallium vc4 v3d ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'vulkan broadcom', '', d)}"
PACKAGECONFIG:append:rpi = " gallium vc4 v3d ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'vulkan broadcom', '', d)}"
DRIDRIVERS:class-target:rpi = ""
6 changes: 6 additions & 0 deletions recipes-graphics/xorg-xserver/xserver-xf86-config/99-vc4.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Section "OutputClass"
Identifier "vc4"
MatchDriver "vc4"
Driver "modesetting"
Option "PrimaryGPU" "true"
EndSection
10 changes: 10 additions & 0 deletions recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ SRC_URI:append:rpi = " \
file://xorg.conf.d/98-pitft.conf \
file://xorg.conf.d/99-calibration.conf \
"

SRC_URI:append:raspberrypi5 = " \
file://99-vc4.conf \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it need to be pi5 specific ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed for (at least) both pi5 and cm5 with I/O board. Using this in something like raspberrypi5.conf allows to do SRC_URI:append:pi5 at least.

OVERRIDES:append = ":hwpi5:pi5"

However, from what I have read vc4 may apply to pi4/cm4-io (at least) as well. One could do something like

OVERRIDES:append = ":pi-vc4"

in an include file for any Pi board to which this applies (e.g. probably not the Zero/Zero W)
and SRC_URI:append:pi-vc4 here.

The official Pi hardware documentation might have the info needed to determine which models this is needed for.

"

do_install:append:rpi () {
PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
if [ "${PITFT}" = "1" ]; then
Expand All @@ -13,4 +18,9 @@ do_install:append:rpi () {
fi
}

do_install:append:raspberrypi5 () {
install -d ${D}/${sysconfdir}/X11/xorg.conf.d/
install -m 0644 ${S}/99-vc4.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question as one above, can it be more generic ?


FILES:${PN}:append:rpi = " ${sysconfdir}/X11/xorg.conf.d/*"