18

I keep having trouble getting the correct monitor resolution - every time I reinstall, I happen to use a newer Ubuntu release and the old tricks I used to know no longer work. Instead of leaving a long trail of questions for every new release, I am looking for a more universal and timeless solution.

What's the correct way to set the correct monitor resolution with an Nvidia GPU for a screen that does not send EDID values?

Note: This is a "dummy" question -- with the help from the chat, I already found the answer, and I am now going to add my own answer to document a solution that is hopefully universal.

3 Answers 3

11

Follow these steps.

Note that steps 6 and 7 are not usually necessary; try skipping them and if that does not work, repeat all steps and include these two. Some monitors don't send EDID information to the computer, so Ubuntu can't know what the monitor is capable of and only offers safe (low) resolutions. Those two steps resolve that problem.

  1. Reboot and restart in Recovery Mode.
  2. Type rm /etc/X11/xorg.xonf (Enter)
  3. Type reboot (Enter)
  4. Once you're at the normal Ubuntu desktop again, press Alt + F2 and type terminal (Enter)
  5. In the terminal, type sudo nvidia-xconfig (Enter). This will write a new xorg.conf file.
  6. Press Alt + F2 and type gksu gedit /etc/X11/xorg.conf (Enter).
  7. Look for the part beginning with Section "Monitor"and there enter the correct HorizSync and VertRefresh values. (See How do I look up the hsync/vsync values for my monitor?)
  8. Restart.
  9. Once you're at the normal Ubuntu desktop again, find "Nvidia X Server Settings" in the "start menu" and start that.
  10. In the section X Server Display Configuration, set the desired resolution and press the button Save to X Configuration File.
  11. Reboot.

You should now have the proper resolution!

Finally, copy the file /etc/X11/xorg.conf to a safe place in case you mess it up later and need to restore it.

0
2

Using nVidia settings application

If your computer has the nvidia propietary drivers, you should have nvidia-settings installed and ready.

Command-line method

Run the following command:

nvidia-settings --query FlatpanelNativeResolution

If this returns nothing, or an error, try to look for valid attributes with:

nvidia-settings --query all | grep -i resolution

Then try the first command with one of the found attributes that sounds adequate.

GUI method

  1. Open nvidia-settings, either by looking for its launcher or running it as a command.
  2. In the section tree, go to your GPU.
  3. Now either browse all the items or look for an item which sounds like a device name, in my case I see DFP-0 (AUO).
  4. You will now see under Flatpanel Information a list of resolutions.
3
  • 4
    nvidia-settings --query all returns nothing Jun 25, 2016 at 22:48
  • I didn't find any setting with name resolution, when grep it. @severo-raz
    – 112Legion
    Aug 19, 2020 at 12:12
  • 1
    I found it as CurrentMetaMode Thanks a lot anyway. Attribute 'CurrentMetaMode' (maxpc:0.0): id=50, switchable=no, source=nv-control :: DPY-0: 3840x2160_60_0 @3840x2160 +1920+0 {ViewPortIn=3840x2160, ViewPortOut=3840x2160+0+0}
    – 112Legion
    Aug 19, 2020 at 12:15
0
  • Open nvidia-settings from app menu or thru console.

  • Choose the monitor and set desired resolution and other parameteres:

  • Click "Save to X configuration file". Here I had some difficulties with saving file, despite running nvidia-settings as root and trying to save in places I definitely had right to write.

  • Thus I clicked Show previev... on save window, copied contents and saved in

    /etc/X11/xorg.conf.d/nvidia.conf (you can use any resonable filename in this path)

  • did init 3 and init 5or restart, if you prefere.

  • E voila, desired screen parametres are persistent.

You must log in to answer this question.

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