Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is it still the case that Nvidia drivers don't work with Wayland?


The question is flawed, but I get what you mean.

Wayland the protocol has very little to do with graphics drivers (it's just about getting window content to compositors). It's just that the display server (X server or wayland compositor) uses a set of agreed upon kernel APIs (DRI) to render and display things on the screen, which Nvidia refuses to fully implement (GBM vs.EGLStreams). The X server has extra code to support this, but many wayland compositors don't. Semi-recently Nvidia (in the form of Erik Kurzinger) has started contributing such special treatment code to Gnome and KDE. A major hold out is wlroots, the maintainer of which refuses special handling code for proprietary components (https://drewdevault.com/2017/10/26/Fuck-you-nvidia.html), but recently there has been a 3rd party contribution for an EGLStreams backend.

Additionally the Xwayland team are right in the middle of merging code to allow specific acceleration of XWayland windows and Nvidia and the wlroots team are working on building a new memory allocation solution based on Vulkan that will hopefully finally solve the EGLStreams debacle once and for all.

So: It kind of works and is improving fairly rapidly.


Yes, but the patch by Erik Kurzinger from Nvidia may soon be merged [1].

It still requires changes to Nvidia's proprietary drivers that I think have not been done, but it maybe that this year it will be settled.

Edit: Also it maybe that the Ubuntu choosing Wayland maybe what pushed the Nvidia forward? [2]

[1]: https://www.omgubuntu.co.uk/2021/01/ubuntu-21-04-will- use-wayland-by-default

[2]: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests...



The short version is "it depends". Essentially, each separate Wayland compositor needs to add support for the nvidia driver (or the driver needs to support more standardized APIs).

Gnome and KDE support Wayland on nvidia hardware (though it's a bit rough around the edges). Wlroots (and therefore Sway) doesn't because they don't want to have a separate code-path for one driver which doesn't want to support standards and because the APIs the driver does support wouldn't work well with the code model of wlroots.


Nvidia works with wlroots if you use nouveau and not the proprietary drivers.


As much as I appreciate Noveau, it's not really practically usable with recent cards (due to Nvidias faults!).


It's probably not relevant in the long term anyway. I expect desktop Nvidia usage on Linux to pretty much plummet while their driver remains a blob. The trend is negative for them already.

So I fully support wlroots developer's approach to it - show Nvidia to the door until they come back with upstreamed driver.


I don't expect them to ever work properly. Basically, if you care about good Wayland user experience and proper desktop integration, you should be using AMD or Intel GPU already.

Waiting for Nvidia to fix this mess is pointless. Nvidia will be DOA as long as they refuse to upstream their driver or to support Nouveau to begin with. And they didn't show any interest for years.


For Nvidia this is not a mess; they support X for their supported use-cases and that's just it, and X works pretty much perfectly for me now, even PRIME is essentially issue-less. I give them a lot of credit for making Nvidia GPUs in laptops on Linux as viable as on Windows.


PRIME is working for you? How? I couldn't get it working at all. Are there any guides for this?


This chapter of the NV driver manual details how: https://download.nvidia.com/XFree86/Linux-x86_64/460.56/READ...

On Turing and later, you can also enable this: https://download.nvidia.com/XFree86/Linux-x86_64/460.56/READ... to totally turn off the dGPU when not in use.


It is a complete mess due to their inability to properly support kernel interfaces. Their driver is a blob and it's the source of all their problems with integration. Nothing stopped them from upstreaming it a long time ago but they prefer keeping the mess to doing things right.

PRIME doesn't work because they only implemented it half way. After decades of not implementing anything that is. I call such level of support complete garbage.


There's not a lot of options in the workstation space other than NV drivers on X11. As long as nouveau continues sending illegal instructions to cards and crashing Quadros on startup, it's a non-starter. Xeons don't include a GPU, so you'll need to add an RX 2100 to the system instead of another A100 or RTX Titan. It can be done, but I don't see RX 2100s having a place in our machines anytime soon.


The best option if you need modern Linux desktop is to ditch Nvidia and to switch to AMD.


For compute as well? Maybe once ROCm is actually supported by their newest cards, but this two-year lag on compute support does not inspire confidence. Neither Navi nor Big Navi are supported -- the last card with ROCm support is Vega.


Will a little stupid, you could add an AMD card to your workstation and use that to drive your display. Then use the Nvidia card for compute only. That would also free up some memory and compute resources on the Nvidia card.

You can even get an old model of the AMD card. It only need to run the desktop stuff, so you can buy a five year old used card.


Support is better in latest cards, but they are still lagging behind for scenarios like Blender and etc.


For compute, you don't need the desktop, so the Wayland vs X11 debate is moot.


I dunno... Blender, video editing, etc. usually require a desktop.


That's not what it is mostly used for, i.e. ML-like workloads.

OpenCL (that's what Blender, DaVinci Resolve, etc use for their acceleration) is a layer above ROCm, and it runs. Not very nicely, but it does and is supposed to receive more attention in future.

Also, you can still use one gpu for desktop and other for compute.


Nvidia have been extremely bad to work with in the past (hasn't Linus said something about this?), but their recent efforts are giving me some hope. They seem somewhat interested in supporting the Linux desktop nowadays.


I don't think they are interested a lot more. Same glacial pace of support. I don't expect it to improve until their driver will be in the upstream kernel.

There was some brief announcement about some kind of open sourcing news a while ago which could be it, but nothing came out of that.

So you can still apply the take of Nouveau developers themselves - simply use AMD.


Easier said than done, given it's nearly impossible to buy AMD GPUs at the moment (and has been for a while now)


That's a good point, but applies equally to Nvidia which is also impossible to buy. I'm myself waiting to get a new AMD GPU.


Indeed, I was planning on updating my graphics card this year. Looks now like it'll happen maybe in 2022.


I believe with the 470 driver series that's coming out soon things are looking a lot better[1][2].

[1] https://www.phoronix.com/scan.php?page=news_item&px=NVIDIA-4...

[2] https://www.phoronix.com/scan.php?page=news_item&px=NVIDIA-4...


Not exactly. I m successfully using Fedora SilverBlue with proprietary nvidia in Wayland. In the official docs it's not supported but Mutter (from Gnome) has the pieces in place to do so. However I don't use anything too specialised that would force me back to Xorg. For example I did revert to Xorg while I played around with lutris a bit. Still as long as distro maintainers don't declare official support, be ready to expect surprises.


It works but the experience was suboptimal. Usable but much slower than x11.


Nvidia is basically dead at this point, no support for standards that have been around for years. And now they are including malware in their cards to slow down unapproved calculations.


> Nvidia is basically dead at this point

As of this morning's Nvidia's market cap ($320B) is bigger than AMD's ($100B) and Intel's ($255B).


CUDA is an industry standard, and AMD's lack of support is why NVIDIA enjoys a monopoly in the deep learning community.


It's proprietary. People being vendor-locked into a proprietary thing doesn't mean everyone can or should support it.


Is this due to CUDA being a technically superior product, or is it just that it's entrenched?

OpenCL/AMD is a usable and mature platform, right?


OpenCL as implemented by AMD is definitely not very usable.

AMD themselves aren’t really committed to OpenCL given the state of their OCL 2.x drivers and went to their own AMD-only path (ROCm/HIP), which is broken... (and only supported on a single gen of customer GPUs today, Vega) It doesn’t even work on RDNA or RDNA2 officially today.


I've been told that OpenCL is in a whole different league than CUDA due to a worse API and much smaller ecosystem.

I have, however, seen attempts to use Vulkan for compute. Could that be a viable way forward?


I'd say OpenCL is a pretty good API, it's just that because it's in C and it allows for quite fine-grain control, it takes a bit of orchestration to get anything off the ground. If you want more convenience, there are a few wrappers for it, in various languages.

It's true that its ecosystem is sadly lacking.


Using Vulkan for compute is still a much worse developer experience, it isn't really a reasonable alternative.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: