14

I just installed ubuntu 13.04 x64 My resolution is 800x600 and there is no other option. I tried to install the nvidia driver 313 but still nothing. I tried doing this http://www.howopensource.com/2012/10/install-nvidia-geforce-driver-in-ubuntu-12-10-12-04-using-ppa/

still no luck, thank you

1 Answer 1

20

(1) Get Modeline for your desired resolution

Use cvt. Here is an example for 1280x1024 resolution. Note that the third parameter (frequency) is optional. If your owner's manual specifies a refresh rate frequency, you may use that as input to cvt, or you can just leave it blank to keep things simple.

$ cvt 1280 1024 60

The output will look something like this.

# 1280x1024 60.03 Hz (CVT) hsync: 63.81 kHz; pclk: 109.25 MHz
Modeline "1280x1024_60"  109.25  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync

(2) Create a new xrandr modeline

Use the Modeline output from cvt to create a new mode for xrandr.

$ xrandr --newmode "1280x1024_60"  109.25  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync

(3) Determine which display we need to modify

After running the following command, notice that VGA1 is the currently connected display, in this example,so we will use it in step number 4, below.

$ xrandr
Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 32767 x 32767
VGA1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1280x1024_60.00   59.9 +
   1024x768       60.0  
   800x600        60.3     56.2  
   848x480        60.0  
   640x480        59.9  
   1280x1024_60   60.0* 
DVI1 disconnected (normal left inverted right x axis y axis)
TV1 disconnected (normal left inverted right x axis y axis)

(4) Create a new xrandr mode

Use the display name from step 3. Use the mode name from step number 2, but leave out the quotes.

$ xrandr --addmode VGA1 1280x1024_60

(5) Change the screen resolution

Specify the display name and the mode name

$ xrandr --output VGA1 --mode 1280x1024_60

(6) Get the monitor to automatically adjust

If the monitor has an "Auto Adjust" button, press it to automatically center and scale the output. Otherwise, use the manual buttons on your monitor to do this.

(7) Create an xorg.conf file

If you like the resolution settings, you can make them permanent by specifying this information in an xorg.conf file.

Put the modeline from step 1 into the "Monitor" section. You may replace "My Monitor" with a descriptive name for your monitor, as long as you use the same name in the "Screen" section.

Note that the "Device" section is used to specify your graphics card/chip and the driver you are using; Identifier may be any name you chose, as long as you use the same name in the "Screen" section. But you must use the correct driver name for your graphics card/chip on the Driver line. You can use $ lshw -c video | grep configuration to get your graphics driver name.

Although I have not tested this, it may be possible to exclude the "Device" section, as long as you also delete the corresponding Device line in the "Screen" section.

$ sudo gedit /etc/X11/xorg.conf

Enter information into the file, save, and exit. Here is an example using the 1280x1024 modeline from above and an intel graphics driver.

Section "Monitor"
    Identifier  "My Monitor"
    Modeline    "1280x1024_60"  109.25  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
    Option      "PreferredMode" "1280x1024_60"
EndSection

Section "Device"
    Identifier  "Intel"
    Driver      "intel"
EndSection

Section "Screen"
    Identifier "Default Screen"
    Monitor     "My Monitor"
    Device      "Intel"
    Defaultdepth 24
    SubSection  "Display"
        Modes   "1280x1024_60"
    EndSubSection
EndSection

Section "ServerLayout"
    Identifier  "Default Layout"
    Screen      "Default Screen"
EndSection

If something goes wrong, you can boot into recovery mode and edit or delete /etc/X11/xorg.conf.

Finally, you can take a look at Ubuntu Wiki Resolution for more information.

6
  • I'm really surprised that 1920x1080 isn't provided in the defaults..
    – kodybrown
    May 15, 2016 at 22:56
  • Just a little info: Usually Ubuntu should be able to detect the right resolution for your monitor. If you desire a resolution higher than what Ubuntu gives you, it may be that your video cable or graphic card is not capable of serving it. E.g. I wanted 2560x1440p but my cable was only able to serve 2048x1152p. Changing xorg didn't help,
    – Rotareti
    Sep 7, 2016 at 21:01
  • This may be out of date. I do not have an /etc/X11/xorg.conf.
    – gerrit
    Jan 30, 2017 at 0:03
  • 1
    Yes. Ubuntu stopped shipping with an xorg.conf file. I beleive you can still create one to set your resolution, as long as your hardware supports the resolution you want. Take a look at askubuntu.com/questions/4662/…
    – Enterprise
    Jan 30, 2017 at 3:23
  • 1
    @gerrit this is not outdated, you first need to run sudo nvidia-xconfig to generate the xorg.conf file.
    – markroxor
    Dec 18, 2017 at 5:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .