Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 907608 - x11-drivers/nvidia-drivers-390.157 sync to VBlank does not work
Summary: x11-drivers/nvidia-drivers-390.157 sync to VBlank does not work
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Ionen Wolkens
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-01 08:40 UTC by Balint Dobai-Pataky
Modified: 2023-06-04 17:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,7.11 KB, text/plain)
2023-06-01 08:41 UTC, Balint Dobai-Pataky
Details
Xorg.0.log (Xorg.0.log,28.08 KB, text/x-log)
2023-06-01 08:41 UTC, Balint Dobai-Pataky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Balint Dobai-Pataky 2023-06-01 08:40:05 UTC
$ glxgears 
9928 frames in 5.0 seconds = 1985.486 FPS
$ __GL_SYNC_TO_VBLANK=1 glxgears
10320 frames in 5.0 seconds = 2063.828 FPS
$ __GL_SYNC_TO_VBLANK=1 __GL_SYNC_DISPLAY_DEVICE=DFP-0  glxgears
10258 frames in 5.0 seconds = 2051.402 FPS


Reproducible: Always

Actual Results:  
No limit on FPS

Expected Results:  
Limit the FPS


x11-drivers/nvidia-drivers-390.157:0/390::gentoo
x11-base/xorg-server-21.1.8:0/21.1.8::gentoo

media-libs/mesa-23.0.3-r1::gentoo  USE="X llvm osmesa wayland -d3d9 -debug -gles1 -gles2 -lm-sensors -opencl -proprietary-codecs (-selinux) -test -unwind -vaapi -valgrind -vdpau -vulkan -vulkan-overlay -xa -zink -zstd" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="sse2" VIDEO_CARDS="-d3d12 (-freedreno) -intel (-lima) -nouveau (-panfrost) -r300 -r600 -radeon -radeonsi (-v3d) (-vc4) -virgl (-vivante) -vmware" 

# lspci|grep -i VGA
23:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 730] (rev a1)
2d:00.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce GTX 770] (rev a1)
Comment 1 Balint Dobai-Pataky 2023-06-01 08:41:06 UTC
Created attachment 862998 [details]
emerge --info
Comment 2 Balint Dobai-Pataky 2023-06-01 08:41:55 UTC
Created attachment 862999 [details]
Xorg.0.log
Comment 3 Balint Dobai-Pataky 2023-06-01 08:43:05 UTC
$ dmesg |grep -i modeset
[    1.800824] nvidia_drm: unknown parameter 'modeset' ignored
[    1.800824] nvidia_drm: unknown parameter 'modeset' ignored
[   19.092291] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  390.157  Wed Oct 12 09:15:25 UTC 2022
Comment 4 Ionen Wolkens gentoo-dev 2023-06-01 08:57:48 UTC
Don't know what's up with this, but there's nothing we can do about issues with nvidia-drivers-390.xx unless it's a packaging issue.

It's closed source and NVIDIA no longer supports this branch (since December 2022), and so will not fix anything even if reported. Eventually we'll need to drop 390 from gentoo's repos when it's too broken like we did with 340 and older.

If your cards need 390, only thing I can suggest is either switch to nouveau or get new hardware. Albeit that GTX770 should be Kepler and work with nvidia-drivers-470.xx (with still years of support ahead) while the GT730 is afaik a late Fermi model and won't.
Comment 5 Balint Dobai-Pataky 2023-06-01 10:32:36 UTC
Thank you for the kind answer.
Comment 6 Balint Dobai-Pataky 2023-06-02 16:36:33 UTC
The source of the problem was nvdia-glx not loaded
Somehow X loaded mesa glx too soon and refused to load nvidia's glx
Since there is no more eselect-opengl and this should be handled by libglvnd, but it wasn't, I just overwrote mesa's libglx.so with nvidia's, and everything works now.
Comment 7 Ionen Wolkens gentoo-dev 2023-06-03 02:46:13 UTC
Maybe custom xorg configuration were causing 390's workaround to not be used?

390's glvnd support is incomplete, and it requires passing a ModulePath option for Xorg, out of the box it'll recognize the nvidia-drm-outputclass.conf

Aka it has:
     Section "OutputClass"
        Identifier "nvidia"
        MatchDriver "nvidia-drm"
        Driver "nvidia"
        Option "AllowEmptyInitialConfiguration"
        ModulePath "/usr/lib64/extensions/nvidia"
    EndSection

So it loads glx from /usr/lib64/extensions/nvidia -- but if you have a custom xorg.conf, that may not always work.
Comment 8 Balint Dobai-Pataky 2023-06-04 17:29:48 UTC
I tried with minimal conf, same.
I have this OutputClass on the 2 heads of my main card.