Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Show the menu on firmware 1.4.0.8: DRM/KMS when there is no /dev/fb0 (#6) - #7

Merged
pxcm merged 1 commit into
pxcm:mainfrom
fabiomorena:fix/issue-6-drm-display
Dec 1, 2026
Merged

pxcm merged 1 commit into
pxcm:mainfrom
fabiomorena:fix/issue-6-drm-display

Conversation

@fabiomorena

Copy link
Copy Markdown
Contributor

Fixes #6.

Cause. On a real MPC Sample with 1.4.0.8 there is no /dev/fb0: the kernel has no fbdev emulation, and the SPI panel is only reachable through DRM (/dev/dri/card0). The Virtual MPC Sample's kernel has CONFIG_DRM_FBDEV_EMULATION=y, which is why 1.0.4 worked in the emulator. The stock app itself draws with KMS dumb buffers, SETCRTC and page flips.

Change. sampleboot-ui still tries /dev/fb0 first (1.3.0.12 unchanged). Without it, it drives the first connected display on /dev/dri/card0..7 the same way: two XRGB8888 dumb buffers, SETCRTC, then a page flip per frame, falling back to DIRTYFB, then SETCRTC. Plain kernel ioctls, no libdrm, so the binary stays static. The log names the DRM driver, connector and mode. New options --dri and --rotate auto|0|90|180|270 (ROTATE in sampleboot.conf, default auto: a 240×320 mode is turned a quarter).

Tested

  • Real MPC Sample, firmware 1.4.0.8: kms: /dev/dri/card0 (st7796s), connector 34 (SPI), CRTC 37, mode 320x240, no errors. Menu visible, Melodee and the stock firmware start from it. SampQOL still doesn't run on 1.4 (no app after 60 s, SampleBoot starts the stock app), as the README says.
  • QEMU with virtio-gpu and fbdev emulation off, in 320×240 and 240×320 modes (auto rotation).

Known limit. When sampleboot-ui exits, its framebuffers are removed, so the screen is black between "Starting …" and the next system.

🤖 Generated with Claude Code

https://claude.ai/code/session_01D78F61A4wEXbh7JCtjbxTt

…xcm#6)

The 1.4.0.8 kernel has no fbdev emulation, so /dev/fb0 is missing and the
menu stayed black. sampleboot-ui now drives the first connected display on
/dev/dri/card* as the stock app does (dumb buffers, SETCRTC, page flips,
falling back to DIRTYFB and SETCRTC), with plain ioctls so the binary stays
static. New options --dri and --rotate (ROTATE in sampleboot.conf).

Tested in QEMU with virtio-gpu and no fbdev (320x240 and 240x320 modes), and
on a real MPC Sample with 1.4.0.8 (st7796s, SPI, 320x240): menu visible,
Melodee and the stock firmware start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D78F61A4wEXbh7JCtjbxTt
@pxcm
pxcm merged commit 121e036 into pxcm:main Dec 1, 2026
pxcm pushed a commit that referenced this pull request Dec 1, 2026
Stock firmware, Melodee 0.10.4 and Rhythmer OS 0.3.0 start from
SampleBoot's menu on a real MPC Sample with 1.4.0.8, with the DRM/KMS
display of #6/#7. Note how Rhythmer OS goes on the card under SampleBoot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D78F61A4wEXbh7JCtjbxTt
@pxcm

pxcm commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Great work, thank you! Tested on real hardware, clean fallback, and the binary stays static. Merged #7, #9 and #10; they'll ship in 1.0.5.

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.

[Firmware 1.4.0.8] Black screen on real hardware: cannot open /dev/fb0 (blind navigation & booting mods works)

2 participants