功能:完善2K串流、显示恢复与输入优化
This commit is contained in:
1 parent
e47b01beec
commit
938ec97cce
95 files changed
+5788
-72
No files matched your search
@@ -3,26 +3,28 @@
|
||||
export DISPLAY="${DISPLAY:-:0}"
|
||||
export XAUTHORITY="${XAUTHORITY:-/home/armbian/.Xauthority}"
|
||||
|
||||
# Match the local output to the 2K Moonlight stream.
|
||||
# This kernel rejects the monitor's 241.70 MHz timing but accepts the 297 MHz
|
||||
# PLL rate. Longer vertical blanking produces 2560x1440 at approximately 60 Hz.
|
||||
# HDMI can appear a few seconds after the desktop autostart entry runs.
|
||||
: >/tmp/vdi-display-mode.log
|
||||
mode="2560x1440_60_fixed297"
|
||||
for _ in $(seq 1 20); do
|
||||
if xrandr --query 2>>/tmp/vdi-display-mode.log | grep -q '^HDMI-1 connected'; then
|
||||
xrandr --newmode "$mode" 297.00 \
|
||||
2560 2608 2640 2720 1440 1443 1448 1820 \
|
||||
+HSync -VSync >>/tmp/vdi-display-mode.log 2>&1 || true
|
||||
xrandr --addmode HDMI-1 "$mode" >>/tmp/vdi-display-mode.log 2>&1 || true
|
||||
if xrandr --output HDMI-1 --mode "$mode" >>/tmp/vdi-display-mode.log 2>&1; then
|
||||
break
|
||||
fi
|
||||
xrandr --output HDMI-1 --mode 1920x1080 --rate 60 \
|
||||
>>/tmp/vdi-display-mode.log 2>&1 || true
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# Optional verified rendering deployment. Parse an allowlist as data; never
|
||||
# source/eval configuration. Explicit environment overrides the saved defaults.
|
||||
render_conf="${VDI_RENDER_CONF:-$HOME/.config/vdi-terminal/render.conf}"
|
||||
if [ -r "$render_conf" ]; then
|
||||
while IFS='=' read -r key value || [ -n "$key" ]; do
|
||||
case "$key" in
|
||||
profile) export VDI_STREAM_PROFILE="${VDI_STREAM_PROFILE:-$value}" ;;
|
||||
stats) export VDI_STREAM_STATS="${VDI_STREAM_STATS:-$value}" ;;
|
||||
program) export VDI_MOONLIGHT_PROGRAM="${VDI_MOONLIGHT_PROGRAM:-$value}" ;;
|
||||
decoder) export VDI_MOONLIGHT_DECODER="${VDI_MOONLIGHT_DECODER:-$value}" ;;
|
||||
codec) export VDI_MOONLIGHT_CODEC="${VDI_MOONLIGHT_CODEC:-$value}" ;;
|
||||
esac
|
||||
done < "$render_conf"
|
||||
fi
|
||||
|
||||
# Use the same idempotent recovery for boot and HDMI hotplug. The user service
|
||||
# supervises ongoing recovery; a singleton lock prevents competing instances.
|
||||
"$(dirname "$0")/vdi-display-guard" --once >>/tmp/vdi-display-mode.log 2>&1 || true
|
||||
if ! systemctl --user start vdi-display-guard.service >>/tmp/vdi-display-mode.log 2>&1; then
|
||||
echo 'WARNING: display guard service unavailable; only boot recovery active' \
|
||||
>>/tmp/vdi-display-mode.log
|
||||
fi
|
||||
|
||||
exec /home/armbian/vdi-terminal/bin/vdi-kiosk-monitor -- \
|
||||
/home/armbian/vdi-terminal/bin/kiosk-shell
|
||||
Reference in new issue
Block a user