In a world of plug and play everything “just works” except… It doesn’t, one example I have always found is displays, especially when the hardware used is “non-standard” more specifically using an LCD TV as a monitor. In an ideal situation you connect a display to a pc, the monitor sends Extended Display Identification Data to the video adaptor displaying all available resolutions. In reality, slightly differing standards in monitors and video adaptors mean you don’t always receive the correct resolutions passed to the operating system. Recently repurposing a dual-core Compaq pc and Compaq brand monitor with a Radeon HD4350 meant once again coming up with resolution issues. The display maximum display given was 1024×768, but i knew the hardware was definitely capable of 1440×900
Step In xrandr
xrandr is a command line tool to display and change the current resolution, In addition, you can add resolutions that you know your monitor is capable of displaying but doesn’t register. Note: This only applies to X.org sessions, not Wayland!
Let’s start by finding out what xrandr reports by opening a terminal and typing:
This example is from my laptop showing the screen connected “eDP-1” and the HDMI port “HDMI-1” not connected it displays all the resolutions and refresh rates detected.
Back to the previous problem, if we want to add a resolution of “1440×900” then we need to find the modeline for the resolution we want this can be done by typing:
cvt 1440 900
This should return the following:
# 1440×900 59.89 Hz (CVT 1.30MA) hsync: 55.93 kHz; pclk: 106.50 MHz
Modeline “1440x900_60.00” 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync
From this we can then add the modeline by adding:
xrandr --newmode "1440x900" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync
We then need to assign this modeline to an output:
$ xrandr --addmode HDMI-1 1440x900
If the output is your primary display it should automatically switch to this resolution otherwise enter:
xrandr --output HDMI-1 --mode 1440x900
If you use an LCD TV as a monitor you may encounter problems with the display being outside of the edge of the screen. This can be fixed with:
$ xrandr --output HDMI-1 --set underscan on --set "underscan vborder" 25 --set "underscan hborder" 40
Adjust the values as needed to make the picture fit on the screen
xrandr is a great tool for forcing resolution rates on display hardware but it is not however persistent. This means if you reboot you will need to go through the procedure again. To save the changes for boot add the commands created to the bottom of /home/USER/.profile in user home directory.