linux System Custom Resolution

Keywords: sudo

Open the terminal and enter the following command:

Step 1

xrandr

Output:

Virtual1 connected primary 1440x900+0+0 (normal left inverted right x axis y axis) 0mm x 0mm

View the currently connected display device Virtual1

2 Steps

gtf 800 480 60

output

# 800x480 @ 60.00 Hz (GTF) hsync: 29.82 kHz; pclk: 29.58 MHz
 Modeline "800x480_60.00"  29.58  800 816 896 992  480 481 484 497  -HSync +Vsync

3 Steps

xrandr --newmode  "800x480_60.00"  29.58  800 816 896 992  480 481 484 497  -HSync +Vsync

4 Steps

xrandr --addmode Virtual1 "800x480_60.00"

5 Steps

xrandr --output Virtual1 --mode "800x480_60.00" 

6 Steps

//Following is persistent display mode

//1
Edit Profile ~/.config/Monitors.xmlTo configure the resolution size, but will not take effect until the next reboot

<monitors version="1">
  <configuration>
      <clone>no</clone>
      <output name="Virtual1">
          <vendor>???</vendor>
          <product>0x0000</product>
          <serial>0x00000000</serial>
          <width>800</width>
          <height>480</height>
          <rate>60</rate>
          <x>0</x>
          <y>0</y>
          <rotation>normal</rotation>
          <reflect_x>no</reflect_x>
          <reflect_y>no</reflect_y>
          <primary>yes</primary>
      </output>
      <output name="Virtual2">
      </output>
      <output name="Virtual3">
      </output>
      <output name="Virtual4">
      </output>
      <output name="Virtual5">
      </output>
      <output name="Virtual6">
      </output>
      <output name="Virtual7">
      </output>
      <output name="Virtual8">
      </output>
  </configuration>
</monitors>

//2
Sudo gedit/etc/X11/xorg.conf//Open (or New)Xorg.confFile, the initial system does not have this file, you can create it.
After opening, add the following to the file:

Section "Monitor"
    Identifier "Configured Monitor"
    Modeline "800x480_60.00"  29.58  800 816 896 992  480 481 484 497  -HSync +Vsync    #Output from command gtf
    Option "PreferredMode" "800x480_60.00"    #The pattern name is "800x480_60.00"
EndSection


Section "Screen"
    Identifier "Default Screen"
    Monitor "Configured Monitor"
    Device "Configured Video Device"
EndSection


Section "Device"
    Identifier "Configured Video Device"
EndSection

Finish, Restart, OK

Posted by casty on Mon, 13 Jul 2020 09:29:58 -0700