script for trying new modes, and some useful new modes in xorg

This commit is contained in:
lif 2021-12-16 00:53:26 -08:00
parent 7ea925d08b
commit 5dd0e35bb1
3 changed files with 45 additions and 1 deletions

13
fbdev-xorg.conf Normal file
View file

@ -0,0 +1,13 @@
Section "Device"
Identifier "FBDEV"
Driver "fbdev"
Option "fbdev" "/dev/fb0"
# Option "ShadowFB" "false"
EndSection
Section "ServerFlags"
Option "BlankTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
EndSection

19
try-gtf-xrandr.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
set -eo pipefail
display=LVDS-1
modeline=($(gtf "$@" | grep Modeline | sed 's/"//g'))
mode=${modeline[1]}
set -x
xrandr --newmode ${modeline[@]:1}
if ! xrandr --addmode $display $mode ; then
exec xrandr --rmmode $mode
fi
if ! xrandr --output $display --mode $mode ; then
xrandr --delmode $display $mode
exec xrandr --rmmode $mode
fi
gtf "$@"

View file

@ -17,7 +17,19 @@ EndSection
Section "Monitor"
Identifier "Monitor0"
Option "PreferredMode" "1064x512_60.00"
# 1.5x upscaling to native (768p)
Modeline "1064x512_60.00" 42.56 1064 1096 1200 1336 512 513 516 531 -HSync +Vsync
# whole-number multiple of Gameboy Advance resolution (160p * 3)
Modeline "1000x480_60.00" 37.45 1000 1024 1128 1256 480 481 484 497 -HSync +Vsync
# whole-number multiple of Super NES resolution (224p * 2)
Modeline "936x448_60.00" 32.29 936 952 1048 1160 448 449 452 464 -HSync +Vsync
# whole-number multiple of Gameboy Color resolution (144p * 3)
Modeline "896x432_60.00" 29.68 896 912 1000 1104 432 433 436 448 -HSync +Vsync
# whole-number multiple of Doom and Doom accessories (200p * 2)
Modeline "832x400_60.00" 25.10 832 840 920 1008 400 401 404 415 -HSync +Vsync
# 2x upscaling to native (768p)
Modeline "800x384_60.00" 23.31 800 808 888 976 384 385 388 398 -HSync +Vsync
# good for watching 360p youtube
Modeline "752x360_60.00" 20.05 752 752 824 896 360 361 364 373 -HSync +Vsync
Option "PreferredMode" "1000x480_60.00"
EndSection