title: How to change resolution in 'Raspberry Pi OS' to a custom resolution
body: <p>So I'm trying to implement the following resolution: <em>1920x127</em></p>
  <p>What I have tried so far:</p>
  <p><strong>Option 1-</strong></p>
  <p>Added the following to  <code>/boo/config.txt</code> file :</p>
  <pre><code>hdmi_ignore_edid=0xa5000080
  hdmi_cvt=1920 127 60
  hdmi_group=2
  hdmi_mode=8
  </code></pre>
  <p>Following the Raspberry Pi documentation: <a href="https://www.raspberrypi.org/documentation/configuration/config-txt/video.md" rel="nofollow noreferrer">https://www.raspberrypi.org/documentation/configuration/config-txt/video.md</a></p>
  <p>This doesn't sets the resolution to <em>1920x127</em>. But if I use for example <em>1920x1080</em> it does change the resolution accordingly.
  So this process works but not for my current need.</p>
  <p><strong>Option 2-</strong></p>
  <p>Added the following to <code>/boot/cmdline.txt</code> file:</p>
  <pre><code>video=HDMI-A-1:1920x127M@60
  </code></pre>
  <p>So the file looks like this:</p>
  <pre><code>console=serial0,115200 video=HDMI-A-1:1920x127M@60 console=tty1 root=PARTUUID=156bada3-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
  </code></pre>
  <p>And just as the first solution it doesn't work with <em>1920x127</em> but it does with <em>1920x1080</em>.</p>
  <p>Now, this solution does not work alone. It needs the following</p>
  <p>Create the file <code>/usr/share/X11/xorg.conf.d/screen-resolution.conf</code> and paste:</p>
  <pre><code>Section &quot;Screen&quot;
   Identifier &quot;Screen0&quot;
   Device &quot;Card0&quot;
   SubSection &quot;Display&quot;
   Modes &quot;1920x127&quot;
   EndSubSection
  EndSection
  </code></pre>
  <p>But still, with <em>1920x127</em> the X server goes to <em>1024x768</em> but if I set up both files with <em>1920x1080</em> the X server ran at <em>1920x1080</em></p>
  <p><strong>End of option 2</strong></p>
  <p>So checking the <code>xrandr</code> command I can see that it says:</p>
  <pre><code>Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 7680 x 7680
  </code></pre>
  <p>The minimum is 320x200. So the minimum resolution I was able to set was 1920x240.</p>
  <p>Now, about the Monitors.</p>
  <p>Everything I have tried have been in 2 monitors:</p>
  <pre><code>1- ViewSonic VX2776
  2- Custom made monitor that should support *1920x127*
  </code></pre>
  <p>So. Solution 1 and 2 in the Monitor 1 works with resolution <em>1920x1080</em> and <em>1920x240</em>, it looks stretched but the Monitor shows something.
  It does not work with resolution *1920x127. Meaning that it goes to default <em>1024x768</em>.</p>
  <p>In the Monitor 2, the solution 1 does not work, it always goes to default <em>1024x768</em>. But solution 2 it works with <em>1920x1080</em> and <em>1920x320</em>. Note the &quot;320&quot;, because the <em>1920x240</em> it works, meaning that the X servers startx at <em>1920x240</em> but the monitor indicates &quot;resolution not supported&quot;.</p>
  <p>I have tried force <em>1920x127</em> with xrandr:</p>
  <pre><code>cvt 1920 127 60
  xrandr --newmode &quot;1920x127_60.00&quot;  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync
  xrandr --addmode HDM-1 1920x127_60.00
  xrandr --output HDMI-1 --mode 1920x127
  </code></pre>
  <p>(Not actual used code, just an example)</p>
  <p>And after this, the monitor goes off, like there is no output. And after set the resolution back to the default one, the monitor goes on.</p>
  <p>So, basically the question is: How to set up a resolution below the minimum shown from xrandr <em>320x200</em>?</p>
  <p>Note: The makers of the monitor show to me the monitor working at <em>1920x127</em> with their own SBC with a Rock chip on Android.</p>