2

I just got a new nvidia graphics card that works fine at 1440x900 under window (dual boot setup). Unfortunately, my monitor is not recognized by ubuntu. Here is my xrandr -q output

Screen 0: minimum 8 x 8, current 1360 x 768, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DVI-D-0 connected primary 1360x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768       60.0 +
1360x768       60.0*    59.8  
1152x864       60.0  
800x600        72.2     60.3     56.2  
680x384        60.0     59.8  
640x480        59.9  
512x384        60.0  
400x300        72.2  
320x240        60.1  
1440x900_60.00 (0x1e7)  106.5MHz
   h: width  1440 start 1528 end 1672 total 1904 skew    0 clock   55.9KHz
    v: height  900 start  903 end  909 total  934           clock   59.9Hz

I manage to add the desired resolution (1440x900) but when I do

xrandr --output DVI-D-0 --mode 1440x900_60.00

I get

xrandr: cannot find mode 1440x900_60.00
2
  • you need to use "--addmode" not output:-) also check your drivers if the one you installed are the correct one, when they are correct the system usually detecs in auto the resolution.
    – ostendali
    Jan 4, 2016 at 17:10
  • I did it in the previous steps but didn't copied the code here for clarity's sake.
    – frepie
    Jan 5, 2016 at 22:06

2 Answers 2

3

Ok Mystery is over: I changed my DVI cable to a vga cable with a vga to DVI adapter and suddenly, Ubuntu is able to recognize my monitor and set the correct resolution. Maybe this is that way because my monitor is pretty old. This is in no way a correct answer to the larger problem i.e. the inability to set the correct resolution through xrandr but I will live with it.

1
  • Do the same with a DVI<->HDMI adapter. It works !
    – Guillaume
    Oct 30, 2018 at 10:50
1

You need to create a new mode and apply it.

The commands to be executed in order:

cvt 1440 900
xrandr --newmode "1440x900_60" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

The part of the line after xrandr --newmode is similar to the ouput you should get when using the cvt command, so copy the output from the "resolution_refreshRate" ("1440x900_60" here) point to the +vsync point and add it to xrandr --newmode.

Then:

xrandr --addmode LVDS1 resolution_refreshRate (don't use speechmarks)
xrandr --output LVDS1 --mode resolution_refreshRate

If you want to make the changes permanent:

  • Create a bash script, xrandr.sh for example, and place your xrandr commands into it:

    #!/bin/bash
    sudo xrandr --newmode ""1440x900_60"" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
    sudo xrandr --addmode LVDS1 1440x900_60
    xrandr --output LVDS1 --mode 1440x900_60

  • Make the script executable with chmod +x xrandr.sh

  • Search for "Startup Applications" in the dash, run it, and add the script as a startup application.

The commands will now run every time you log into your account.

Note: I'm using LVDS1 as the supposed monitor name, but yours probably won't be the same. You can find your monitor name using:

xrandr | grep " connected " | awk '{ print$1 }'

All the above can be done for you with this program - including the startup script.

10
  • Thank you I will try resolutionX. Link for resolutionX should be sourceforge.net/projects/resolutionx/?source=directory
    – frepie
    Jan 4, 2016 at 17:07
  • sorry, edited my answer to make it neat =) But yeah, that's the one
    – TellMeWhy
    Jan 4, 2016 at 17:09
  • 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: 39 (see following message for remainder)
    – frepie
    Jan 4, 2016 at 17:27
  • Current serial number in output stream: 40 xrandr: cannot find mode 1440x900_60.00 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: 39 Current serial number in output stream: 40 xrandr: cannot find mode 1440x900_60.00 file exists, choose another name `
    – frepie
    Jan 4, 2016 at 17:28
  • 1
    I have another computer, with the same ubuntu version, also with an nvidia card, that use to have the same monitor connected. The monitor was properly recognized and the native resolution was available.
    – frepie
    Jan 5, 2016 at 18:10

You must log in to answer this question.

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