Sunday, September 12, 2010

How to Add and Set Custom Display Resolutions using xrandr Command on ubuntu 10.04 (lucid lynx) Linux

You can change your monitor's display resolution from system->preferences->monitors,but in some cases Linux fails to detect the proper resolutions for your monitor,in such situations we can add and set custom resolutions with a little effort by using xrandr command.

As it is said in the man pages:

     “ Xrandr  is  used  to set the size, orientation and/or reflection of the
        outputs for a screen. It can also set the screen size.

        If invoked without any option, it will dump the state of  the  outputs,
        showing  the existing modes for each of them, with a '+' after the pre‐
        ferred mode and a '*' after the current mode.......”

Here is the output of my terminal window when I issued the xrandr with -q option:

sunny@usmanriaz-desktop:~$ xrandr -q


Screen 0: minimum 320 x 200, current 1280 x 768, maximum 4096 x 4096
VGA connected 1280x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1360x768       59.8 
   1152x864       60.0 
   1024x768       60.0 
   800x600        60.3 
   640x480        59.9 
   1280x768_60.00   59.5*

To add a new mode xrandr provides us '--newmode' and '--addmode' options which are used to create and associate modes for the perticular display respectively.

--newmode option also requires a mode line .For example if you want to add a resolution 1280x800
the mode line will be:

"1280x800_60.00"   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync

I have calculated the above mode line using  cvt  (VESA Coordinated Video Timing)  utility by issuing the following command:
sunny@usmanriaz-desktop:~$ cvt 1280 800
(note: replace 1280 800 with your required resolution)

# 1280x800 59.81 Hz (CVT 1.02MA) hsync: 49.70 kHz; pclk: 83.50 MHz
Modeline "1280x800_60.00"   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync

Now we have the mode line next step is to use this mode line with --newmode option as follows:

sunny@usmanriaz-desktop:~$ xrandr --newmode "1280x800_60.00"   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync

After the above command your mode will be listed in the xrandr -q output take a look at this output:

# xrandr -q

   1360x768       59.8 
   1152x864       60.0 
   1024x768       60.0 
   800x600        60.3 
   640x480        59.9 
   1280x768_60.00   59.5*
   1280x800_60.00 (0x123)   83.0MHz
        h: width  1280 start 1352 end 1480 total 1680 skew    0 clock   49.4KHz
        v: height  800 start  803 end  809 total  831           clock   59.5Hz

Now I am going to associate this mode with VGA(current connected display name) it can be different on your machine.

sunny@usmanriaz-desktop:~$ xrandr --addmode VGA 1280x800_60.00

To set this custom mode on your display just type the following command:

# xrandr --output VGA --mode 1280x800_60.00


The Last Thing :

Though by following above steps we can change the resolution but these changes will  not be permanent , your old resolution will be restored when you reboot your system.

To make these changes permanent type in the following command in your terminal :
# sudo vim  /etc/gdm/Init/Default

and put the following commands before the Line Number 11 as shown in figure:

# xrandr --newmode "1280x800_60.00"   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync

#xrandr --addmode VGA 1280x800_60.00

# xrandr --output VGA --mode 1280x800_60.00

Please write me your comments and correct me on my mistakes ..!


  1. Replies

    1. windows 7 sp1 ultimate 64 bit product key , windows 7 key code , window 7 product key , keygen windows 7 ultimate product key , office 2016 product serial free , key to windows 7 home premium , buy windows 10 product key , free genuine windows 7 professional upgrade key , lJaOkr

      office project 2013 keys

      windows 7 ultimate sp1

      windows 10 pro key

      windows 10 pro key free

  2. When I try to use xrandr --addmode HDMI-0 1176x664_60.00 i get an error!

    This is the output error:
    X Error of failed request: BadMatch (invalid parameter attributes)
    Major opcode of failed request: 140 (RANDR)
    Minor opcode of failed request: 18 (RRAddOutputMode)
    Serial number of failed request: 29
    Current serial number in output stream: 30

    What should I do to fix it?

  3. You should put a # before xrandr to force add it.

  4. And if you have mint 14 it is sudo cat /usr/share/alsa/init/default

  5. We create websites for customers large and small with innovative designs, visual impact and bespoke levels of functionality.Webbitez are a friendly UK based company with the in-house skills mix to create websites and associated marketing materials. Our core skills include marketing experience, design, professional photography plus coding expertise and programming capabilities. Web Design Belfast Northern Ireland | SEO Belfast Northern Ireland | Logo Design Northern Ireland UK | Hosting Services Northern Ireland UK | Ecommerce Sites Belfast Northern Ireland |

  6. All service providers problems solved with fast, accurate, with a simple phone contact number for all your favourite Websites. Having difficulties with a social network site? Or need help or advice with any social networking issues and cant find a providers telephone contact number? Direct Contact Numbers will cut out all the relentless searching for telephone numbers online. Facebook Helpline Contact Number | Amazon Helpline Contact Number | Gmail Helpline Contact Number | Google Helpline Contact Number | Twitter Helpline Contact Number |

  7. On firing xrandr --output ... , my screen went black and I had to hard boot ...

  8. Thank you for sharing valuable information. Nice post. I enjoyed reading this post. The whole blog is very nice found some good stuff and good information here Thanks..Also visit my page.seo services Our team always avoid generic web designing because we know from experience that every business is unique in its approach and every industry operates under different dynamics.

  9. Acetech has many years of experience in custom software development. Find out more about custom software development at

  10. Thanks For Your valuable posting, it was very informative. Am working in Erp Software Company In India

  11. Thanks For Your valuable posting, it was very informative. ADC developing custom websites

  12. Your blog giving me nice feedback. This is very effective blog for help me. Please post more related blogs. Thank you for this support.

    Visit :- Bespoke Software Development

  13. email blast to tenants

    Special event parking software
    Software is used generally by people who are professionals in handling technology such as computers and other modern technology. Technology today is common to all and everyone is not denying that fact. It is not only used for better communication but in almost anything to make people’s lives easy. Among these is in parking, especially in high-volume events.
    With new software in organizing, tracking and monitoring an event’s parking, you no longer need to worry about bringing your own vehicle. This is due to automated management of parking spaces with the use of software. Parking spaces, whether big or small are needed for car owners because they strive to park in their convenient time. Certain establishments own large parking spaces but different problem occurs because of the possibility of endless car owners bringing their own cars in certain places. This software serves enforcement to all car owners who wanted to access in an event is called the special event parking software. This software expertly provides high and dignified solution between customers who are in the state of parking crisis when they are in an event. It listens and provides a unified solution every time the customers requested it. They can easily install or get the software immediately in which the parking management should uphold the excellence with the customer. Considering special events, the software is needed to sustain manageable parking spaces between customers.
    A tracking device is installed on special event parking software that is used to command or coordinate with the parking spaces when certain events or occasions happen. If a problem occurs in an event, it results to poor and unorganized event organizer which causes for them to shut down software or postponed said events. Following this, others will be tempted to visit or enjoy to different events. Occasionally, hotels, restaurants and other establishments offer to organize events or parties in their parking spaces which different kind of personalities are frequently joining. In the event, the parking space of the said establishments has big parking space for the event. It is not a problem but how about the small establishments, who organize a party but contains small space, special event parking software is ready to help.
    Events are operated by agencies or organizers which they wanted to support and provide their customers with worthwhile and great parking space. Their main goal is to gain a successful and perfect event in that parking spaces they choose. The positive impression of special event parking software is to provide their customers how to make parking management successful. Supervising parking space to make it more conducive for organizing or hosting special events is very difficult but maintaining parking spaces is a different idea. In maintaining such one, special event parking software is taking the action providing harmonious and efficient positive results at the end. Different procedures should be followed and must be taking into consideration the various strategies on how to make smaller parking spaces become bigger. Site: www.webparkingsoftware.comm

  14. Excellent information!
    I read this blog. I like this. It shares nice and interesting ideas about on this topic.
    Custom Displays

  15. It is truly amazing. Rich in information and also most up-to-date info on web page design.Phone System

  16. Dean Infotech one of the top Custom Ecommerce Development India, web designing, mobile app development, digital marketing, SEO and SMO Company in India.

  17. A smallish campaign with a homemade list would not be likely to yield much of a result. To achieve anything worthwhile, a much more aggressive effort is needed. Then, the age-old value analysis applies: projected earnings = margin on total projected sales - cost of campaign.

  18. windows 10 product key surface 3 , get product key for windows multipoint server 2010 , vmware workstation 11 to buy , windows 10 product key crack , windows 10 serial keys for installation , windows 10 enterprise key , microsoft office 2007 professional genuine product key free , windows 10 product key for sale , tizGDa

    office 2016 product serial free

    windows 10 enterprise key

    office 2016 product key

    Windows 10 product key code sale

  19. Some of the information related to Linux was great. Thanks for sharing it
    seo company in London
    Web Design Agency in London

  20. Your post is just outstanding! thanx for such a post,its really going great and great work.You have provided great knowledge about the Ecommerce Website Design | Web Development Company Delhi

    Best regards,

  21. The blog was absolutely fantastic! Lot of great information which can be helpful in some or the other way. Keep updating the blog, looking forward for more contents...Great job, keep it up..Bangalore Web Design Companies | Web Designers Bangalore

  22. Thank you for your nice post.It is really nice. I'm working in Brave Technologies Private Limited.ERP Software company in chennai For more details Call: +044 4283 5587.

  23. BRAVE TECHNOLOGIES is a leading software company offering best quality cost effective software applications and end to end enterprise solutions. We are experts in Mobile App development on both platforms – Android & iOS. We consume less time to understand our client’s business requirements and concentrate purely on customer and end-user satisfaction by giving best solutions that facilitate companies to suit their varying business needs.

  24. Have you had any issues with your company's current software? If you're struggling to find the best offer, click here to find out more about the benefits of Microsoft Dynamics software. I got it for my fairly large business and for this price it is great. Cheers

  25. There are many software out there but Activity management software & performance monitoring software are in high demand since it helps a lot in tracking the regular activities of the employees. Visit here


  26. The website is looking bit flashy and it catches the visitors eyes. A design is pretty simple and a good user-friendly


    Programmierung in Lüdenscheid


Follow me

Join me on the New Digg Follow ur_sunny on Twitter
There was an error in this gadget