You are not logged in.
I know that similar questions have been asked, but I have not been able to get their answers to work myself.
I have a two monitor setup, both connected to one graphics card, a NVIDIA RTX 3060 TI LHR.
My current configuration is
# /etc/X11/nvidia.conf.d/10-monitor.conf
Section "Monitor"
Identifier "BenQ XL2430T"
VendorName "BenQ"
ModelName "XL2430T"
Option "Primary" "true"
Option "PreferredMode" "1920x1080_144.00"
Option "DPMS" "true"
EndSection
Section "Monitor"
Identifier "Lenovo T24d-10"
VendorName "Lenovo"
ModelName "ThinkVision T24d-10"
Option "LeftOf" "BenQ XL2430T"
Option "DPMS" "true"
EndSection
and
# /etc/X11/nvidia.conf.d/20-nvidia.conf
Section "Device"
Identifier "NVIDIA GPU"
Driver "nvidia"
BusID "PCI:12:0:0"
VendorName "NVIDIA Corporation"
BoardName "GeForce RTX 3060 Ti Light Hash Rate"
Option "ConnectToAcpid" "0"
EndSection
Section "Screen"
Identifier "RightScreen"
Device "NVIDIA GPU"
Monitor "BenQ XL2430T"
EndSection
Section "Screen"
Identifier "LeftScreen"
Device "NVIDIA GPU"
Monitor "Lenovo T24d-10"
EndSection
The configuration files are in the directory
/etc/X11/nvidia.conf.d/
because I sometimes use VFIO-passthrough to a qemu VM, so I have a special setup.
I start the X server with an alias:
startx -- -configdir "nvidia.conf.d/"
.
This has worked and still is working, but I want to be able to set the preferred refresh rate to 144Hz for the BenQ Monitor. Also, the BenQ should be the right monitor, which it currently is not recognized as.
This RandR command does the trick:
xrandr --output HDMI-0 --auto --left-of DP-2 --output DP-2 --mode 1920x1080 --rate 144.00 --primary
How do I set this in the config files? I tried "PreferredMode" and "Modeline" settings, but the nvidia driver seems to ignore them.
Also, how do the "Identifier"s relate to the output of
xrandr -q
? Do they need to be the same? I thought I can freely set them in my config?
Edit: Oh, I forgot the output of
xrandr -q
:
[15:57 me@MyArchMachine ~]$ xrandr -q
Screen 0: minimum 8 x 8, current 3840 x 1200, maximum 32767 x 32767
HDMI-0 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200 59.95*+
1920x1080 60.00 59.94 50.00
1680x1050 59.95
1600x1200 60.00
1440x900 74.98 59.89
1366x768 59.79
1280x1024 75.02 72.00 60.02
1280x800 59.81
1280x768 59.94
1280x720 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 59.93
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 531mm x 298mm
1920x1080 60.00 + 144.00* 119.98 99.93 59.94 50.00
1440x900 119.85
1280x1024 75.02
1280x960 99.78
1280x720 60.00 59.94 50.00
1024x768 119.99 75.03 60.00
800x600 119.97 99.66 75.00 60.32
720x576 50.00
720x480 59.94
640x480 119.52 99.77 75.00 59.94 59.93
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)
Any help is appreciated!
Last edited by PropagandaPanda (2022-07-30 10:46:07)
Offline
Choosing the output name from "xrandr -q" as Identifier will allow you to apply to the output w/o having to reference it.
It's the preferable approach.
While I think you're right and nvida ignores the PreferredMode setting, there's also no "1920x1080_144.00" mode (it would be "1920x1080")
The setting should™ work w/ nvidas meta mode configuration
Section "Screen"
Identifier "Screen0"
Option "metamodes" "HDMI-0: 1920x1200_60 +0+0, DP-2: 1920x1200_144 +1920+0"
EndSection
drop the other two screens and use HDMI-0 and DP-2 as Identifier for the monitors (or drop them, DPMS is enabled by default anyway - not sure about the primary handling at hand)
Edit: though iirc wrt the primary mode, this is controlled by the metamode output order (ie. in the above HDMI-0 would become the primary output)
Last edited by seth (2022-07-29 15:45:11)
Offline
Thanks seth, that worked immmediately!
I read in some other question that using human-readable and meaningful names as identifiers was preferred, but this seemingly just complicated things. I am quite happy now.
And yeah, the metamode order seems to determine the primary monitor.
Thanks for your help!
Offline