summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2024-04-01 17:35:43 +0200
committerChristian Pointner <equinox@spreadspace.org>2024-04-01 17:35:43 +0200
commit6bd10752c94e870687c3fb55d3e5475473383e9c (patch)
treeab2907ff8eb17f336b552ac5f9a8984389549a89 /roles
parentadd streaming/mpv-headless role (needs more testing) (diff)
the video= cmdline option for setting the preferred KMS resolution is flawed.
See this report what is basically the problem https://forums.raspberrypi.com/viewtopic.php?t=361921 Try to workaround using modetest to force setting the resolution that way but unfortunately this does not work either - although i somehow made it work at some point. Alas i can't reproduce it anymore.
Diffstat (limited to 'roles')
-rw-r--r--roles/streaming/mpv-headless/tasks/main.yml11
1 files changed, 10 insertions, 1 deletions
diff --git a/roles/streaming/mpv-headless/tasks/main.yml b/roles/streaming/mpv-headless/tasks/main.yml
index 064efeb2..65fa547d 100644
--- a/roles/streaming/mpv-headless/tasks/main.yml
+++ b/roles/streaming/mpv-headless/tasks/main.yml
@@ -9,6 +9,7 @@
- firmware-linux
- ffmpeg
- mpv
+ - libdrm-tests
state: present
- name: install non-free vaapi drivers
@@ -46,7 +47,15 @@
case $(tty) in
/dev/tty1)
setterm --clear=all --cursor off
- sleep inf
+ args=""
+ for sysfs_f in /sys/class/drm/card*; do
+ if [ -e "$sysfs_f/status" ] && [ $(cat "$sysfs_f/status") = "connected" ]; then
+ connector=$(basename $sysfs_f | sed -E 's/card[0-9]+-//')
+ args="$args -s $connector:{{ mpv_headless_video_mode | replace('@', '-') }}"
+ fi
+ done
+ exec /usr/bin/modetest -F smpte $args
+ #sleep inf
;;
esac
fi