Bug 451300 - Plasma Wayland Session: Hardware GSYNC with NVIDIA GPU not working
Summary: Plasma Wayland Session: Hardware GSYNC with NVIDIA GPU not working
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.24.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-09 02:39 UTC by Hexagon
Modified: 2022-03-26 19:48 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hexagon 2022-03-09 02:39:33 UTC
SUMMARY
Using a Plasma Wayland session, a NVIDIA GPU (RTX 2080) and a GSYNC monitor (which has a GSYNC hardware module, not FreeSync/VESA-VRR) GSYNC does not work. In my test with the monitor "ASUS PG279Q" the indication LED on the monitor should display red to indicate the monitor recognises a GSYNC signal. Instead it displays a white LED, indicating GSYNC is not active. In Plasma X11 my monitor LED shows GSYNC as enabled and it is working.

STEPS TO REPRODUCE
1. Start a Plasma Wayland session with an NVIDIA GPU and a GSYNC monitor with a GSYNC hardware module
2. Observe if the monitor shows via the status LED, FPS counter or other measure that it is working in GSYNC mode

OBSERVED RESULT
GSYNC does not work

EXPECTED RESULT
GSYNC should work

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3
NVIDIA proprietary driver: 510.54-5
Comment 1 Victor Ryzhykh 2022-03-09 21:21:13 UTC
Upgrade to latest 495 stable driver.
    Ensure that /etc/egl/egl_external_platform.d/15_nvidia_gbm.json is installed next to 10_nvidia_wayland.json.
    Ensure that nvidia-drm_gbm.so is in a configured mesa gbm search path and is a symlink to libnvidia-allocator.so.495.44.
    Launch sway with the appropriate env args.
    (edit: also, patch wlroots/sway around the RGB check)

Operating System: ROSA Fresh Desktop 2021.1
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Kernel Version: 5.16.13-desktop-1rosa2021.1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-7700K CPU @ 4.20GHz
Memory: 15.6 ГиБ of RAM
Graphics Processor: NVIDIA GeForce GTX 1060 3GB/PCIe/SSE2



https://forums.developer.nvidia.com/t/nvidia-495-on-sway-tutorial-questions-arch-based-distros/192212/52
Comment 2 Victor Ryzhykh 2022-03-09 21:37:45 UTC
(In reply to Victor Ryzhykh from comment #1)
> Upgrade to latest 495 stable driver.
>     Ensure that /etc/egl/egl_external_platform.d/15_nvidia_gbm.json is
> installed next to 10_nvidia_wayland.json.
>     Ensure that nvidia-drm_gbm.so is in a configured mesa gbm search path
> and is a symlink to libnvidia-allocator.so.495.44.
>     Launch sway with the appropriate env args.
> arch-based-distros/192212/52

This fixes bug

«nvidia-drm_gbm.so
MESA-LOADER: failed to open nvidia-drm: /usr/lib64/gbm/nvidia-drm_gbm.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/gbm, suffix _gbm)»
Comment 3 Hexagon 2022-03-10 07:28:09 UTC
Hi Victor,
unfortunately I didn't quite get what you mean.
You pasted steps of actions for the Sway compositor and said that it fixes some bug where "MESA failed to load nvidia-drm".

I don't know how this is related to the problem I described. Could you please explain further what you mean?
Comment 4 Hexagon 2022-03-10 07:54:47 UTC
I found this: https://zamundaaa.github.io/wayland/2021/12/14/about-gaming-on-wayland.html

As of version 5.23 kwin_wayland supports
    rendering multiple screens at different refresh rates
    dynamic adjustment to the current rendering load, to minimize latency
    Adaptive Sync / FreeSync / (once NVidia supports it on Wayland) GSync
    direct scanout with fullscreen apps

Here someone says that kwin_wayland will support GSync as soon as NVIDIA supports it on Wayland. My question:
Is Gsync not working on KDE Wayland due to KDE or to the NVIDIA driver? I would like to know if it is just a bug or maybe not implemented yet on KDE or NVIDIA side. Thanks for your help.
Comment 5 Victor Ryzhykh 2022-03-10 08:38:16 UTC
In my case, the command helped 

sudo ln -s /usr/lib64/nvidia/libnvidia-allocator.so.510.54 /usr/lib64/gbm/nvidia-drm_gbm.so

I don't know where the libnvidia-allocator.so.510.54 file is on your system.
Most likely there. If elsewhere, change the path to the libnvidia-allocator.so.510.54 file in the command.
Comment 6 Victor Ryzhykh 2022-03-10 08:42:35 UTC
(In reply to Hexagon from comment #4)
> I found this:
> https://zamundaaa.github.io/wayland/2021/12/14/about-gaming-on-wayland.html
> Here someone says that kwin_wayland will support GSync as soon as NVIDIA
> supports it on Wayland. My question:
> Is Gsync not working on KDE Wayland due to KDE or to the NVIDIA driver? I
> would like to know if it is just a bug or maybe not implemented yet on KDE
> or NVIDIA side. Thanks for your help.

This should be fixed by the nvidia package manager.
Like this. 
https://abf.rosalinux.ru/x11_backports/nvidia510/diff/e8f92...1adb9
Comment 7 Hexagon 2022-03-13 14:46:00 UTC
It seems like the Arch packages already have set this link:

lrwxrwxrwx   1 root root     32 Feb 15 02:05 nvidia-drm_gbm.so -> ../libnvidia-allocator.so.510.54

Unfortunately it doesn't work yet. Just to be clear: Do you have a working KDE Plasma Wayland session with a hardware Gsync monitor with Gsync working?
Comment 8 Victor Ryzhykh 2022-03-13 17:44:42 UTC
(In reply to Hexagon from comment #7)
> Unfortunately it doesn't work yet. Just to be clear: Do you have a working
> KDE Plasma Wayland session with a hardware Gsync monitor with Gsync working?

I have a Samsung monitor.
Comment 9 Zamundaaa 2022-03-25 16:57:37 UTC
NVidia doesn't support GSync on Wayland yet. It'll work once they do
Comment 10 Hexagon 2022-03-25 17:11:45 UTC
(In reply to Zamundaaa from comment #9)
> NVidia doesn't support GSync on Wayland yet. It'll work once they do

Ah okay. Thanks for the reply. I understand your statement as:
1) "Real" Gsync with a hardware module in the monitor is currently not supported by the NVIDIA driver using Wayland.

How is it about:
2) Freesync (Also called Gsync Compatible) Monitors with NVIDIA driver and Wayland?

Unfortunately I don't have a Freesync Monitor to test this.
Do Freesync monitors work already or does neither 1) and 2) work currently with Wayland?
Comment 11 Zamundaaa 2022-03-25 17:57:04 UTC
FreeSync isn't supported by NVidia either
Comment 12 Hexagon 2022-03-25 18:17:58 UTC
(In reply to Zamundaaa from comment #11)
> FreeSync isn't supported by NVidia either

Okay. It seems like people who value the highest visual fidelity (especially the whole Gaming on Linux group of people) are then dependent on NVIDIA adding support for Gsync and Freesync on Wayland in their proprietary driver.

As I am new to the world of issues and reporting: If you know could you please point me to the right direction where I can address this issue to NVIDIA? I think especially for the development of Gaming on Linux it is extremely important to have Variable Refresh Rate with Gsync and FreeSync working on Wayland using NVIDIA as Xorg doesn't provide a way to use it with more than one monitor attached. But as most gamers have at least a second monitor for communication this renders VRR unusable in Linux, being a major disadvantage for all gamers which try to move from Windows.

Where is the right place to tell NVIDIA the importance of this and maybe to build pressure from the community to urge them to implement VRR on Wayland? Thanks for your help in advance.
Comment 13 Zamundaaa 2022-03-26 19:48:25 UTC
I think that NVidias forums are the place intended for that, but I'm honestly not sure either