Last active
May 12, 2024 22:01
-
-
Save jfuerth/bd2eb60f5431ffa6b46fa2b3775bdb1d to your computer and use it in GitHub Desktop.
Separate X11 screens on dual-head Raspberry Pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sets up Xorg on Raspberry Pi 3b in FKMS mode for two screens. | |
# | |
# To put the Pi into FKMS mode, add one of the following lines to /boot/config.txt: | |
# 1. "fake" KMS mode (exposes the proprietary vc4 firmware driver via KMS API): | |
# dtoverlay=vc4-fkms-v3d | |
# If you wanted "full" KMS mode, fully open source "vc4" driver in the Linux kernel, you | |
# would use `dtoverlay=vc4-kms-v3d` instead, but then the identifiers in the Driver section | |
# need to be different. | |
# | |
# To run X clients on one screen or another: | |
# Address the DPI display with DISPLAY=:0.0 | |
# Address the HDMI display with DISPLAY=:0.1 | |
Section "Device" | |
Identifier "VideoCore4-DPI" | |
Driver "modesetting" | |
# this allows the HDMI device to get page flipping priority over DPI. | |
# Without this option, you will experience tearing on every HDMI frame | |
# plus a stuttering update cadence on HDMI leading to a very unstable | |
# frame rate. | |
Option "PageFlip" "false" | |
Screen 0 | |
EndSection | |
Section "Device" | |
Identifier "VideoCore4-HDMI" | |
Driver "modesetting" | |
Option "PageFlip" "true" | |
Screen 1 | |
EndSection | |
Section "Monitor" | |
Identifier "HDMI-1" | |
Option "Primary" "true" | |
EndSection | |
Section "Monitor" | |
Identifier "DPI-1" | |
Option "Primary" "false" | |
Option "Rotate" "normal" | |
EndSection | |
Section "Screen" | |
Identifier "DPI Screen" | |
Device "VideoCore4-DPI" | |
Monitor "DPI-1" | |
DefaultDepth 24 | |
SubSection "Display" | |
Depth 24 | |
Modes "FIXED_MODE" | |
EndSubSection | |
EndSection | |
Section "Screen" | |
Identifier "HDMI Screen" | |
Device "VideoCore4-HDMI" | |
Monitor "HDMI-1" | |
DefaultDepth 24 | |
SubSection "Display" | |
Depth 24 | |
Modes "1280x720" | |
EndSubSection | |
EndSection | |
Section "ServerLayout" | |
Identifier "SeparateScreens" | |
Screen 0 "DPI Screen" | |
Screen 1 "HDMI Screen" RightOf "DPI Screen" | |
EndSection | |
Section "ServerFlags" | |
# These options disable screen blanking, which is important for embedded systems | |
Option "BlankTime" "0" | |
Option "StandbyTime" "0" | |
Option "SuspendTime" "0" | |
Option "OffTime" "0" | |
EndSection |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment