Resolutions problems on Linux Operating Systems like Ubuntu,OpenSuse,Linux Mint etc is pretty common, as linux still lacks support for many hardware or due to various reasons but there are workarounds to fix this problem.
In this post I'll be teaching you how to adjust your monitor resolution to your preference and automate it, so every time you log in to your computer it automatically sets to desired resolution.
Please Note: If you're on proprietary drivers like "nvidia" it's possible that the this will not work properly. I tried and I was facing upscaled resolution problem instead of native, so things were very blurry.
Part 1
First you need to open your terminal press: Ctrl+Alt+T
First you need to open your terminal press: Ctrl+Alt+T
Then you need to copy paste the following code in the terminal, if this code doesn't work try add sudo before and then write the command
[cvt 1600 900 60]Syntax : cvt width height refreshrate
Here 1600 900 is my resolution so and 60 is my refreshrate.
After you enter this command it will give you an output something like this
[# 1600x900 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz
Modeline "1600x900_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync]
Now copy everything after Modeline in your terminal and write xrandr --newmode and paste the code like this. Remember the numbers inside quotations is your mode name we will require this later.
[xrandr --newmode "1600x900_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync]
Then we need to check the output port, type in the following command to check the connected output. It will give a list of output the one which shows connected is your output. Sometimes there will be multiple connected ports so you need to verify yourself which port it is. In this case it's VGA-0
[purplecandy@desktop:~$ xrandr -q
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
HDMI-0 disconnected (normal left inverted right x axis y axis)
VGA-0 connected ......
1024x768 75.1 60.0
800x600 75.0 60.3
640x480 75.0 60.0
720x400 70.1 ]
Now we need to add the mode in our output port
[xrandr --addmode VGA-0 1600x900_60.00]Syntax: xrandr --addmode output_port mode_name
Now we need to enable the mode of our output port
[xrandr --output VGA-0 --mode 1600x900_60.00]Syntax: xrandr --output output_port --mode mode_name
After executing the above code your monitor will blink and if everything is done properly you will see your resolution is changed.
Go to next page for part 2
[next]
Part 2
Now we need to automate this command. So everytime we log in to our system it automatically changes it's resolution. Open your text editor and enter all the main commands we wrote like this
[cvt 1600 900 60Every new command should be written in the next line then save under /home/your_username as your_filename.sh then open your file manager navigate to the folder where its saved.
xrandr --newmode "1600x900_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
xrandr --addmode VGA-0 1600x900_60.00
xrandr --output VGA-0 --mode 1600x900_60.00]
Right click on the file and click properties.
In properties go to permission tab and check "Allow this file to run as a program" and close it.
Then go to your "Startup Applications Settings" or "Session and Startup" the approach is different depending on what distro you use but most of the time it's in your main System Settings.
Then you to click on add
[Name field: Write anyname
Description: Write description
Command: Click on browse and select the executable file we just saved.then click on okay.]
That's it.

COMMENTS