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:

[email protected]:~$ 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: [email protected]: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

[email protected]:~$ 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.

[email protected]:~$ 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