Ubuntu 18.04: Low screen resolution after Nvidia driver installation

6,015

OK, I solved it. I uninstalled the NVidia drivers and used Nouvea. Had I known that was possible to start with I would have done so as I didn't want any of the NVidia features as such, just dual monitor support.

For anyone interested in the final approach here it is. Please note that these notes are specific to my devices, so you will need to change the names of the devices in the following commands.

In terminal:

  xrandr

This will give you and output which shows all the graphics outputs available and their supported resolutions. You should see that HDMI-1 is connected and supports 2560x1440 resolution. And that DVI-I-1-2 (or similar) is also connected, but only supports 1920x1080 So we need to get DVI-I-1-2 to also support 2560x1440

To do this we need to use xrandr to add another profile for the 2560x1440 resolution and then apply that to DVI-I-1-2. Again in terminal:

  cvt 2560 1440 60

This will get you the "modeline" that you need to use to do this.

Currently that line is:

"2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync

Construct the following from that to add the new mode:

  xrandr --newmode "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync

And then add the mode to DVI-I-2

  xrandr --addmode DVI-I-2 2560x1440_60.00

You should now be able to go to your NORMAL display settings and select the higher resolution for each monitor.

However, this won't persist between user sessions, so you need to resolve that.

Create an .xprofile file which will be executed automatically every time Ubuntu boots (check if it exists before doing this). And set it to have execute permissions:

  touch $HOME/.xprofile
  chmod +x $HOME/.xprofile

Copy and paste the two lines from above into that file:

xrandr --newmode "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
xrandr --addmode DVI-I-2 2560x1440_60.00

You will now have the full resolution on both monitors on re-boot.

Share:
6,015
Doug
Author by

Doug

Updated on September 18, 2022

Comments

  • Doug
    Doug over 1 year

    Ubuntu 18.04

    GeForce GT 630

    Max resolution for actual monitors "Resolution (max.): 2560x1440‎"

    Dual monitor set-up.

    Problem: After installing NVidia drivers everything is much bigger as if the screen resolution is lower.

    Desired: The display to be as it was under Nouveau, but with dual monitor support.

    Steps to this point:

    • Installed card in machine
    • Booted
    • Had very vertically thin display but going over two monitors
    • Checked required drivers in terminal with ubuntu-drivers devices

    enter image description here

    • Recommended driver was nvidia-driver-390 - distro non-free recommended
    • Opened "Software and updates" app and went to "Additional drivers" section. The "nvidia-driver-390" was listed, so I selected it and clicked "Apply changes". Driver downloaded.

    enter image description here

    • Rebooted
    • Display now at lower resolution with everything a lot bigger than before.

    To address this I:

    • Checked the NVidia X Server settings to verify that the resolution is set to 1920x1080 (which is is).
    • Checked the "Screen display" settings in Ubuntu Settings to check the "Resolution" is also set to 1920x1080 (which is is) and that scale is at 100% (which it is, and the only other option is 200% which makes things even bigger)
    • Generated a /etc/X11/xorg.conf file and tried adding an option under the "Monitor" Option "DPI" "96x96" per google searches. No change on reboot.
    • Tried the "Save to X Configuration file" option in NVidia X Server settings and applied the Option "DPI" "96x96" setting again in case NVidia was looking in the wrong place. No change on reboot.

    Here is the xorg.conf contents:

    # nvidia-xconfig: X configuration file generated by nvidia-xconfig
    # nvidia-xconfig:  version 390.132  (buildmeister@swio-display-x64-rhel04-14)  Fri Nov  1 05:15:46 PDT 2019
    
    # nvidia-settings: X configuration file generated by nvidia-settings
    # nvidia-settings:  version 440.64
    
    Section "ServerLayout"
        Identifier     "Layout0"
        Screen      0  "Screen0" 0 0
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Mouse0" "CorePointer"
        Option         "Xinerama" "0"
    EndSection
    
    Section "Files"
    EndSection
    
    Section "Module"
        Load           "dbe"
        Load           "extmod"
        Load           "type1"
        Load           "freetype"
        Load           "glx"
    EndSection
    
    Section "InputDevice"
    
        # generated from default
        Identifier     "Mouse0"
        Driver         "mouse"
        Option         "Protocol" "auto"
        Option         "Device" "/dev/psaux"
        Option         "Emulate3Buttons" "no"
        Option         "ZAxisMapping" "4 5"
    EndSection
    
    Section "InputDevice"
    
        # generated from default
        Identifier     "Keyboard0"
        Driver         "kbd"
    EndSection
    
    Section "Monitor"
    
        # HorizSync source: edid, VertRefresh source: edid
        Identifier     "Monitor0"
        VendorName     "Unknown"
        ModelName      "BenQ EW3270ZL"
        HorizSync       30.0 - 89.0
        VertRefresh     50.0 - 76.0
        Option         "DPMS"
        Option         "DPI" "96x96"
    EndSection
    
    Section "Device"
        Identifier     "Device0"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BoardName      "GeForce GT 630"
    EndSection
    
    Section "Screen"
        Identifier     "Screen0"
        Device         "Device0"
        Monitor        "Monitor0"
        DefaultDepth    24
        Option         "Stereo" "0"
        Option         "nvidiaXineramaInfoOrder" "DFP-0"
        Option         "metamodes" "DVI-I-2: nvidia-auto-select +0+0, DVI-I-3: nvidia-auto-select +1920+0"
        Option         "SLI" "Off"
        Option         "MultiGPU" "Off"
        Option         "BaseMosaic" "off"
        Option         "UseEdidDpi" "False"
        SubSection     "Display"
            Depth       24
        EndSubSection
    EndSection
    
    

    What do I do please? Thank you.

    UPDATE:

    Still no progress, but also tried the following / some extra info.

    The NVidia card has two DVI outputs. The monitors takes HDMI, so I am using a converter cable from DVI to HDMI on each monitor. Not sure if that impacts the resolution detection.

    Tried adding a custom resolution to xrandr based on the highest supported resolution of the monitors (known to work when running via the HDMI on the motherboard)

    xrandr to check supported resolutions gives

    Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 16384 x 16384
    DVI-I-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 709mm x 399mm
       1920x1080     60.00*+  59.94    50.00    60.05    60.00    50.04  
       1680x1050     59.95  
       1600x900      60.00  
       1280x1024     75.02    60.02  
       1280x800      59.81  
       1280x720      60.00    59.94    50.00  
       1024x768      75.03    60.00  
       800x600       75.00    60.32  
       720x576       50.00  
       720x480       59.94  
       640x480       75.00    59.94    59.93  
    DVI-I-1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 709mm x 399mm
       1920x1080     60.00*+  59.94    50.00    60.05    60.00    50.04  
       1680x1050     59.95  
       1600x900      60.00  
       1280x1024     75.02    60.02  
       1280x800      59.81  
       1280x720      60.00    59.94    50.00  
       1024x768      75.03    60.00  
       800x600       75.00    60.32  
       720x576       50.00  
       720x480       59.94  
       640x480       75.00    59.94    59.93  
    HDMI-0 disconnected (normal left inverted right x axis y axis)
    

    Get the ModeLine for the known max supported resolution for the monitor:

    cvt 2560 1440 60
    

    gives...

    # 2560x1440 59.96 Hz (CVT 3.69M9) hsync: 89.52 kHz; pclk: 312.25 MHz
    Modeline "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
    

    Add a new resolution to xrandr:

    xrandr --newmode "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
    

    Then doing xrandr again to see what happened I get:

    Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 16384 x 16384
    DVI-I-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 709mm x 399mm
       1920x1080     60.00*+  59.94    50.00    60.05    60.00    50.04  
       1680x1050     59.95  
       1600x900      60.00  
       1280x1024     75.02    60.02  
       1280x800      59.81  
       1280x720      60.00    59.94    50.00  
       1024x768      75.03    60.00  
       800x600       75.00    60.32  
       720x576       50.00  
       720x480       59.94  
       640x480       75.00    59.94    59.93  
    DVI-I-1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 709mm x 399mm
       1920x1080     60.00*+  59.94    50.00    60.05    60.00    50.04  
       1680x1050     59.95  
       1600x900      60.00  
       1280x1024     75.02    60.02  
       1280x800      59.81  
       1280x720      60.00    59.94    50.00  
       1024x768      75.03    60.00  
       800x600       75.00    60.32  
       720x576       50.00  
       720x480       59.94  
       640x480       75.00    59.94    59.93  
    HDMI-0 disconnected (normal left inverted right x axis y axis)
      2560x1440_60.00 (0x2be) 312.250MHz -HSync +VSync
            h: width  2560 start 2752 end 3024 total 3488 skew    0 clock  89.52KHz
            v: height 1440 start 1443 end 1448 total 1493           clock  59.96Hz
    

    I note that the xrandr has added the custom resolution to HDMI-0 and not affected DVI-I-0 or DVI-I-1. I believe this to be because xrandr has no impact on NVidia cards?

    So then I looked again at the Xorg setting. The "NVidia X Server Settings" tool does seem to save out to the /etc/X11/xorg.conf file. I assume therefore that it is indeed taking settings from this file. I followed this post to add the ModeLine to the monitor section and then reference it from the Screen section of the Xorg.conf file.

    This had no impact either.

    So ideas are still very much welcome please :)

    • Parsa Mousavi
      Parsa Mousavi almost 4 years
      What if you eject the second monitor , reboot and then re-plug it ?
    • Doug
      Doug almost 4 years
      I am not sure what you mean by "eject" in this context. However, I did just try shutting down, unplugging the second monitor, rebooting. Shutting down, plugging the second monitor back in and rebooting again. No change, unfortunately. Thank you though.
    • Parsa Mousavi
      Parsa Mousavi almost 4 years
      I mean boot with one monitor and plug the second one when you've logged in to see if it gets solved . Don't reboot with two monitors.
    • Doug
      Doug almost 4 years
      Thanks for the clarification. I just tried this and unfortunately no, this didn't work. It just turns the monitor on and shows it in the Nvidia settings. I checked and that max resolution supported on the actual monitor is "Resolution (max.): 2560x1440‎".