Skip to content

Fix Xorg modesetting on vc4 + skip enable_gpu on Pi 4+ (FullPageOS #708) - #276

Merged
guysoft merged 3 commits into
develfrom
bugfix/708-xorg-vc4-enable-gpu
Sep 2, 2026
Merged

Fix Xorg modesetting on vc4 + skip enable_gpu on Pi 4+ (FullPageOS #708)#276
guysoft merged 3 commits into
develfrom
bugfix/708-xorg-vc4-enable-gpu

Conversation

@guysoft

@guysoft guysoft commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the two real-hardware boot bugs reported in FullPageOS 1.0.0-rc1 (guysoft/FullPageOS#708):

  1. Black screen with flashing cursor (Pi 5, Trixie): Xorg autoconfig matches modesetting but falls back to fbdev and dies with (EE) Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices, so lightdm restart-loops forever and the display stays black. Ship /etc/X11/xorg.conf.d/99-vc4.conf (OutputClass: MatchDriver vc4 → modesetting, PrimaryGPU) so X binds the KMS device.

  2. Unwanted first-boot behavior from enable_gpu (runs on every Pi): the script seds a wrong path (/opt/custompios/scripts/scripts/start_gui, double scripts/), edits cmdline.txt/config.txt, and calls shutdown -r now unconditionally on first boot — the "reboots itself a couple times" reports. On Pi 4+/5 vc4 KMS is already the default, so the script now detects the model and skips (touching /etc/gpu_enabled).

Hardware verification (rig: Pi 5, HDMI capture card)

  • RC1 (no fix): Xorg exits rc=1 every ~100ms in a lightdm restart loop; black screen with cursor. Xorg.0.log shows the fbdev busID error above.
  • Same image after installing only this 99-vc4.conf + systemctl start lightdm: Chromium kiosk starts and the FullPageOS welcome page renders on HDMI (logo, QR, bit.ly/FPOSSETUP).
  • Evidence: before/after HDMI captures + Xorg logs collected from the running system (available on request; will attach to FullPageOS issue #708).

Notes

  • The enable_gpu skip uses the revision code model_id = hex & 0xffff >= 0x0040 check to detect Pi 4+ / newer models.
  • No changes to QEMU/E2E paths.

Based on: guysoft/FullPageOS#708 (beakercs's confirmed workaround)

On Pi 5 with vc4-kms-v3d, Xorg autoconfig tries to use both the
fbdev driver (on /dev/fb0) and the modesetting driver (on
/dev/dri/card1), which causes:

  (EE) Cannot run in framebuffer mode.
  Please specify busIDs for all framebuffer devices
  Fatal server error: no screens found

This results in the FullPageOS kiosk (chromium) never starting
on Pi 5 — issue guysoft/FullPageOS#708.

The fix adds an Xorg OutputClass config that forces the
modesetting driver for the vc4 DRM device, preventing the
fbdev/modesetting conflict.

Confirmed working on Pi 5 with a physical HDMI display:
- lightdm starts (active)
- matchbox-window-manager starts
- chromium kiosk starts (--kiosk --app=http://localhost/...)
- FullPageDashboard loads (HTTP 200)
- xrandr shows HDMI-1 connected 1920x1200

Fixes: guysoft/FullPageOS#708
Comment thread src/modules/gui/filesystem/opt/scripts/enable_gpu Outdated
@guysoft
guysoft merged commit 8662727 into devel Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant