An easy way to permanently fix resolution problems in Linux


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
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 60

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]
Every 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.

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

Name

Android,3,Dart,1,Data Structures,1,Explained,1,Flutter,1,Guide,5,Laptops,3,Linux,2,Mobile,2,Notes,1,PC,5,Projects,1,Rants,3,
ltr
item
Kibibyte: An easy way to permanently fix resolution problems in Linux
An easy way to permanently fix resolution problems in Linux
Quickly fix resolution problems on Ubuntu,OpenSuse,Linux Mint etc.
https://dn-linuxcn.qbox.me/data/attachment/album/201701/10/222416ccarzxm8bb81qeze.jpg
Kibibyte
https://thefatmanme.blogspot.com/2018/08/an-easy-way-to-permanently-fix.html
https://thefatmanme.blogspot.com/
https://thefatmanme.blogspot.com/
https://thefatmanme.blogspot.com/2018/08/an-easy-way-to-permanently-fix.html
true
5328814115800649386
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy