DEV Community

Robertopaolo Ramirez
Robertopaolo Ramirez

Posted on

Set new resolution on Linux - Force

Step 1: Run this command (put it the resolution that you would like) "cvt + resolution + hz":

cvt 1920 1080 60
Enter fullscreen mode Exit fullscreen mode

Step 2: It will appear this message:

# 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
Enter fullscreen mode Exit fullscreen mode

So you will copy starting after Modeline.

Step 3: Run :

xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
Enter fullscreen mode Exit fullscreen mode

Step 4: Run:

xrandr --addmode DP-1 1920x1080_60.00
Enter fullscreen mode Exit fullscreen mode

Step 5: Run to confirm: xrandr

Screen 0: minimum 320 x 200, current 3286 x 1080, maximum 16384 x 16384
HDMI-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 410mm x 230mm
   1360x768      60.02 +
   1920x1080     60.00*   59.94  
   1280x720      60.00    59.94  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x480       60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
DP-1 connected 1366x768+1920+0 (normal left inverted right x axis y axis) 410mm x 230mm
   1366x768      59.79*+
   1360x768      60.02  
   1280x720      60.00  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    59.94  
   720x400       70.08  
   1920x1080_60.00  59.96
Enter fullscreen mode Exit fullscreen mode

Step 6: To put this resolution now, run:

xrandr --output DP-1 --mode 1920x1080_60.00
Enter fullscreen mode Exit fullscreen mode

Step 7: Save this changes to keep when reboot computer.

Copy the 3 commands that we used previously.(create new resolution, add new mode, apply new mode)

xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr --addmode DP-1 1920x1080_60.00
xrandr --output DP-1 --mode 1920x1080_60.00
Enter fullscreen mode Exit fullscreen mode

And goes to the /etc/profile. Open with your editor favorite as sudo mode, and paste down of latest fi, like this:
/etc/profile

Top comments (0)