Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wayland Support #69

Open
Weirdo1312 opened this issue Jun 22, 2021 · 83 comments
Open

Wayland Support #69

Weirdo1312 opened this issue Jun 22, 2021 · 83 comments

Comments

@Weirdo1312
Copy link

nvidia-settings is an essential tool for linux users to tweak their graphics card under a linux system,
not a 'nice-to-have' program, until this tool gets ported to Wayland I won't be able to use my graphics card the way i want so I'll stick to xorg

@gardotd426
Copy link

I was thrilled when you guys added support for accelerated XWayland, but like @BarFin says I will never be able to move to Wayland if it means I can't control my GPU, especially the fans. Is there any word on this?

@ghost
Copy link

ghost commented Sep 22, 2021

Nvidia, please make Wayland (Sway) support in your Drivers and in nvidia-settings!

@freevatar
Copy link

My vote for Wayland support as well.

@Mondrethos
Copy link

This is really important.

@ivanfiorentini
Copy link

nvidia-settings is mandatory to control color correction of my monitor.
Please do support nvidia-settings for wayland !

@Weirdo1312
Copy link
Author

I don't understand why this issue was closed, since it still doesn't work.

It isnt

@takosalad
Copy link

Yes please, also, I need NVidia Reflex on Linux, playing Overwatch there heavily.

@nulm
Copy link

nulm commented Nov 7, 2021

Needed

@tfiskgul
Copy link

tfiskgul commented Dec 3, 2021

Adding my voice to this request. Please support Wayland.

@ifohancroft
Copy link

I am also in-favor of this.

@CleoMenezesJr
Copy link

All in one petition!

@pshirshov
Copy link

linus-torvalds-nvidia.mp4

@phodina
Copy link

phodina commented Jan 25, 2022

Please add wayland support :-)

@pukmajster
Copy link

I hear Wayland is cool.

@CleoMenezesJr
Copy link

Well, we're finally getting something.
Captura de tela de 2022-05-08 19-12-42

@pukmajster
Copy link

It's a step in the right direction for sure

@sachnr
Copy link

sachnr commented Jun 5, 2022

An option to change dithering setting like the one in xorg would be appreciated. The default ones causes weird artifacts currently no option to change it.

@TomPed
Copy link

TomPed commented Jan 10, 2023

Happy to see others talking about this 😄 . @pukmajster, yeah it's a great step forward!

@gilvbp
Copy link

gilvbp commented Jan 16, 2023

Hi everyone, just to remind you all, we need nvidia-settings with the same functionality just like with the x11 version. Thanks.

@ex1tium
Copy link

ex1tium commented Feb 9, 2023

Any progress on this?

@mamaraddio
Copy link

We all are still asking for Wayland support.
NVIDIA come on!

@alexknop
Copy link

PowerMizer settings aren't there when I use Wayland, but are when I use Xorg. Please work to convert nvidia-settings to Wayland.

@PlatinumLucario
Copy link

Is anyone here prepared to make a fork of nvidia-settings and bind all the settings to their respective APIs within a Wayland session, so that all the Wayland compositors will show all the settings in the nvidia-settings application?

@Samir2zk
Copy link

Samir2zk commented Jul 2, 2023

Please, NVIDIA for past cards as well. We need Wayland support. Open source just like the new series the portion of the drivers, at least.

@gardotd426
Copy link

Is anyone here prepared to make a fork of nvidia-settings and bind all the settings to their respective APIs within a Wayland session, so that all the Wayland compositors will show all the settings in the nvidia-settings application?

I actually don't think this is possible, Nvidia Settings uses libxnvctrl for all hardware control. libxnvctrl is an X extension and cannot be modified to work in Wayland no matter what. And Nvidia don't open up their hardware for user-control in sysfs, so you can't just force it. It's actually not possible.

I'm a bit baffled as to why Nvidia aren't even acknowledging this, though. They fully know that Wayland is coming and is going to be the default for pretty much every distro very soon, and they HAVE to allow users to modify fan curves.

@Krovikan
Copy link

Krovikan commented May 13, 2024

I just don't understand how is nvidia-settings not working well under wayland

I understand that is because nvidia-settings is written only for X11 as others programs (like Simple Screen Recorder) that works in X11 and in Wayland refuse to launch if is not X11.

Regards

The reason? I don't know. I am not a programmer.

@BlueGoliath
Copy link

@BugReporterZ

Ideally fan speed control, and also importantly the Coolbits functionality for core/memory overclock could be integrated into nvidia-smi, which AFAIK doesn't need Wayland nor X to function.

Regarding fan speed, I still don't understand how is this still a problem, because NVIDIA is already using the NVML API which doesn't depend on a display server running. Look at the code here: https://github.com/NVIDIA/nvidia-settings/blob/main/src/libXNVCtrlAttributes/NvCtrlAttributesNvml.c#L1578

And, I can already report that the NVML functions added to to drivers higher than 520 work under Wayland. I have also been working on an alternative program (just check my repositories for NVML GPU Control) and at least one user reported that he has it working perfectly on his machine (I am using Windows right now, so I can't test it directly).

So me and NVIDIA are using the same API functions, I just don't understand how is nvidia-settings not working well under wayland already (it should be).

Well, just wanted to share some insight to others reading the issues as this might help someone to figure out the underlying problem.

Wow how did you figure out all that without having proper access to driver code itself?!?!?

@HackTestes
Copy link

@BlueGoliath

@BugReporterZ

Ideally fan speed control, and also importantly the Coolbits functionality for core/memory overclock could be integrated into nvidia-smi, which AFAIK doesn't need Wayland nor X to function.

Regarding fan speed, I still don't understand how is this still a problem, because NVIDIA is already using the NVML API which doesn't depend on a display server running. Look at the code here: https://github.com/NVIDIA/nvidia-settings/blob/main/src/libXNVCtrlAttributes/NvCtrlAttributesNvml.c#L1578
And, I can already report that the NVML functions added to to drivers higher than 520 work under Wayland. I have also been working on an alternative program (just check my repositories for NVML GPU Control) and at least one user reported that he has it working perfectly on his machine (I am using Windows right now, so I can't test it directly).
So me and NVIDIA are using the same API functions, I just don't understand how is nvidia-settings not working well under wayland already (it should be).
Well, just wanted to share some insight to others reading the issues as this might help someone to figure out the underlying problem.

Wow how did you figure out all that without having proper access to driver code itself?!?!?

This might sound a bit silly, but the short answer is: I just read the NVML change logs (look for "Changes between v510 and v515" here: https://docs.nvidia.com/deploy/nvml-api/change-log.html#change-log).

Long answer: I was searching for more than a year what kind of APIs NVIDIA has to control their GPUs. I came across NVAPI (Windows only), NVML (used mostly for professional cards and on nvidia-smi utility) and libXNVCtrl (depends on X11). Then I saw the change logs on NVML and I rushed to make my own software to control the GPUs. Tested on my machine and It worked perfectly! So, it was a bunch of documentation reading and some recent testing.

I was simply tired of GeForce Experience (especially after I found out about the online requirement) and wanted to switch to Wayland Linux (which lacked a way to control the GPU's fan). You can also try out my code if you to verify it better (it is super small so others can verify it in about an hour).

By the way, I have also asked for people on Reddit to help me test it under Wayland (I wanted to check if it worked, before I make any post here). Only 2 guys showed up, but they were super helpful in testing it.

@HackTestes
Copy link

@BlueGoliath

I forgot to mention, I also saw in a GitHub issue a NVIDIA employee talking that they were planning to add many features to NVML, instead of relying on libXNVCtrl (and that was how I learned about the possible importance of the NVML API). I just didn't put this information on the first post, because I couldn't find the issue again (I lost the link).

@Krovikan
Copy link

Long answer: I was searching for more than a year what kind of APIs NVIDIA has to control their GPUs. I came across NVAPI (Windows only), NVML (used mostly for professional cards and on nvidia-smi utility) and libXNVCtrl (depends on X11). Then I saw the change logs on NVML and I rushed to make my own software to control the GPUs. Tested on my machine and It worked perfectly! So, it was a bunch of documentation reading and some recent testing.

Your work is very commendable. But we will all agree that the complete configuration module is needed. That is, this:
imagen

Best regards

@HackTestes
Copy link

@Krovikan

I just don't understand how is nvidia-settings not working well under wayland

I understand that is because nvidia-settings is written only for X11 as others programs (like Simple Screen Recorder) that works in X11 and in Wayland refuse to launch if is not X11.

Regards

The reason? I don't know. I am not a programmer.

I know it was made for X11, but people can already open it under Wayland. There is even a big post on Reddit from some years ago that showed people celebrating this fact. Here: https://www.reddit.com/r/Fedora/comments/sliye1/and_so_the_day_we_can_open_nvidia_settings_in_the/?rdt=56145

I have also seen many posts and issues from various program that can also open nvidia-settings in Wayland.

When I say that I don't understand the reason is because NVIDIA updated nvidia-settings to use NVML (and my tests demonstrate that it already works on newer drivers). I even shared a link to the exact line of code showing the use of NVML.

I am just confused: I see many posts bashing NVIDIA, when support is already in the code. Maybe a leftover check in the GUI? I hope that someone figures it out sooner rather than later.

@HackTestes
Copy link

@Krovikan

Your work is very commendable. But we will all agree that the complete configuration module is needed. That is, this:

Thank you! And I 100% agree with you, we would be on a we better situation if nvidia-settings worked out of the box. My solution is mostly to:

  1. Provide a stop gap solution to the problem of controlling the fans (I got tired of waiting and I wanted a solution ASAP);
  2. Provide a proof of concept (just to show that the API already works);
  3. Provide some features that I find particularly useful (ones that I know nvidia-settings won't ever support).

@BlueGoliath
Copy link

@Krovikan

I just don't understand how is nvidia-settings not working well under wayland

I understand that is because nvidia-settings is written only for X11 as others programs (like Simple Screen Recorder) that works in X11 and in Wayland refuse to launch if is not X11.
Regards
The reason? I don't know. I am not a programmer.

I know it was made for X11, but people can already open it under Wayland. There is even a big post on Reddit from some years ago that showed people celebrating this fact. Here: https://www.reddit.com/r/Fedora/comments/sliye1/and_so_the_day_we_can_open_nvidia_settings_in_the/?rdt=56145

I have also seen many posts and issues from various program that can also open nvidia-settings in Wayland.

When I say that I don't understand the reason is because NVIDIA updated nvidia-settings to use NVML (and my tests demonstrate that it already works on newer drivers). I even shared a link to the exact line of code showing the use of NVML.

I am just confused: I see many posts bashing NVIDIA, when support is already in the code. Maybe a leftover check in the GUI? I hope that someone figures it out sooner rather than later.

Most of the people on Reddit / Github don't even know how to code in Python and just whine excessively about missing features Nvidia already added years ago. Even CTRL + F searching a plain text document is beyond their ability.

nvidia-settings's codebase is probably so tied to X11 and in such a mess that no one at Nvidia is enthusiastic about working on it.

@HackTestes
Copy link

Just for reference, the NVML function that controls fan speed through NVML was added October 12, 2022. See the commit: f213c7b

Search for "DeviceSetFanSpeed_v2".

@BlueGoliath
Copy link

BlueGoliath commented May 21, 2024

Nice. I'm sure Linux's "many" programmers will be releasing a nice GUI GPU utility software any day now.

@HackTestes
Copy link

@BlueGoliath

Nice. I'm sure Linux's "many" programmers will be releasing a nice GUI GPU utility software any day now.

Lol. But jokes aside, someone might have made a GUI app with NVML already (tuxclocker): https://github.com/Lurkki14/tuxclocker

I say might, because I didn't test it or saw evidence that it works on Wayland (aside from a few issues).

@HackTestes
Copy link

On another note, I have found the link of the NVIDIA employee I was talking about (found by accident again): NVIDIA/open-gpu-kernel-modules#262 (comment)

The original comment I am referring to:

I forgot to mention, I also saw in a GitHub issue a NVIDIA employee talking that they were planning to add many features to NVML, instead of relying on libXNVCtrl (and that was how I learned about the possible importance of the NVML API). I just didn't put this information on the first post, because I couldn't find the issue again (I lost the link).

@BlueGoliath
Copy link

BlueGoliath commented May 22, 2024

TuxClocker does not not work because of NVML. TuxClocker does not work because of incompetence, dumb architecture decisions and over complicating things that do not need to be complicated. Everything in NVML works under Wayland just fine. It's a skill issue.

@borgdylan
Copy link

Ubuntu will be defaulting to Wayland for nVidia cards as from the 24.10 release. Fan control is very important for me. Explicit syncas from the 555 driver might fix the flicker issue in chrome based applications. If we get full nvidia-settings working on NVML exposing all needed settings we will be able to ditch X11 in many cases. I have tried Wayland on Intel ARC and the performance is better than that on X11. Imagine what the more powerful cards made by nVidia can achieve under Wayland!

@bentenjamin
Copy link

bentenjamin commented Jul 20, 2024

+1 to please add more settings! I can't use gsync on wayland because I have to toggle "force gsync on unverified gsync compatible monitor" in nvidia settings :( gsync significantly increases my 1% lows and something I really want to use

@kbrenneman
Copy link
Collaborator

GSync (or VRR in general) is something that the each individual compositor has to implement, not something that the NVIDIA driver can control.

The NVIDIA driver can do that in Xorg because it's got a server-side driver module which handles modesetting and scanout. In Wayland, the compositor controls all of that through drm-kms.

@bentenjamin
Copy link

bentenjamin commented Jul 20, 2024

GSync (or VRR in general) is something that the each individual compositor has to implement, not something that the NVIDIA driver can control.

The NVIDIA driver can do that in Xorg because it's got a server-side driver module which handles modesetting and scanout. In Wayland, the compositor controls all of that through drm-kms.

Hmm okay I hear you. Maybe a wrong assumption on my side then.
There have been multiple reports of VRR working; I do understand that VRR is very finicky and I have tried to be meticulous in my setup:

  • KDE Plasma 6.1.1
  • driver 555.58.02
  • single monitor
  • displayport
  • fullscreen
  • screen tearing disabled

After trying these settings with no success, I assume it is an nvidia driver issue as I have to manually enable the “Allow G-SYNC on monitor not validated as G-SYNC Compatible” on both windows and xorg for gsync to work. Am I incorrect and the nvidia wayland driver does not use/need this config for the compositor to control VRR?

@Fxzzi
Copy link

Fxzzi commented Jul 31, 2024

VRR does work correctly for me on Hyprland (wayland) without any extra configuration over what was originally required to make the card work properly. You are right in needing only one monitor connected. With my 2nd monitor attached gsync / vrr fails to function.

@Neo2003
Copy link

Neo2003 commented Sep 15, 2024

I did write a QT application using nvml directly, will post in github in coming days.
We can control fans, overclock and everything implemented by nvidia with nvml.

@Neo2003
Copy link

Neo2003 commented Sep 16, 2024

Let me share the tools I created using QT6.
The goal was not to create a killer app, but provide enough as simple as possible code for anyone to understand how to work with NVML.
https://github.com/Neo2003/nVidia-NVML-QT5-6-tools
Have fun

@BlueGoliath
Copy link

BlueGoliath commented Sep 16, 2024

Let me share the tools I created using QT6. The goal was not to create a killer app, but provide enough as simple as possible code for anyone to understand how to work with NVML. https://github.com/Neo2003/nVidia-NVML-QT5-6-tools Have fun

Nice segfault.

@Neo2003
Copy link

Neo2003 commented Sep 17, 2024

Let me share the tools I created using QT6. The goal was not to create a killer app, but provide enough as simple as possible code for anyone to understand how to work with NVML. https://github.com/Neo2003/nVidia-NVML-QT5-6-tools Have fun

Nice segfault.

Segfault where? Did I miss an allocation?
If there is a problem, maybe better to open an issue on my github.

@Denizantip
Copy link

it's 2024 and the problem still persists.

@BlueGoliath
Copy link

It's 2024 and The Community's "many" programmers haven't fixed this problem.

@Krovikan
Copy link

Maybe...

https://www.phoronix.com/news/NVIDIA-Wayland-Roadmap-2024

@BlueGoliath
Copy link

Nope.

@vkukk
Copy link

vkukk commented Oct 16, 2024

I guess, this is message from nvidia that we all should not use their product.

@XLRUUU
Copy link

XLRUUU commented Nov 23, 2024

It would be nice if the digital vibrance setting was available on Wayland too.

@tordne
Copy link

tordne commented Dec 11, 2024

I just want to give my 2 cents,

I see many people complaining and saying they use X11 instead of wayland, this is unnecessary and causes more issues than solves problems. I've done the following below on all my systems, and I can use external monitors, without immense difficulty.

So if you have installed your nvidia driver correctly , then just create the following file /etc/profile.d/nvidia.sh
Add the following lines to this file

export __NV_PRIME_RENDER_OFFLOAD=1 export __GLX_VENDOR_LIBRARY_NAME=nvidia
reboot and now your system should be using your nvidia graphics card for everything.

you can verify in the terminal with the following codes what your card is doing.

nvidia-smi dmon here you can see if your clocks are adaptive when you open new applications, etc
nvidia-smi, but first open several applications and it should show every application you have opened at the bottom
nvidia-smi -pm 1 this is persistence mode. this should be turned on, to minimise lag.

After years of people begging, don't rely on nvidia to suddenly change their ways.

Nonetheless Nvidia, please you make enough money to actually hire a few good developers to fix this wayland settings problem. Wayland is not going away, X11 is outdated or for minimalist systems, so please put a bit of effort and money in, please, we all like to see some things in a GUI instead of using the CLI for everything.

@sergiotca
Copy link

I just want to give my 2 cents,

I see many people complaining and saying they use X11 instead of wayland, this is unnecessary and causes more issues than solves problems. I've done the following below on all my systems, and I can use external monitors, without immense difficulty.

So if you have installed your nvidia driver correctly , then just create the following file /etc/profile.d/nvidia.sh Add the following lines to this file

export __NV_PRIME_RENDER_OFFLOAD=1 export __GLX_VENDOR_LIBRARY_NAME=nvidia reboot and now your system should be using your nvidia graphics card for everything.

you can verify in the terminal with the following codes what your card is doing.

nvidia-smi dmon here you can see if your clocks are adaptive when you open new applications, etc nvidia-smi, but first open several applications and it should show every application you have opened at the bottom nvidia-smi -pm 1 this is persistence mode. this should be turned on, to minimise lag.

After years of people begging, don't rely on nvidia to suddenly change their ways.

Nonetheless Nvidia, please you make enough money to actually hire a few good developers to fix this wayland settings problem. Wayland is not going away, X11 is outdated or for minimalist systems, so please put a bit of effort and money in, please, we all like to see some things in a GUI instead of using the CLI for everything.

I appreciate the candor, but just throwing environment variables at your system is not a solution for not having a proper GPU settings panel. Also these doesn't even apply for people not using hybrid graphics. Remember, not all systems are built equal.

Honestly, Nvidia just needs to step up their game and allow Linux users to experience all the features we paid for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests