Ubuntu 24.04, Driver Version: 535.171.04 CUDA Version: 12.2 NVIDIA GeForce GTX 970 with 2 monitors attached and NVIDIA GeForce GTX 1070 just for number crunching.
xorg.conf isn't a new topic, and it's eternally frustrating...
I am defining this metamode in my xorg.conf file "DVI-D-0: nvidia-auto-select @2560x1440 +0+1022 {ViewPortIn=2560x1440, ViewPortOut=2560x1440+0+0}, HDMI-0: nvidia-auto-select @1440x2560 +2560+0 {ViewPortIn=1440x2560, ViewPortOut=2560x1440+0+0, Rotation=90}"
If I use nvidia-settings --assign CurrentMetaMode=
with that line, my monitors set the way I have defined. Yet, at boot, the rotation does not occur and the syslog indicates that it read the metamode twice, once with NVIDIA(0)
and again with NVIDIA(G0)
. The first time it validated and applied the metamode. The second time, it gave me a (WW)
that there are no valid metamodes and then chose a default mode for me.
2024-06-20T13:33:41.399118-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (**) NVIDIA(0): Option "Coolbits" "4"
2024-06-20T13:33:41.399132-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (**) NVIDIA(0): Option "MetaModes" "DVI-D-0: 2560x1440 @2560x1440 +0+1022 {ViewPortIn=2560x1440, ViewPortOut=2560x1440+0+0}, HDMI-0: 2560x1440 @1440x2560 +2560+0 {ViewPortIn=1440x2560, ViewPortOut=2560x1440+0+0, Rotation=90}"
...
2024-06-20T13:33:41.556262-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (II) NVIDIA(0): Validated MetaModes:
2024-06-20T13:33:41.556283-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (II) NVIDIA(0):
2024-06-20T13:33:41.556309-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (II) NVIDIA(0): "DVI-D-0:2560x1440@2560x1440+0+1022{ViewPortIn=2560x1440,ViewPortOut=2560x1440+0+0},HDMI-0:2560x1440@1440x2560+2560+0{ViewPortIn=1440x2560,ViewPortOut=2560x1440+0+0,Rotation=90}"
...
2024-06-20T13:33:41.563257-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (**) NVIDIA(G0): Option "MetaModes" "DVI-D-0: 2560x1440 @2560x1440 +0+1022 {ViewPortIn=2560x1440, ViewPortOut=2560x1440+0+0}, HDMI-0: 2560x1440 @1440x2560 +2560+0 {ViewPortIn=1440x2560, ViewPortOut=2560x1440+0+0, Rotation=90}"
...
2024-06-20T13:33:41.565323-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (WW) NVIDIA(G0): No valid modes for
2024-06-20T13:33:41.565347-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (WW) NVIDIA(G0): "DVI-D-0:2560x1440@2560x1440+0+1022{ViewPortIn=2560x1440,ViewPortOut=2560x1440+0+0},HDMI-0:2560x1440@1440x2560+2560+0{ViewPortIn=1440x2560,ViewPortOut=2560x1440+0+0,Rotation=90}";
2024-06-20T13:33:41.565370-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (WW) NVIDIA(G0): removing.
2024-06-20T13:33:41.565393-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (WW) NVIDIA(G0):
2024-06-20T13:33:41.565417-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (WW) NVIDIA(G0): Unable to validate any modes; falling back to the default mode
2024-06-20T13:33:41.565440-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (WW) NVIDIA(G0): "nvidia-auto-select".
2024-06-20T13:33:41.565463-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (WW) NVIDIA(G0):
...
2024-06-20T13:33:42.057984-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (II) NVIDIA(0): Setting mode "DVI-D-0:2560x1440@2560x1440+0+1022{ViewPortIn=2560x1440,ViewPortOut=2560x1440+0+0},HDMI-0:2560x1440@1440x2560+2560+0{ViewPortIn=1440x2560,ViewPortOut=2560x1440+0+0,Rotation=90}"
...
2024-06-20T13:33:42.974410-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (II) NVIDIA(0): Setting mode "HDMI-0: 2560x1440 @1440x2560 +2560+0 {ViewPortIn=1440x2560, ViewPortOut=2560x1440+0+0, Rotation=90}"
2024-06-20T13:33:43.048141-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (II) NVIDIA(0): Setting mode "NULL"
2024-06-20T13:33:43.119425-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (II) NVIDIA(0): Setting mode "DVI-D-0: nvidia-auto-select @2560x1440 +0+0 {ViewPortIn=2560x1440, ViewPortOut=2560x1440+0+0}"
2024-06-20T13:33:43.147767-05:00 ubuntu24 /usr/libexec/gdm-x-session[1801]: (II) NVIDIA(0): Setting mode "DVI-D-0: nvidia-auto-select @2560x1440 +0+0 {ViewPortIn=2560x1440, ViewPortOut=2560x1440+0+0}, HDMI-0: nvidia-auto-select @2560x1440 +2560+0 {ViewPortIn=2560x1440, ViewPortOut=2560x1440+0+0}"
...
I could easily work around this problem, but would like to understand what is going on. Why isn't the metamode valid at boot? And, what is the distinction between NVIDIA(0) and NVIDIA(G0)?
Here is the Screen Section from xorg.conf;
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "DVI-D-0"
DefaultDepth 24
Option "nvidiaXineramaInfoOrder" "DFP"
Option "metamodes" "DVI-D-0: 2560x1440 @2560x1440 +0+1022 {ViewPortIn=2560x1440, ViewPortOut=2560x1440+0+0}, HDMI-0: 2560x1440 @1440x2560 +2560+0 {ViewPortIn=1440x2560, ViewPortOut=2560x1440+0+0, Rotation=90}"
Option "SLI" "Off"
Option "TwinView" "true"
Option "MultiGPU" "off"
Option "BaseMosaic" "off"
# Option "ExactModeTimingsDVI" "true"
# Option "IgnoreEDID" "true"
# Option "UseEdidFreqs" "false"
SubSection "Display"
Depth 24
EndSubSection
EndSection