How to Adjust screen resolution on Ubuntu

Sponsored Link
If you set a resolution inappropriate for your monitor in the Screen Resolution GUI tool, you can reset it by running rm ~/.config/monitors.xml from a terminal.
Dynamically testing different resolutions

You can either use the Screen Resolution GUI tool to experiment with different resolutions, or the more powerful xrandr command-line tool this shows you the names of different outputs available on your system (LVDS, VGA-0, etc.) and resolutions available on each.



You can direct xrandr to set a different resolution using the following command

xrandr --output VGA --mode 1024×768 --rate 75

Add undetected resolutions

Due to buggy hardware or drivers, your monitor's correct resolutions may not always be detected

If the mode already exists, but just isn't associated for the particular output using the following command

xrandr --addmode VGA 1024×768

Note:-These changes you make using xrandr only last through the current session.

Set xrandr changes persistently

There are several ways to make xrandr customizations permanent from session to session:

a) .xprofile

A user's ~/.xprofile file is executed on Xorg startup if it exists and is executable. You can copy and paste xrandr command line strings into this file so they're executed when you log in

b) kdm/gdm

Both KDM and GDM have startup scripts that are executed when X is initiated. For GDM, these are in /etc/gdm/, while for KDM this is done at /etc/kde4/kdm/Xsetup. In either case, you can paste in an xrandr command line string into one of these scripts.

This process requires root access and mucking around in system config files, but will take effect earlier in the startup process than using .xprofile, and will apply to all users including the login screen.

c) xorg.conf

See man xorg.conf for full details on how to use an xorg.conf file.Check man page from here

Sponsored Link

You may also like...

19 Responses

  1. jcai says:

    I still use system->manage

  2. Gary says:

    Remember if you have an nvidia card setup its best to use nvidia-settings to manage your screen(s)…

  3. jj says:

    Nice granular control for displaying laptop pictures on a TV or other screen.

  4. jj says:

    Correct me if I am wrong but this tool is primarily for open source drivers: If using proprietary drivers from Intel, nVidia or ATI/AMD you would be wise to use their tool.

    Will it control proprietary drivers?

  5. xrandr seems to show not more than was recognised during installation of the system. I made myself an USB stick with Knoppix 6.0 (also Debian!) and discovered a new world of screen resolutions possible on my hardware (it is one of the mainboards with integrated graphics chip, giving ubuntu a tough time recognising it). Since xorg.conf seems to do less and less of the settings, I had only limited success in copying screen information from Knoppix to ubuntu. On startup I have to click through 3 error windows until the desired 1600×1200 resulution is started as “low resolution graphics”.
    It is not annoying but I feel for telling this to the world.

  6. woet says:

    found out that xrandr shows the same as System->adjustments->screen resolution.
    I have problems with motherboards with integrated video card. Xorg does not recognise most of them to be useful.
    I got myself a Knoppix 6 usb stick which obviously does a better job. The xorg.conf file I copied from the stick to ubuntu /etc/X11
    This works – mostly, some older CRT monitors loose over time their ability to run at high resolution (even if specified) and automagically switch back to something lower. I did not find a way to refurbish them, even if higher resolution is forced, an annoying flicker is the result.
    Knoppix is something very usefull, more than one time it helped me out in repairing ubuntu, I find it more versatile than the “repair booting” of the ubuntu install CD.

  7. woet says:

    I forgot to mention that in Knoppix the monitor ia always running in highest possible resolution, without flickering and over hours. Just when back in ubuntu I get this auto-setback and/or flicker. No idea why.

  8. sakre says:

    how do you install a SiS driver? i think mine is not supported by ubuntu 8.04?

  9. woet says:

    I have mainboard with Athlon 64bit 3000+ (but running 32 bit ubuntu). Systemspeed 4.70 (DOS)program unveils SiS chipset with 86C202 graphics accelerator on board. I did as above start with Knoppix 6.0.1 on stick, copy the Knoppix xorg.conf to ubuntu file system and restart. Result is not satisfying however, I am not able to get max. resolution in ubuntu (8.10) though Knoppix runs fine at it. Hope that 9.04 will solve the problem when upgrading.

  10. Ram Sambamurthy says:

    Thanks for the xrandr command, but there’s a mistake in the depiction of the command. There is no space between the double dashes and the command.
    For example, the first command above should read:
    xrandr --output VGA --mode 1024×768 --rate 75

  11. Paul B. says:

    Regarding aging CRT monitors, perhaps a word on *maintenance* is in order!

    Over time the CRT – and to some extent, the high voltage circuits – age. This is not necessarily the end however. Servicing requires two things, a bit of intuition regarding how to pry open the case after removal of the screws, and unless you have a proper servicing stand, a second person to hold the thing whilst it is adjusted. Yes, the insides *are* dangerous but with due precautions, workable.

    Tracking the high voltage lead from the “Ultor” connector on the tube to the tripler assembly, it will be found to have two adjustments on it. One is FOCUS and adjustment will allow the original screen resolution to be restored. The other is SCREEN and can often be adjusted to restore lost screen brightness. It also affects the focus, so FOCUS is the last to be adjusted.

    Need I say, these are adjusted with a long blade, well insulated (which refers more to the amount of plastic in the handle, than having an insulated shaft) “blade” screwdriver of the correct calibre for the adjusters (about 3 to 4 mm wide). Obviously you have to have text on the screen and be able to see the screen, and you have to allow the display to warm up for 5 minutes first. The final task is to reassemble the monitor and not have any parts sticking out or pieces left over.

    There is however no “automagically switching back to something lower” in a CRT monitor – the monitor only “knows” its specified (maximum) resolution, it has no awareness of losing focus. And aliasing is an analog process (unlike CRT monitors, some of which make a terrible job of it).

  12. Mel says:

    Will this work on Maverick? I installed Ubuntu 10.10 on a friends computer (a very old compaq) his monitor defaults to 800×600 resolution and I know it can display 1024×768 which is the real resolution.

    He’s monitor is a Compaq 5017. I’ve seen numerous potential fixes but are way too old. Ubuntu doesn’t use a xorg.conf file anymore.

  13. Eric says:

    Sweet, thanks. This has been bugging me on an Ubuntu VM for awhile now. The 800×600 login screen on a 30″ monitor looks downright comical.

  14. rais yousaf says:

    I have a solution for those who have problems with the screen resolution and have a nvidia graphics card.
    step 1 GOTO system >> preferences >> appearance

    step 2 click visual effect tab

    step 3 click on extra or normal effects

    step 4 it should search for nvidia graphics card just update it to the recommended one and viola you have your screen resolution adjusted to you monitors
    rais yousaf :)))

  15. Graham Tapper says:

    I have only had a problem with screen resolution with the latest Ubuntu release – 10.10. Previously Ubuntu automatically expanded the screen resolution to fit the window size, right up to the maximum 1680×1050 fullscreen. Now it will only show 4:3 screen resolutions. Why the backwards step? Any suggestions? I’m using the latest 4.0.4 VirtualBox, with it’s guest additions.

  16. Graham Tapper says:

    Just an update for anyone interested. I have discovered the problem. It appears that amongst the latest set of Ubuntu updates there must have been one which buggered the VirtualBox Guest Additions extensions. I ran the Guest Additions again and now everything is working again. I did notice that one of the updates was to apply the latest Linux kernel. It could well be that that did it. Anyway, if you’re having problems, it’s worth a try.

  17. realzippy says:

    I commented 2 weeks ago that you should
    correct the x in the code of this page,because it is simply wrong and does not work.
    For some reason you decided to ignore this.
    Meanwhile I saw that also Ubuntu Wiki
    warns about your HowTo due to the wrong x in thje code you are using:

    “Important Note Be careful with your X if you copy from a website like what you see below otherwise you will get this nice message. xrandr: cannot find mode 1024×768
    This website uses some kind of mini x which does not work.”

  18. Mark says:

    You can have xrandr run at login without hacking config files. In Home/.config/autostart add a file called xrandr.desktop. In that file place:

    [Desktop Entry]
    Name=Load Xrandr scipt
    Comment[en_US]=Load Xrandr
    Comment=Load Xrandr

    My shell script looks like:

    # add HD LCD resolution

    xrandr –newmode “1360x768_60.00” 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync
    xrandr –addmode VGA1 1360x768_60.00
    xrandr –output VGA1 –mode 1360x768_60.00

  19. Michael says:

    Why i cannot find a 1920×1080 resolution.Any way of fixe in it?

Leave a Reply

Your email address will not be published. Required fields are marked *