Add new screen resolution in Linux Mint

Thinker
  11 years ago
  32

Linux does not have as much options for display resolutions as in windows. A 22" Monitor in linux will have 1920x1080, 1440x900, 1280x960, 1024x768 resolutions. Some users may need resolution like 1600x900, 1366x768 for some purposes. These resolutions can be added manually in Linux. Basic steps for adding 1600x900 resolution are explained as under which can be modified for any other screen resolution by changing values 1600x900 with your required one. 

 

1. First step is to create modeline. This is done to get appropriate values of hsync, vsync and other parameters which are required to display a resolution properly in the backend. To add resolution of 1600x900, open terminal and type:

cvt 1600 900

This will create modeline for resolution of 1600x900 which will look something like this:

1600x900 59.95 Hz (CVT 1.44M9) hsync: 55.99 kHz; pclk: 118.25 MHz

Modeline "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync

These numbers may vary according to your monitor.

 

2. To add this resolution to monitor settings, type the following highlighted commands one by one:

xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync

(values after xrandr --newmode to be pasted from second line of generated values with cvt command from your own computer, don't copy from here. In other words, after writing xrandr --newmode in terminal, copy the output of cvt command from its second line excluding word Modeline upto its end and paste it after xrandr --addmode.  )

xrandr --addmode VGA1 "1600x900_60.00"

After these steps, resolution of 1600x900 will appear under the list of various resolutions available in display settings. This will remain listed for one session only. When computer is restarted, this will disappear. To make it appear permanently, we need to configure xorg.conf file and make this entry manually.

 

3. In Mint, xorg.conf is not present by default and has to be created. This can be created only when x server is not working ie.  in console mode otherwise system will give error. Type these highlighted commands one by one in console mode:

Alt+Ctrl+F1 (switch to console mode)

Login by typing user name and password

sudo service lightdm stop (For Mint 12 Lisa users)   or   sudo service mdm stop (For Mint 13 Maya users)    

sudo X -configure (generates new xorg.conf file)

 

File with name xorg.conf.new will be created in Home folder. Although some error message will appear but file will be created. Just ignore that message.

Note: 1.Use only one of the commands (from sudo service lightdm stop or sudo service mdm stop) according to your distro edition. These are used to kill x server.

 

         2. In Mint 13 maya,  after sudo service mdm stop, Alt + Ctrl + F1 has to be pressed again.

 

4. To switch back to graphical mode, type:

sudo start lightdm (Mint 12 Lisa users)

sudo service mdm start (Mint 13 Maya users)

If above commands fail to bring back graphical mode, just restart your computer.

 

5. Open Home folder. Rename this file from xorg.conf.new to xorg.conf Open xorg.conf with text editor and make the following changes. Underline shows newly added lines

  • Add Modeline in Monitor Section under each Identifier option. Example:

Section "Monitor"
        Identifier   "Monitor0"
        Modeline     "1600x900_60.00"  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Monitor"
        Identifier   "Monitor1"
        Modeline     "1600x900_60.00"  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

  • Add modes in screen section in similar way as described above in each subsection (screen1, screen2) under the element Depth (Also for each depth). Example:

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    SubSection "Display"
               Viewport   0 0
               Depth     1
               Modes   "1600x900"
    EndSubSection
    SubSection "Display"
                Viewport   0 0
                Depth     4
                Modes   "1600x900"
    EndSubSection
    SubSection "Display"
                 Viewport   0 0
                 Depth     8
                 Modes   "1600x900"
    EndSubSection

(Upto Depth 24)

EndSection

Section "Screen"

 Identifier "Screen1"
    Device     "Card1"
    Monitor    "Monitor1"
    SubSection "Display"
                Viewport   0 0
                Depth     1
                Modes   "1600x900"
    EndSubSection
    SubSection "Display"
                Viewport   0 0
                Depth     4
                Modes   "1600x900"
    EndSubSection
    SubSection "Display"
                 Viewport   0 0
                 Depth     8
                 Modes   "1600x900"
    EndSubSection

    (Upto Depth 24)

EndSection

 

6. Save this file and copy this file to /etc/X11/ by typing following command:

sudo cp xorg.conf /etc/X11

(assuming that xorg.conf is located at Home folder) or do it by graphically if you know.

 

Note: New resolution must be less than Maximum resolution that monitor can support. And care fully add those lines to each subsection Monitor0, Monitor1, Monitor2, Monitor3, Screen1, Screen2, Screen3, Screen4. For Screen section, add entries for every Depth from 1, 2, 4, 8, 16, 24.

Comments
damirexus 6 years ago

Hello there, I followed theese instruction and when i input last command from step 2 i get my external screen scrambled as you can see on pic. Can you help me somehow with this. Thanks!

https://imgur.com/a/1fyUt


Ziffel 7 years ago

I've tried to create an xorg.conf.new but it never makes anything. I've done an ls command in the home folder and nothing is visible.

"No devices to configure. Configuration failed (EE) Server terminated with error (2). Closing log file"

I get this at the end of the output, its the only thing I can see as a valid ending or warning. Everything else is notification speil about visit this website and check this wiki for information etc.

Any advice?


rdeleonb 7 years ago

It's so helpful!
I just changed the resolution to 1920 1080
Thanks!


samk3nny 8 years ago

This article is awesome, thank you. I've used it numerous times.

The last time I had to set the resolution - when I migrated from VMWare Fusion to VirtualBox - I got the error: xrandr: Failed to get size of gamma for output default.

To resolve it I had to add: --output default --gamma 1:1:1 to the appropriate commands. e.g.

xrandr --output default --gamma 1:1:1 --newmode ....
xrandr --addmode default MY_MODE --gamma 1:1:1

I hope this helps someone else too!


zgorg2004 8 years ago

(1368*768 in fact for me)


zgorg2004 8 years ago

the point 2 is useless if you just copy the right lines in the xorg file and move it in the system folder and restart computer it's ok. I just repeat cvt 1366 768 to have a second mode...


zgorg2004 8 years ago

oh I forget to change a protect file "Avec les droits d'administration : appuyez sur Alt–F2, puis saisissez « gksudo gedit ». Saisissez votre mot de passe." found there http://doc.ubuntu-fr.org/tutoriel/comment_modifier_un_fichier


zgorg2004 8 years ago

it's really strong. I have just installed Rosa yesterday. and your solution is working. first i believed it was a problem of driver with the intel core i3 with HD graphics as IGP but the big question is why a such important fact has not been corrected since 3 years in mint? my eyes are happy now. I think that I will add 1368 now in 16/9 too. I'm french too and I was fed up with windows


malrubius 8 years ago

sudo service mdm stop (and start) worked for me: Mint 17.1 Mate


DWSampson 8 years ago

Hi Thinker.. This part doesn't work with Linux Mint 17.2 (Cinnamon) - 3. In Mint, xorg.conf is not present by default and has to be created. This can be created only when x server is not working ie. in console mode otherwise system will give error. Type these highlighted commands one by one in console mode:

Alt+Ctrl+F1 (switch to console mode)

Login by typing user name and password

sudo service lightdm stop (For Mint 12 Lisa users) or sudo service mdm stop (For Mint 13 Maya users)

sudo X -configure (generates new xorg.conf file)

File with name xorg.conf.new will be created in Home folder. Although some error message will appear but file will be created. Just ignore that message.

Note: 1.Use only one of the commands (from sudo service lightdm stop or sudo service mdm stop) according to your distro edition. These are used to kill x server.

2. In Mint 13 maya, after sudo service mdm stop, Alt + Ctrl + F1 has to be pressed again.

It says the "service" command is not recognized. Nor can you get back to the terminal screen by pressing Alt + Ctrl + F1

Any suggestions Thinker, because it looks like you might need to revise this article for Linux Mint 17.2 users, such as myself.. :-)


jcgd711 9 years ago

My friends thanks a lot from Medellín-Colombia, this tutorial helped me so much and now I can use My Dell Optiplex 755 with 1368x768.

Thanks again and good luck, Linux Mint Forever....


Tree 9 years ago

I got this to work for me on Mint 17 Qiana. I have a Kvm switch that will not allow Mint to actually detect the monitor correctly. I plugged the monitor directly into Mint and it detected the dimensions that the monitor and Mint were compatible with. I input those dimensions into this tutorials directions and I now have my monitors dimensions available to me.

It is important to note that it is nessairy to place a dash between the VGA and the 1,
for instance, he gives the example of,
xrandr --addmode VGA1 "1600x900_60.00"
It should be - -(note the dash) xrandr --addmode VGA-1 "1600x900_60.00"

I followed the Mint 13 version with the Terminal calls of
sudo service mdm start
and the-- sudo service mdm stop
and every thing seems to have worked well for me.


Gannet 9 years ago

Why did you give up Thinker? Do you think you made the right decision?

I tried this on Mint 17 with XFCE and it half worked. I could get the new resolution to appear in the display preferences but it didn't actually change the resolution of the display.

On the display settings dialogue it identifies the display as "HDMI-0" with a very limited list of settings, the largest being 1024x768. The adaptor is capable of much much more.

The PC it's installed on doesn't actually have a display connected, I am accessing it using VNC. I installed "xserver-xorg-video-dummy" on the host machine and this is is supposed to give me the ability to pick a resolution of any dimensions. Unfortunately, I don't know how to make it work and there doesn't seem to be any documentation anywhere.

Any ideas anyone?


Thinker 9 years ago

Guys now I no longer use Linux Mint and I have moved to Ubuntu Gnome 14.04. Last Mint I used was Mint 13. I have tested this tutorial on Mint 12 and 13 only. Even this tutorial doesn't work for Ubuntu 14.04 and I am searching for solution. When succeeded, I will definitely pose here..


trageharrie 10 years ago

Hi, I made some progress, but Iḿ not satisfied yet.
I solved the previous problem. I know houw to get the xorg.conf in the right folder. But it did not work. I noticed there were two screens in the setting. VGA1 and LVDS1. I deleted VGA1, but then the screen turned black. I could not do anything but reboot in the secure mode >>> screen became visible. >> delete the xorg.conf in X11 and after a reboot I could work abgain. But now every time I have to run the protocol of the 3 first commands in console, but the settings disappear after a reboot. I copied a version of the xorg.conf according to the guideline provided here, put it in the X11 folder, but the screen turns black. So I dont have a solution yet. Can anyone assist?


trageharrie 10 years ago

Hi, I followed the instuctions in Mint 16 Petra all went well. I created xorg.conf but it was created in my personal foldere and now I can't move to the home folder or the etc/X11 folder.
The computer says (in Dutch and in graphic mode) that I don have acces to those folders and in the console mode it says (in dutch) can't retrieve the status of xorg.conf.
What to do?


Thinker 10 years ago

@dec1976 You have written Modes "1280x768_60" in screen section. Remove _60 from that and it should look like Modes "1280x768" (see the tutorial carefully). This could be the cause of error.


anisrehan 10 years ago

Adding screen modes according to this procedure shifted the cinnamon to software rendering mode.
I think that's due to X11/xorg.conf file installed, because removing the modes from conf file does not return the cinnamon to hardware mode.
software rending mode sucks, help me out.


Thinker 10 years ago

@segarcia1  I have written this tutorial for integrated graphics. I dont have dedicated graphics card so I have no idea will it work for that or not. Also some users say that this tutorial does not work on Mint 15. That might also be the case. I have tested this method on Mint 12 and 13 only.


segarcia1 10 years ago

Hello,
I tried doing this and it did not work. I have nvidia 7900gs with the latest driver on my laptop. The only option for me is 1900x1200 and my eyes burn. I want to change it to something like 1280x720. I am using mint olivia 15. I have tried different applets but the ones that allow me to change the resolution make it like I zoomed in or something and I can't even see the task bar. Any help would be great.


Volfy 10 years ago

I also get following message after comand xrandr
xrandr: Failed to get size of gamma for output default
X Error of failed request: BadName (named color or font does not exist)


Volfy 10 years ago

How to do this for mint 15 Olivia?


Jchw 11 years ago

Just to follow up on my question regarding the broken xorg.conf file. I resolved this problem,the laptop is now working fine and the resolution has been changed. The tutorial is excellent and has solved the resolution problem on both of the laptops.

It was entirely my fault that I did not follow the tutorial correctly for the second laptop and that broke the xorg.conf file and so I could not boot up. I resolved it by running the instalation usb drive from which I could see the Mint system and I was able to navigate to the Etc/X11 folder. When I opened the X11 folder I right clicked and selected the option open in terminal. I then ran sudo mv xorg.conf xorg.broken. This change the xorg.conf file to xorg.conf.broken and I was able to boot in normally.

I then followed the tutorial to the letter and set up the xorg.conf file correctly and it works like a dream. Some day I may go in and delete the broken file.

Many thanks for the tutorial.


Jchw 11 years ago

This worked fine for me on my Dell D630 laptop and then I tried the same fix on my daughters laptop which is identical to mine. All went well until I rebooted and it came up with the message "failed to start the X server" it then offer to diagnose the problem but that just stated the X.Org X Server was 1.11.3 and to check the wiki x org to make sure I have the latest version.

I am relatively new to this and any advise on how to fix this would be appreciated. I can work the terminal but I am not familiar with the commands and need to copy past to make anything work. I tried booting up in recovery mode but was unable to fix it.

Should I post this on the Mint Forum?


bear 11 years ago

Thanks, worked for me on Mint 32 Bit Maya+Mate.
However my monitor is named "VGA-1" NOT "VGA1" as in this tutorial.
The name can be found by keying xrandr with no parameters.
I also found the xrandr can be used to try out modes like this:-

$cvt 1640 1200 76
(Cut&Paste; from output to do)
$xrandr --newmode "1640x1200_76.00" 212.75 1640 1760 1936 2232 1200 1203 1213 1256 -hsync +vsync
$xrandr --addmode VGA-1 "1640x1200_76.00"
$xrandr --output VGA-1 --mode "1640x1200_76.00"

I have also writen a python script to automate the tutorial procedure and update xorg.conf
If anyone wants it, tell me where,


pavman 11 years ago

Thank you thank you thank you! :)

I noticed my Viewsonic VA902b was not displaying as high as it could go.

I would recommend revising it to have the author update xorg.conf before restarting Xwindows. It was alot easier to put the values in a txt file ahead of time then just use vi !! to grep the values rather than having to type everything in again.

I played around a bit (its 4:3/5:4 monitor), and I added the following odd, but workable, resolutions (as 1600x1200 was just a little off w/ the menu bar being about halfway cutoff):
1504x1200
1568x1176
1584x1194
1600x1200

Now I just need to find ouit how to slightly adjust my fonts and the thing will be golden. Many many thanks again, this made developing w/ eclipse alot more visually friendly :)


Thinker 11 years ago

@hapsis How can you say Hz setting is wrong? Can you please explain further the things/reasons/situations which have made you to think that Hz settings might be wrong.

There are online modeline creating websites also. You can create your modeline online and then can compare with the one created by cvt command and can see whether it was right or not. Here is the link if you want to try: http://www.arachnoid.com/modelines/

Here is the link to original web page of xorg. You can get much more details from here: https://wiki.ubuntu.com/X/Config/Resolution


hapsis 11 years ago

Hi,

I've managed to create modeline also for 1920x1080 but it seems that Hz setting is wrong. Can I manualla force it to make 1920x1080 setup with 50Hz?

Here's what my hardware manuals say about the resolutions:

Sony HDTV:
1920 x 1080 (50Hz LCD HDTV)

Intel Integrated Graphic Driver:
Up to 2048x1566 @ 75 Hz
Supports flat panels up to 1920x1200 @ 60 Hz or
digital CRT/HDTV at 1400x1050 @ 85 Hz


Thinker 11 years ago

@hapsis Modeline syntax is created automatically, its not in our hands as far as I know (Although expers may do this) and it varies from monitor to monitor. Modeline syntax is created automatically by typing cvt command followed by required resolution and in your case, it will be "cvt 1920 1080" without quotes. It will create modeline for 1920x1080 resolution. Don't ever try to modify this modeline to create modeline for 1920x1080 by replacing 1600 by 1920 and 900 by 1080.

I have replied to your comment as I thought you are trying to create modeline for 1920x1080 resolution by replacing 1600 by 1920 and 900 with 1080 in this modeline. If still I am unable to understand your question please elaborate it.


hapsis 11 years ago

Hi,

thanks for this tutorial. I managed to add 1600x900 resolution with my intel integrated media accelerator 3100. Somehow it resetted the setting after one boot and I need to do this again (maybe it was update).

Question: I have Sony HDTV LCD, it native resolution would be 1920 x 1080 => what will be the settings like on this tutorial, what are the "other numbers" on the line? Should it be something like this:

Modeline "1920x1080_60.00" 118.25 1920 1600 1696 1856 2112 1080 900 903 908 934 -hsync +vsync


Or how that Modeline syntax is done? Distro for my Mint is the latest available this date (Mate).

/TS


flerchjj 11 years ago

Thanks. Very useful, although I used gtf to get the modeline since I was originally following another tutorial. Now the resolution on my Macbook Pro is fixed.


flerchjj 11 years ago

FYI, I missed the note "2. In Mint 13 maya, after sudo service mdm stop, Alt + Ctrl + F1 has to be pressed again." and ended up figuring that out on my own. I would suggest reformatting step 3 to make this more obvious.

Suggestion to reformatting:

sudo service lightdm stop (For Mint 12 Lisa users)
or *Note 1
sudo service mdm stop (For Mint 13 Maya users) *Note 2

Note:
1. Use only one of the commands (from sudo service lightdm stop or sudo service mdm stop) according to your distro edition. These are used to kill x server.

2. In Mint 13 maya, after sudo service mdm stop, Alt + Ctrl + F1 has to be pressed again.


Thinker 11 years ago

I forgot to mention that this tutorial is for integrated graphics, not for dedicated one. Dedicated graphics cards have their own control panel. So I am not sure whether this method is appropriate for them or not.


LoneRanger 11 years ago

Didn't work for me in Mint13 KDE I have a full HD 1080p monitor capable of 1920x1080 and my attempts to add that resolution with this method have failed. My attempts to follow this tutorial exactly with the 1600x900 example (within monitor and video card capabilities) have also all failed. I can't get any resolution better than 1360x768 with an EVGA GTX550Ti video card and Viewsonic VX2453mh-LED monitor. I was able to get all the proper resolutions available with Kubuntu 12.04 on the same machine in the past. Might not have be the same nvidia binary driver though, but I can't check it now.


cushion 11 years ago

Thank you very much for a solution which worked perfectly and which was explained such that, if you followed the steps exactly, the desired result was obtained.


linuxnewbie93 11 years ago

Thanks Thinker its frustrating that my LCD tv cuts off some of the screen... The max resolution for my monitor is 1440x900 is there anyway at all to keep the resolution to stop cutting off some of the screen or is the only way to just use resolutions that are default 1024x900.


Thinker 11 years ago

Resolution to be added should be less than because adding resolution which is more than max resolution is just wastage of time and it will not work as monitor cannot display it.
.
As far as your question how much less does it have to be, you should try standard ones. For example if your monitor support Full HD resolution 1920x1080, you can also try 1600x900, 1400x900, 1366x768, 1280x960, 1280x720 etc. For list of commonly used resolutions, visit this link https://en.wikipedia.org/wiki/List_of_common_resolutions
.
If you want some more resolutions which are not standard, you can try them also because experimenting is not bad. But before adding them to xorg.conf, try them in current session by selecting them from display settings after performing steps 1 ahd 2. If it works well, then add it to xorg.conf.
.
One more thing, LCDs can't display each resolution correctly. Don't expect that any resolution you want will be displayed perfectly.


linuxnewbie93 11 years ago

In your note for making the new screen resolution less than the monitor can support, how much less does it have to be because my tv monitor is picky when using different screen resolutions.


Tree 11 years ago

This worked for me in Mint 13 (Mate) except where Thinker uses lightdm
I use mdm, for instance instead of...
sudo service lightdm stop (use) sudo service mdm stop
and instead of sudo start lightdm (use) sudo start mdm
I followed him closely and it worked nicely,

How ever if you find yourself having to get out of console mode
press Ctrl+Alt+F8 at the same time. Your screen will go black for a few seconds (not more than 15) and you will be on your Desktop.


chassum 12 years ago

This looks pretty thorough and could possibly be used to help with other video issues.