Tuesday, May 16, 2017

add missing resolution to linux host

when your system boot up and get very resolution, you can manually add it with command xrandr

example, got only two mode
$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
eDP-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   640x480       59.94 
   320x240       60.05 


now we will add 1920x1080 to it

1- find the string to use with xrandr
$ cvt 1920 1080 60
# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync


2- use the string output of cvt to add newmode with xrandr
$ xrandr --newmode  "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync

3- add that mode to e-DP-1 display
$ xrandr --addmode eDP-1 "1920x1080_60.00"

4- set the screen to use the new mode
$ xrandr --output eDP-1 --mode 1920x1080_60.00

No comments:

Post a Comment