GeForce GTX 1060 GPU with Nvidia-driver-525 Resolutions Problem

System: Ubuntu-Mate 20.04, ;Samsung 40” TV, native resolution 3840 x 2160 HDMI 2.0; GTX 1060, HDMI 2.0; cable “high speed”.

Ubuntu will not display 2560 x 1600 or 2560 x 1440 pixels on my TV monitor with Nvidia “nvidia-driver 525-distro non-free recommended” installed. Software & Updates show this to be the correct driver to install. I need to be able to switch between resolutions 3840 x 2160 and 2560 x 1600.

xrandr shows the resolutions are not available. some other diagnostics:

mark@senior:~$ sudo lshw -c video
sudo password for mark:
*-display
description: VGA compatible controller
product: GP106 [GeForce GTX 1060 6GB]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
configuration: driver=nvidia latency=0
resources: irq:136 memory:de000000-deffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:c0000-dffff

mark@senior:~$ sudo ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001C03sv00003842sd00006267bc03sc00i00
vendor : NVIDIA Corporation
model : GP106 [GeForce GTX 1060 6GB]
driver : nvidia-driver-515 - distro non-free
driver : nvidia-driver-525 - distro non-free recommended
driver : nvidia-driver-515-server - distro non-free
driver : nvidia-driver-525-server - distro non-free
driver : nvidia-driver-418-server - distro non-free
driver : nvidia-driver-390 - distro non-free
driver : nvidia-driver-470-server - distro non-free
driver : nvidia-driver-470 - distro non-free
driver : nvidia-driver-450-server - distro non-free
driver : nvidia-driver-510 - distro non-free
driver : xserver-xorg-video-nouveau - distro free builtin

When I boot to Win10 or Win7 on the same PC, the 2560 x 1600 or 2560 x 1440 resolutions are available.

Is there a way to get Linux to display the resolutions?

Follow this link, it contains a possible solution plus some backgroundinfo (like, why it works on windows)

1 Like

I will reply tomorrow with full output of xrandr, but as I said, it omits the resolution I want to use. I have tied the PC up with a disk low level format - needs 8hrs for a 1.5TB drive. And to be clear, Win10 and Win7 provide the resolution 2560 x 1600.

Also, I intend to respond to you re changing default color of green to my color of choice. I need to study what you said, then respond back.

mark@senior:~$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 2160, maximum 32767 x 32767
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 1872mm x 1053mm
3840x2160 30.00*+ 59.94 50.00 29.97 25.00 23.98
4096x2160 59.94 50.00 29.97 25.00 24.00 23.98
1920x1080 60.00 59.94 50.00 29.97 25.00 23.98 60.00 50.04
1680x1050 59.95
1600x900 60.00
1440x900 59.89
1366x768 59.79
1280x1024 75.02 60.02
1280x800 59.81
1280x720 60.00 59.94 50.00
1152x864 75.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32
720x576 50.00
720x480 59.94
640x480 75.00 72.81 59.94
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)

So I looked at the link and get:

The following comes from “How do I set a Custom Resolution” :

RES="1920 1200 60" &&
DISP=$(xrandr | grep -e " connected [^(]" | sed -e "s/([A-Z0-9]+) connected./\1/") &&
MODELINE=$(cvt $(echo $RES) | grep -e "Modeline [^(]" | sed -r 's/.Modeline (.)/\1/') &&
MODERES=$(echo $MODELINE | grep -o -P '(?<=").
(?=")') &&
cat > ~/.xprofile << _EOF
#!/bin/sh
xrandr --newmode $MODELINE
xrandr --addmode $DISP $MODERES
_EOF

But it seems you are saying that your code as follows should work, but much simpler?

cat< "$HOME/.xprofile"
#!/bin/sh
xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
xrandr --addmode VGA-0 "1280x1024_60.00"
SCREENFIX

Afterwards, logout and login again to activate this fix.
(and use xrandr to check if it worked)

So what would I enter for the line "xrandr --newmode "2560x1600_60.00" <following numbers ???> -hsync +vsync" ??? Given I follow your code, is there a low probability of fouling the PC system?
mark

You can't blindly copypaste that code without changing the resolution to what you need.

Besides that:
The piece of code you quoted won't do what you want it to do anyway.

  1. it greps the wrong parts of the xrandr output
  2. it is overcomplicated
  3. it contains errors in the 'sed' instruction (unescaped parenthesis)
  4. variables are unquoted which could have unintended side effects

My code ? Yes! "as follows"? No!
What you quoted was not exactly what I had written.
You definitely mutilated the first line and the values won't work for you

This is the unmutilated version with the values that you need.
Copypaste the following code into a terminal and press enter

cat<<SCREENFIX >"$HOME/.xprofile"
#!/bin/sh
xrandr --newmode "2560x1600_60.00"  348.50  2560 2760 3032 3504  1600 1603 1609 1658 -hsync +vsync
xrandr --addmode HDMI-0 "2560x1600_60.00"
SCREENFIX
1 Like

Some misunderstanding, maybe my wording, what you have supplied is actually what I was asking for in my post #4:

So what would I enter for the line "xrandr --newmode "2560x1600_60.00" <following numbers ???> -hsync +vsync" ???

So before I proceed, a few questions:

  1. Running the Modeline Calculator at the link below, I get numbers some of which differ slightly from what you have. Where do you get the parameters (other than resolution numbers) following "2560x1600_60.00", eg 348.50 2560 2760 3032 3504 1600 1603 1609 1658 -hsync +vsync ?

Running the Modeline Calculator:

I get:

Modeline "2560x1600_60.00" 348.16 2560 2752 3032 3504 1600 1601 1604 1656 -HSync +Vsync

  1. Do the small differences make any difference or chance of damaging the monitor-TV?
  2. And finally, just to be sure, once the changes are made, will the added display show/become-available in Settings>Hardware>Displays?

As I wrote in a previous link :

First generate a "modeline" by using cvt
Syntax is: cvt width height refreshrate

cvt 2560 1600 60

That means: open a terminal and type cvt 2560 1600 60

This modeline calculator is standard on every linux system.
Therefore it is more trustworthy than an online calculator.

No.

Yes, it should. After you logout/login again.

1 Like

No luck. Got an error msg per followng (I do not know how to include a jpg image):

Error found when loading /home/mark/.xprofile
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 18(RAddOutputMode)
Serial number of failed request: 43
Current serial number in output stream: 44

As a result the session will not be configured correctly.
You should fix he problem as soon as feasible.

Following shows cvt confirm and xrandr result from making your suggested entry:

cvt 2560 1600 60
cat<"$HOME/.xprofile"
#!/bin/sh
xrandr --newmode "2560x1600_60.00" 348.50 2560 2760 3032 3504 1600 1603 1609 1658 -hsync +vsync
xrandr --addmode HDMI-0 "2560x1600_60.00"
SCREENFIX

mark@senior:~$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 2160, maximum 32767 x 32767
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 1872mm x 1053mm
3840x2160 30.00*+ 59.94 50.00 29.97 25.00 23.98
4096x2160 59.94 50.00 29.97 25.00 24.00 23.98
1920x1080 60.00 59.94 50.00 29.97 25.00 23.98 60.00 50.04
1680x1050 59.95
1600x900 60.00
1440x900 59.89
1366x768 59.79
1280x1024 75.02 60.02
1280x800 59.81
1280x720 60.00 59.94 50.00
1152x864 75.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32
720x576 50.00
720x480 59.94
640x480 75.00 72.81 59.94
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)
2560x1600_60.00 (0x208) 348.500MHz -HSync +VSync
h: width 2560 start 2760 end 3032 total 3504 skew 0 clock 99.46KHz
v: height 1600 start 1603 end 1609 total 1658 clock 59.99Hz

I am very happy that you didn't because a jpg image serves no purpose for text output. On the contrary, it makes handling more difficult.

(On this forum output should be copypasted as text and then marked up with the </> symbol that you see on the top of the edit field.)

That is not what I suggested. You mangled the first line again.
This line is wrong:

cat<"$HOME/.xprofile"

It was therefore unavoidable that you got those errors.
Please check my suggestion again:

cat<<SCREENFIX >"$HOME/.xprofile"
#!/bin/sh
xrandr --newmode "2560x1600_60.00"  348.50  2560 2760 3032 3504  1600 1603 1609 1658 -hsync +vsync
xrandr --addmode HDMI-0 "2560x1600_60.00"
SCREENFIX

Paste this in a terminal and press enter

1 Like

I assure you that this time I entered the correct code at the terminal (even did it twice) - I apologize for the aggravation.

I see no change: 1) I still get the error message which allows me to close following by screen opening in the native 4K (thankfully the system allows the boot to continue after the message), and 2)xrander produces the same output as the previous post.

If it helps, below is the bottom portion of the xorg.conf file which I believe reflects my attempts to change the resolution via Nvidia: it made it to 2560 x 1600, but then(unless I am mistaken), made it the only choice in Settings>Displays.

Section "Monitor"

    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "SAMSUNG"
    HorizSync       15.0 - 81.0
    VertRefresh     24.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 1060 6GB"
EndSection

Section "Screen"

# Removed Option "metamodes" "nvidia-auto-select +0+0 {viewportin=2560x1600, viewportout=3456x2160+192+0}"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-1"
    Option         "metamodes" "3840x2160 +0+0; nvidia-auto-select +0+0 {viewportin=2560x1600, viewportout=3456x2160+192+0}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Is it possible that the xorg.conf can be removed and then re-build itself, or remove the "Section Screen" and then launch your code? Needless to say, as a minimum, I need to restore to avoid the Warning Message which halts the boot. But I am confident you resolve the issues in spite of my "buggering things" up.

Also, thanks for tip on "output" highlighting and .jpg no go - I am not a frequent user of MATE Support and my process skills reflect that.

You could try to remove the xorg.conf file or the sceen and monitor sections therein (back it up first so you can restore it later if needed) because it potentially could hamper your attempts to get the xrandr commands working.

You can always regenerate the xorg.conf file when needed:

Since you are using the closed-source proprietary nVidia driver instead of the mainlined open-source Nouveau driver, there is no guarantee that any of the regular ways to add a new resolution will work. There are, however, success stories.

If you don't play computergames and don't need CUDA you are probably better of with the Nouveau driver.
It goes without saying that nVidia does not play nice with Linux. It does work extremely well for playing games but if you have special needs all bets are off.

I am afraid that I can't be of much help from this point forward because I don't use nVidia hardware anymore (I ditched them many many years ago and went fully team red) so there is nothing that I can test for you.

The best thing you can do is ask the question on ask ubuntu or visit the nVidia developer forum (because, to be honest, it is a problem that they created)

OTOH there might be someone else on this forum that has a similar nVidia card who can help you out.

Good luck :slight_smile:

1 Like

Well I have GREAT NEWS – IT WORKS PERFECTLY, AS DESIRED. Without my bungling, we could have arrived at the destination a whole lot sooner with less aggravation!

So, for a brief history, with some diagnostics and intermediate steps not mentioned, this is how it goes:

I wanted to get ACAD2000 (32 bit) to display via WINE, on Ubuntu-Mate, such that some characters were big enough to easily see. The native monitor-TV resolution produced menu/tool bar characters that were too small, and the older software simply did not have the means to increase the character sizes; they were about 4.5mm high, viewed at about 3’.

So, I thought that by getting an updated Nvidia driver into Ubuntu Mate that the 2580 x 1600 resolution would display, that which shows in Win 10. It made no difference. I did not have knowledge of the presence of Nouveau, but I would have executed this step anyway.

Then entering your code (the incorrect version on my part), and the problem error msg pops-up and booting stops, but resumes after canceling the msg. A bit of panic on my part.

This morning, before I realized your post was waiting for me, I deleted 1st xorg.conf and then .xprofile. The PC then booted normally, and “does not miss” the deleted files. So back to “square one” at this point.

Subsequently, I saw your post. YOUR COMMENT ON Nouveau was a real tip off and cogs started turning. So I replaced the Nivdia driver with Nouveau. (and I do not play games in MATE)

I then ran your code (correct this time) and got an error msg with respect to HDMI number. Again, the PC recovered after canceling the msg. I changed the number from HDMI-0 to HDMI-1 in the code. Then installed the code and VOILA. The problematic characters in ACAD are now readily discernible.

As it turns out, some additional resolutions were generated which I see via xrandr: 2280 x 1620, 2560 x 1600, etc. However, the only one which works is 2560 x 1600 – the “gem”.

If there is a way to mark this thread “solved”, please let me how?

I sincerely thank you for your patience and hanging in with me. I have been mentally plagued with this problem for years. Had I only started with entering the correct code a lot of agony would have been spared. Done correctly, it is indeed a very simple and straight forward process. And I will document what I learned from this experience, mostly from your know how. Best to you.

Mark
Arcadia, CA USA

1 Like

I'm so happy to hear that. I wish you a very good Ubuntu-MATE experience :smiley:

There is a symbol of a green tickbox, if you select that it will mark the thread as solved :slight_smile:

1 Like