summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2024-04-06 23:51:41 +0300
committerMaxim Devaev <[email protected]>2024-04-06 23:51:41 +0300
commita276aa76d6ef0bd16d72e5f945314816529bf064 (patch)
tree3cae6a21956439352b47742e7ad958c4df22862a
parent8b7196671b9d0f033ea02c617b5971e0433d04a3 (diff)
v4plus: config.txt for passthrough
-rw-r--r--configs/os/boot-config/v4plus-hdmi-rpi4.txt4
-rw-r--r--kvmd.install9
2 files changed, 13 insertions, 0 deletions
diff --git a/configs/os/boot-config/v4plus-hdmi-rpi4.txt b/configs/os/boot-config/v4plus-hdmi-rpi4.txt
index 3728ab39..05821ea4 100644
--- a/configs/os/boot-config/v4plus-hdmi-rpi4.txt
+++ b/configs/os/boot-config/v4plus-hdmi-rpi4.txt
@@ -23,3 +23,7 @@ dtparam=i2c_arm=on
# Clock
dtoverlay=i2c-rtc,pcf8563,wakeup-source
+
+# Passthrough
+dtoverlay=vc4-kms-v3d
+disable_overscan=1
diff --git a/kvmd.install b/kvmd.install
index a97b799d..e57d03c7 100644
--- a/kvmd.install
+++ b/kvmd.install
@@ -83,6 +83,15 @@ post_upgrade() {
fi
+ if [[ "$(varcmp "$2" 3.331)" -lt 0 ]]; then
+ grep -q "^dtoverlay=vc4-kms-v3d" /boot/config.txt || cat << EOF >> /boot/config.txt
+
+# Passthrough
+dtoverlay=vc4-kms-v3d
+disable_overscan=1
+EOF
+ fi
+
# Some update deletes /etc/motd, WTF
# shellcheck disable=SC2015,SC2166
[ ! -f /etc/motd -a -f /etc/motd.pacsave ] && mv /etc/motd.pacsave /etc/motd || true