You are not logged in.

#1 2020-07-21 17:54:24

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,251

[SOLVED] nvidia vsync

I have searched wide and far, and can find diddly squat that works.

Owing to (admittedly a very real error between the chair and the keyboard) I finished up having to reinstall my system. Now, as it happens, I had a list of installed packages already saved on my NFS drive, and /home occupies a separate (undamaged) drive, so not the end of the world, and didn't take long to get back to almost exactly as it was. config files in /etc that I had previously changed were default again, and I can work through that.

However, nvidia drivers are now driving me mad.

I realise that glxgears is not a benchmark, but it's a useful test. With desktop compositing off glxgears is capable of producing 40,000fps. However, after a reboot, it produces 1,400 fps, and using a frame rate dependent program (Trackmania via wine is an example) it stutters to the point of being unuseable.

I can fix this by simply getting rid of /etc/X11/xorg.conf.

My issue is that no matter what I try I can't disable vsync at boot. Opening nvidia-settings and toggling it does, but I have no idea where it's picking it up from for the next boot.

It isn't any compositing manager (the only one I use is xfce4 anyway), and toggling in nvidia-settings wouldn't fix it if it was that.

I tried deleting ~/.nvidia-settings.rc, but that just left me with a holy mess of low resolution, though I'll post the contents here for reference.

What do I need to do to permanently disable nvidia vsync?

EDIT: For info - before the reinstall, there was no issue, so I doubt it's a ~/ config issue, but I could be wrong.

#
# /home/steve/.nvidia-settings-rc
#
# Configuration file for nvidia-settings - the NVIDIA X Server Settings utility
# Generated on Tue Jul 21 18:44:39 2020
#

# ConfigProperties:

RcFileLocale = C
DisplayStatusBar = Yes
SliderTextEntries = Yes
IncludeDisplayNameInConfigFile = No
ShowQuitDialog = Yes
UpdateRulesOnProfileNameChange = Yes
Timer = PowerMizer_Monitor_(GPU_0),Yes,1000
Timer = Thermal_Monitor_(GPU_0),Yes,1000
Timer = Memory_Used_(GPU_0),Yes,3000

# Attributes:

0/SyncToVBlank=0
0/LogAniso=0
0/FSAA=0
0/TextureClamping=1
0/FXAA=0
0/AllowFlipping=0
0/FSAAAppControlled=1
0/LogAnisoAppControlled=1
0/OpenGLImageSettings=1
0/FSAAAppEnhanced=0
0/ShowGraphicsVisualIndicator=0
[DPY:DVI-D-0]/Dithering=0
[DPY:DVI-D-0]/DitheringMode=0
[DPY:DVI-D-0]/DitheringDepth=0
[DPY:DVI-D-0]/ColorSpace=0
[DPY:DVI-D-0]/ColorRange=0
[DPY:DVI-D-0]/SynchronousPaletteUpdates=0
[DPY:HDMI-0]/RedBrightness=0.000000
[DPY:HDMI-0]/GreenBrightness=0.000000
[DPY:HDMI-0]/BlueBrightness=0.000000
[DPY:HDMI-0]/RedContrast=0.000000
[DPY:HDMI-0]/GreenContrast=0.000000
[DPY:HDMI-0]/BlueContrast=0.000000
[DPY:HDMI-0]/RedGamma=1.000000
[DPY:HDMI-0]/GreenGamma=1.000000
[DPY:HDMI-0]/BlueGamma=1.000000
[DPY:HDMI-0]/Dithering=0
[DPY:HDMI-0]/DitheringMode=0
[DPY:HDMI-0]/DitheringDepth=0
[DPY:HDMI-0]/DigitalVibrance=0
[DPY:HDMI-0]/ColorSpace=0
[DPY:HDMI-0]/ColorRange=0
[DPY:HDMI-0]/SynchronousPaletteUpdates=0
[DPY:DP-0]/Dithering=0
[DPY:DP-0]/DitheringMode=0
[DPY:DP-0]/DitheringDepth=0
[DPY:DP-0]/ColorSpace=0
[DPY:DP-0]/ColorRange=0
[DPY:DP-0]/SynchronousPaletteUpdates=0
[DPY:DP-1]/Dithering=0
[DPY:DP-1]/DitheringMode=0
[DPY:DP-1]/DitheringDepth=0
[DPY:DP-1]/ColorSpace=0
[DPY:DP-1]/ColorRange=0
[DPY:DP-1]/SynchronousPaletteUpdates=0
[DPY:DP-2]/Dithering=0
[DPY:DP-2]/DitheringMode=0
[DPY:DP-2]/DitheringDepth=0
[DPY:DP-2]/ColorSpace=0
[DPY:DP-2]/ColorRange=0
[DPY:DP-2]/SynchronousPaletteUpdates=0
[DPY:DP-3]/Dithering=0
[DPY:DP-3]/DitheringMode=0
[DPY:DP-3]/DitheringDepth=0
[DPY:DP-3]/ColorSpace=0
[DPY:DP-3]/ColorRange=0
[DPY:DP-3]/SynchronousPaletteUpdates=0
[DPY:DP-4]/Dithering=0
[DPY:DP-4]/DitheringMode=0
[DPY:DP-4]/DitheringDepth=0
[DPY:DP-4]/ColorSpace=0
[DPY:DP-4]/ColorRange=0
[DPY:DP-4]/SynchronousPaletteUpdates=0
[DPY:DP-5]/Dithering=0
[DPY:DP-5]/DitheringMode=0
[DPY:DP-5]/DitheringDepth=0
[DPY:DP-5]/ColorSpace=0
[DPY:DP-5]/ColorRange=0
[DPY:DP-5]/SynchronousPaletteUpdates=0

Last edited by Roken (2020-07-23 20:09:28)


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#2 2020-07-21 19:44:10

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,251

Re: [SOLVED] nvidia vsync

Nope. It's weirder.

I can reboot, run glxgears. No vsync warning and slow as molasses (1,400 or so fps).

I can reboot, run glxgears, get a vsync warning. Launch nvidia-settings then immediately quit with no changes, and the FPS ramps up to where it should be.

There's no consistency to what will happen after each reboot, and this changes according to its mood when all I do is boot and test glxgears. Nothing else at all.

testing with

inxi -G

produces:

Graphics:  Device-1: NVIDIA GP104 [GeForce GTX 1070] driver: nvidia v: 450.57 
           Display: x11 server: X.Org 1.20.8 driver: nvidia resolution: 2560x1440~60Hz 
           OpenGL: renderer: GeForce GTX 1070/PCIe/SSE2 v: 4.6.0 NVIDIA 450.57 

When it runs well (after nvidia-settings and then quit), but with

Graphics:  Device-1: NVIDIA GP104 [GeForce GTX 1070] driver: nvidia v: 450.57 
           Display: x11 server: X.Org 1.20.8 driver: modesetting FAILED: nvidia resolution: 2560x1440~60Hz 
           OpenGL: renderer: llvmpipe (LLVM 10.0.0 256 bits) v: 3.3 Mesa 20.1.3

When it's on a go slow. So how do I fix the modesetting to work consistently? I am honestly out of ideas, especially since the result is not consistent across boots.

I hate random problems. If I could reproduce consistently I'd be happier.

Reading suggests an issue with nvidia-libgl, but this is provided by nvidia-utils, and the fact it works sometimes suggests that this is not the issue.


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#3 2020-07-21 21:18:32

seth
Member
Registered: 2012-09-03
Posts: 49,979

Re: [SOLVED] nvidia vsync

Please post a "bad" xorg log.
How do you start the graphical session? startx or some DM (and which)?

Offline

#4 2020-07-22 05:06:47

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,251

Re: [SOLVED] nvidia vsync

Thank you

xorg log https://pastebin.com/NJqWMBzY

Started with lxdm.


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#5 2020-07-22 05:32:09

seth
Member
Registered: 2012-09-03
Posts: 49,979

Re: [SOLVED] nvidia vsync

[     5.098] (II) Loading sub module "glxserver_nvidia"
[     5.098] (II) LoadModule: "glxserver_nvidia"
[     5.099] (WW) Warning, couldn't open module glxserver_nvidia
[     5.099] (EE) NVIDIA: Failed to load module "glxserver_nvidia" (module does not exist, 0)
[     5.099] (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
[     5.099] (EE) NVIDIA(0):     log file that the GLX module has been loaded in your X
[     5.099] (EE) NVIDIA(0):     server, and that the module is the NVIDIA GLX module.  If
[     5.099] (EE) NVIDIA(0):     you continue to encounter problems, Please try
[     5.099] (EE) NVIDIA(0):     reinstalling the NVIDIA driver.

The reason is that the ModulePath isn't extended.
This is supposed to happen by /usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf

I assume the match fails because the GPU isn't fully initialized (nvidia-drm not loaded)
You could try https://wiki.archlinux.org/index.php/Ke … _KMS_start (w/ nvidia and nvidia-drm)

The nvidia X11 driver is used, because you're enforcing it w/ the xorg.conf written by nvidia-xconfig/settings.
I highly recommend to drop that file.
What you likely wanted instead was /etc/X11/xorg.conf.d/20-nvidia.conf

Section "Device"
    Identifier "Default nvidia Device"
    Driver        "nvidia"
    Option      "NoLogo"				"True"
    Option      "CoolBits"				"24"
    Option      "TripleBuffer"			"True" # triple takes one extra screenbuffer in VRAM, but allows faster/unblocking vsync
    Option      "MetaModes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}" # you're btw. aware that this will prevent the GPU from powering down?
EndSection

exporting "__GL_SYNC_TO_VBLANK=1" will btw. make a GL client swap w/ vsync enabled no matter what, check /usr/share/doc/nvidia/README for more information.
You can also have client profiles.

Offline

#6 2020-07-22 09:21:36

Pillgar
Member
Registered: 2017-07-05
Posts: 41

Re: [SOLVED] nvidia vsync

There are hidden parameters in xfwm that uses: vblank=xpresent, vblank=glx, vblank=off.  glx might be default.

Offline

#7 2020-07-22 18:48:20

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,251

Re: [SOLVED] nvidia vsync

I think the overriding problem may be hardware. The NVME securing screw is loose. Trying to lay my hands on a replacement. In the meantime, I've taped it down with Gaffer tape.

I'll try the xfwm parameters to disable vsync, though I'm not confident, since simply launching nvidia-settings and then quitting immediately is enough to turn it off.

I still suspect possibly something in .nvidia-settings-rc, though I can't see anything either there or in xorg.conf


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#8 2020-07-22 19:28:31

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,251

Re: [SOLVED] nvidia vsync

I've fixed the vsync issue with:

/usr/bin/nvidia-settings -a 'SyncToVBlank=0'

as a startup item in xfce4 settings.

Still have the inconsistent driver load issue, and it's likely to be a couple of weeks before my (insanely expensinve) pack of screws arrive for the nvme card.

Last edited by Roken (2020-07-22 19:28:51)


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#9 2020-07-22 20:14:19

seth
Member
Registered: 2012-09-03
Posts: 49,979

Re: [SOLVED] nvidia vsync

"nvidia-settings -a 'SyncToVBlank=0'" would turn it off.
Did you try early kms to deal w/ the inconsitend libglx loading?

Offline

#10 2020-07-22 20:43:50

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,251

Re: [SOLVED] nvidia vsync

seth wrote:

"nvidia-settings -a 'SyncToVBlank=0'" would turn it off.

Yes, off is what I want. I don't want the driver handling vsync, since it throttles everything. I'd rather let the compositor handle it, which eliminates screen tearing, but doesn't throttle frame rates.

Did you try early kms to deal w/ the inconsitend libglx loading?

OK, this is new territory for me. I added nvidia to the MODULES array of /etc/mkinitcpio.conf and rebuilt.

A first reboot and all is good, but one boot is certainly not definitive. I'll have to see how it goes, though I'd be grateful if you would confirm this is what you meant.

EDIT: A further three reboots and a cold start, and no problem. That may have done it, though I'm holding back on SOLVED for a couple of days to be sure.

Unfortunately, because it's not consistent, it will take time to confirm the solution.

Last edited by Roken (2020-07-22 20:49:03)


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#11 2020-07-23 20:11:24

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,251

Re: [SOLVED] nvidia vsync

Marked solved. After going the early KMS route I haven't had a GLX failure despite several warm and cold boots. Thank you, seth.

I'm keeping the nvidia-settings command at startup, which fixes what appears to be the ancillary problem.


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

Board footer

Powered by FluxBB