User Tools

Site Tools


products:ict:linux:x11:hires_for_dvi_to_vga

#!/bin/bash

xhost +local:

screen=`xrandr | grep -w connected | cut -f 1 -d ' ' `

# screen example is DVI-1

echo screen $screen

line=`gtf 1680 1050 60 | grep Modeline | cut -f 5- -d ' '` echo line $line

line=`cvt 1680 1050 60 | grep Modeline | cut -f 3- -d ' '` echo line $line

# 1680×1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz # Modeline “1680x1050_60.00” 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync

mode_name=1680×1050

echo mode_name $mode_name

echo xrandr –rmmode $mode_name xrandr –rmmode $mode_name

echo xrandr –newmode $mode_name $line xrandr –newmode $mode_name $line

echo xrandr –addmode $screen $mode_name xrandr –addmode $screen $mode_name

xrandr –output $screen –mode $mode_name

echo xrandr -q xrandr -q

exit 0

products/ict/linux/x11/hires_for_dvi_to_vga.txt · Last modified: 2022/04/26 14:18 by 127.0.0.1