You are not logged in.
Hello,
I have reached the end of what i could do alone by reading the Arch Wiki and reddit.
Here's my issue.
❯ xrandr --listactivemonitors
Monitors: 3
0: +*DP-2 3440/798x1440/335+1920+0 DP-2
1: +HDMI-0 1920/510x1080/287+0+180 HDMI-0
2: +DP-5 1920/531x1080/299+5360+180 DP-5I need to swap DP-2 and HDMI-0 in this list while keeping DP-2 as the primary monitor.
What i want to get is :
❯ xrandr --listactivemonitors
Monitors: 3
0: +HDMI-0 1920/510x1080/287+0+180 HDMI-0
1: +*DP-2 3440/798x1440/335+1920+0 DP-2
2: +DP-5 1920/531x1080/299+5360+180 DP-5I used nvidia-settings to generate the xorg.conf.
I tried to swap monitor position in this part of the code without success :
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "DFP-3"
Option "metamodes" "HDMI-0: nvidia-auto-select +0+180 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}, DP-2: 3440x1440_100 +1920+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}, DP-5: nvidia-auto-select +5360+180 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
SubSection "Display"
Depth 24
EndSubSection
EndSectionWhy i want to do that ?
I need to satisfy two requirements:
- The way Qtile works to position its screens. No flexibility there.
- The fact that my main monitor (DP-2) should remain as primary monitor to work at its native 100 Hz refresh rate. Otherwise it drops down to 60 Hz (cf this link: https://www.reddit.com/r/linuxhardware/ … ifferent/)
Any suggestions ?
Thanks in advance
Last edited by Crystal4276 (2022-09-15 11:04:18)
Offline
I used nvidia-settings to generate the xorg.conf.
And this is pretty much where your problems start.
Don't use that, it creates a valid xorg config, but is full of cruft and won't allow you to control more details.
Put this into eg /etc/X11/xorg.conf.d/11-outputcontrol.conf ad get rid of the nvidia-settings generated xorg.conf
Section "Screen"
Identifier "Screen0"
# Option "nvidiaXineramaInfoOrder" "DFP-3" # entirely unsure about this one
Option "metamodes" "DP-2: 3440x1440_100 +1920+0, HDMI-0: nvidia-auto-select +0+180, DP-5: nvidia-auto-select +5360+180" # I'm fairly sure the order matters wrt the priamry device
EndSection
Section "Device"
Identifier "NVIDIA GeForce GPU"
Driver "nvidia"
Option "TripleBuffer" "True" # maybe useful, too
Option "ForceFullCompositionPipeline" "True" # use this to control that, though iirc you'll get it on a multiscreen setup anyway
EndSection
# if the metamode order doesn't suffice
Section "Monitor"
Identifier "DP-2"
Option "Primary" "True"
EndSection
Section "Monitor"
Identifier "DP-5"
Option "Primary" "False"
EndSection
Section "Monitor"
Identifier "HDMI-0"
Option "Primary" "False"
EndSectionOffline
Thanks seth for taking the time.
I religiously followed your post, but it didn't work at the end.
Here's the details of what i have done.
-Removed the nvidia gibberish
- created /etc/X11/xorg.conf.d/11-outputcontrol.conf
- copy pasted the proposed configuration.
I get 100Hz and the wrong monitor order:
Monitors: 3
0: +*DP-2 3440/798x1440/335+1920+0 DP-2
1: +HDMI-0 1920/510x1080/287+0+180 HDMI-0
2: +DP-5 1920/531x1080/299+5360+180 DP-5I swapped DP-2 with HDMI-0 in metamode line because i need DP-2 as primary monitor and in second position.
"metamodes" "HDMI-0: nvidia-auto-select +0+180, DP-2: 3440x1440_100 +1920+0, DP-5: nvidia-auto-select +5360+180"I get the same results: 100Hz + wrong monitor order:
Monitors: 3
0: +*DP-2 3440/798x1440/335+1920+0 DP-2
1: +HDMI-0 1920/510x1080/287+0+180 HDMI-0
2: +DP-5 1920/531x1080/299+5360+180 DP-5If I comment this section:
# if the metamode order doesn't suffice
Section "Monitor"
Identifier "DP-2"
Option "Primary" "True"
EndSection
Section "Monitor"
Identifier "DP-5"
Option "Primary" "False"
EndSection
Section "Monitor"
Identifier "HDMI-0"
Option "Primary" "False"
EndSectionThen i get 60Hz and correct monitor order.
Monitors: 3
0: +HDMI-0 1920/510x1080/287+0+180 HDMI-0
1: +DP-2 3440/798x1440/335+1920+0 DP-2
2: +DP-5 1920/531x1080/299+5360+180 DP-5Notice that the * has disappeared and therefore means that defining DP-2 as primary is indeed required to get 100Hz.
Adding back "primary True" for DP-2 provide 100Hz and again revert the monitor order
Last edited by Crystal4276 (2022-09-15 18:47:49)
Offline
I'm fairly certain that the primary monitor will always be 0 and you can't arbitrarily change that.
Offline
Do you think switching to Wayland may solve the problem ?
Any recommended equivalent to xrandr ?
Offline
I kinda missed that this was your goal…
I need to swap DP-2 and HDMI-0 in this list while keeping DP-2 as the primary monitor.
The way Qtile works to position its screens. No flexibility there.
There seem quite a few related bugs itr, eg. https://github.com/qtile/qtile/issues/3708 and https://github.com/qtile/qtile/issues/3186
https://github.com/qtile/qtile/issues/3 … 1013903596 seems to indicate that the primary flag itself has (direct?) impact on qtiles behavior while https://github.com/qtile/qtile/issues/3 … 1202670434 indicates that the order behind that is random.
Depending on which issue w/ qtile you're having you might be chasing a goose here.
=> I'd rather seek to fix qtiles behavior than to work around it.
On the other side, why would the primary flag impact the used frequency?
Is this reflected in "xrandr -q"? Can you alter the rate w/ xrandr?
Is this maybe caused by "ForceFullCompositionPipeline"?
Offline
=> I'd rather seek to fix qtiles behavior than to work around it.
Which imply modifying their source code, i guess.
I will try raising an issue on their github then
As for the refresh rate thinghy. That's a bug.
I could fix it only by setting DP-2 as primary + following this "hack" :
https://www.reddit.com/r/linuxhardware/ … ifferent/)
xrandr -q clearly show 100 Hz for all primary flag configurations as long as DP-2 is set to 100 Hz.
But i could clearly see, that the real applied refresh rate was 60Hz.
So i used this https://www.displayhz.com/ or that https://www.testufo.com/refreshrate to confirm and even pinpoint how the "real" refresh rate changes depending on the parameters in xorg.conf
Last edited by Crystal4276 (2022-09-15 20:22:45)
Offline
But i could clearly see, that the real applied refresh rate was 60Hz.
What does the outputs OSD say about the frequency? (This might very well be down to some client/compositor syncing to the primary output)
Offline
Regarding switching to "Wayland", that's a maybe and depends on what your compositor actually is doing and aligning, there is no Wayland like there is a Xorg, every compositor might interpret/do things differently here so try it out.
Regarding the frequency stuff, isn't that the "old" Xorg issue of only being able to properly refresh/sync on one display and most tools (and likely the driver) will select the primary for that?
Last edited by V1del (2022-09-15 20:46:23)
Offline
This is most likely not even an xorg specific issue, but nvidia lets you control the sync device ("grep __GL_SYNC_DISPLAY_DEVICE /usr/share/doc/nvidia/README")
Offline
But i could clearly see, that the real applied refresh rate was 60Hz.
What does the outputs OSD say about the frequency? (This might very well be down to some client/compositor syncing to the primary output)
I didn't know what OSD mean.
Found out it's "on screen display".
So it's showing 100 Hz with or without being primary monitor (while online tools show 60 or 100Hz).
Regarding the frequency stuff, isn't that the "old" Xorg issue of only being able to properly refresh/sync on one display and most tools (and likely the driver) will select the primary for that?
I don't know. I'm probably too "young" as i switched from W10 early 2022.
Because of a kernel panic updating Mint 20.3 to 21, i almost went back to W10, but decided to give a rolling release a shot.
So Arch about 2 months ago. Tough to be honest... but the wiki helps a lot.
Last edited by Crystal4276 (2022-09-15 21:11:11)
Offline
The output is running at the proper frequency, all you see is the client syncing to the primary output as myself and V1del suspected in #8 and #9
Check the grep in #10, you can control which output is used for the sync.
Offline
Since the beginning i have those environment variables set in this file /etc/environment:
CLUTTER_DEFAULT_FPS=100
__GL_SYNC_DISPLAY_DEVICE=DP-2
__GL_SYNC_TO_VBLANK=0I can see them with printenv:
❯ printenv | grep CLUTTER
CLUTTER_DEFAULT_FPS=100
❯ printenv | grep GL
__GL_SYNC_DISPLAY_DEVICE=DP-2
__GL_SYNC_TO_VBLANK=0This is the link i followed for that: https://www.reddit.com/r/linuxhardware/ … different/
If I do not declare those variables, i will always get 60Hz even if DP-2 is set as primary
(That was my last battle one month ago)
Last edited by Crystal4276 (2022-09-16 06:38:21)
Offline
__GL_SYNC_TO_VBLANK=0
you're not syncing *at all* - at least not GL clients.
No idea about clutter, notably wrt qtile…
Offline
I removed CLUTTER_DEFAULT_FPS=100
I don't need it for qtile : https://wiki.gnome.org/Projects/Clutter
and I set __GL_SYNC_TO_VBLANK=1
Ok thanks a lot for the help, i'll see if anything can be done on qtile side.
Edit:
For those passing by and interested i opened a feature request on qtile github here:
https://github.com/qtile/qtile/discussions/3839
Last edited by Crystal4276 (2022-09-16 08:14:55)
Offline