Sway 1.0 is not going to support the Nvidia proprietary driver
drewdevault.com
drewdevault.com
The main point that Martin made back then:
> Overall we are not thrilled by the prospect of two competing implementations. We do hope that at XDC the discussions will have a positive end and that there will be only one implementation. I don't care which one, I don't care whether one is better as the other. What I care about is only requiring one code path, the possibility to test with free drivers (Mesa) and the support for atomic mode settings. Ideally I would also prefer to not have to adjust existing code.
KWin though has the benefit of supporting X11 which Nvidia blob users can rely on. Wayland only compositors are really in a tough spot, until this mess is resolved.
1. https://blog.martin-graesslin.com/blog/2016/09/to-eglstream-...
[1]: http://swaywm.org/
[2]: https://en.wikipedia.org/wiki/Wayland_(display_server_protoc...
[3]: https://en.wikipedia.org/wiki/Compositing_window_manager
(Note: I have written very little Wayland-related code, and quite some time ago, so do not put too much faith in the explanation below).
Managing device-accessible surfaces is very obviously hardware-specific, so it was abstracted behind a number of mechanisms. One of these is the GBM API, which is implemented (classically) by everyone except NVIDIA, and is the API that sway is going to use.
NVIDIA's proprietary drivers do not support GBM, and NVIDIA is pushing for its own solution called EGLStream. EGLStream does solve several problems that GBM has, but it seems to me that what makes it most attractive to NVIDIA is that it is theirs (it is an open standard but has only one serious commercial implementation, on a single vendor's devices, so at this point it might as well be closed). If you are curious, there is a wider discussion on the topic here: https://lwn.net/Articles/703749/ .
As painful as it was, I managed to get my machine working. But it led me to never trust an Nvidia chip for my Linux desktop ever again. I wish I had documented the insane finagling I had to perform just to get my machine in a workable state. Maybe a year later, I encountered another Nvidia issue on my Ubuntu laptop, and I posted my notes on a blog: http://www.lukeswart.net/2014/05/nvidia-optimus-with-bumbleb... I wonder how many aspiring computer professionals have quit because of the barrier in getting a Linux desktop to run smoothly.
I am indebted to the community members who devote their time and expertise online to help Linux desktop users. Even if they can be a little snarky :-) If someone is learning to program and only has a hand-me-down laptop with an Nvidia gpu, then a Linux desktop may be the only reasonable option. I just hope this can be more accessible. But as the author points out, Nvidia is only making this problem worse.
Every week or two I'd reboot my machine for whatever reason, and it would boot load a minor point release kernel update,and X would fail, and I'd have to go manually recompile the nvidia drivers for my kernel and then I could start X again and then I could get back to work. It was one of those things that would add twenty minutes to your workday for no really good reason other than Dell had shipped nvidia chips.
This was made doubly frustrating for a coworker who had a habit of bumping into her computer and hitting the power button with her foot (a giant, easy-to-hit target right in the centre of it). It would reboot and, surprise, go rebuild your kernel module so you can use X, while you're in the middle of helping a hospital get the x-rays of a patient so they can get him into emergency surgery.
Personally, I got used to it. I'd reboot intentionally every however often so that I could deal with it on my own terms, but it was such a hassle that I always wished for an AMD or Matrox card so I wouldn't have to deal with their BS.
"relatively recent"?
I think the current issue with nvidia is they are refusing to support the new wayland stuff and ditch X server. In that case, I've got my eye on an ATI RX460.
[0] https://packages.debian.org/stretch/nvidia-driver [1] https://packages.debian.org/stretch/nvidia-kernel-dkms
However, for laptops and any other machine where graphics power is not a high priority, I just stick with basic integrated graphics, they do seem to behave better in regards to suspend and other power management.
Had all those same problems with an ATI-chipped laptop.
Your problems were not nvidia-specific.
Also: Windows has supported bash for a very long time - under Cygwin. (also Cygwin used to have pretty decent community support, back in the 1990's).
I'll say this also: Ubuntu is probably the EASIEST distro to get into a working state; with either Nvidia or ATI. (the proprietary drivers have their warts - but the worst are in their installers) ... (as long as you aren't itching to get special features working, like power management, or switching, etc - those things DO work, and CAN be made to work, with given chipsets, and kernels, and driver revs - if you're smart, and lucky... for the rest of us, there's the open source drivers, which are generally pretty good, and have gotten MUCH better over the past 10 years).
If you can buy a laptop that is known to work that is best. If you have existing hardware then it is sort of a crapshoot.
Desktop is easier. Just stick to intel (CPU, iGPU, ethernet, and wireless) and you will have no problems at all, and even with some realtek and broadcom stuff thrown in it usually works.
When I went to engineering school I used Nvidia with linux and worked flawlessly. It was the best vendor by far, because they needed to support Linux for Pixar and other guys.
Now it is the other way around, basically because of Nvidia success. They have a monopoly on practice and could do whatever they want.
They only care about Windows. We have Vulkan, Metal, OpenGL and DirectX backends for our software. We only debug in DirectX with Nvidia because it is the only thing they support well.
If we could get rid of Nvidia for most of what we do, like Apple did, we will without a doubt.
So you probably was just unlucky and ended up in the only fully unsupported case that has happened with Nvidia and Linux in the last decade (at least as far as consumer GPUs are concerned anyway). I did the same and i was annoyed by Nvidia, but after searching a bit i learned that they did try to support Optimus on Linux initially, but some developer refused to allow them use some symbols (or something, i'm not 100% into kernel development) in his code under a license that was compatible with their driver. So they dropped it.
I think they did something with Bumblebee some time later, but last time i used Bumblebee was incredible slow compared to Windows (whereas in my other machines Linux and Windows have the same performance in OpenGL) so i never tried that myself. That laptop remained a Windows-only machine.
But yeah, beyond that for me Nvidia was always pretty much the only choice exactly because of their Linux support. Although i might consider AMD at some point if Mesa implements GL_ARB_compatibility and compatibility profilers properly (i used to think this wont happen, but AFAIK there was recently some work towards the former, so who knows).
Now, for GL compatibility profiles, if they cause problems, are obsolete and intentionally not supported, better we are off.
We need more projects to do what Sway and Kwin have done.
Please don't take this as a criticism of you personally though, I'm just venting and worried about how I'm gonna fix a work relationship that I care about that I damaged because I was angry
I do the 9-5 developer thing and enjoy it very much, but I would probably lose my shit if I constantly had random strangers emailing me on my personal accounts demanding help.
I joke to myself that I would be the worst floss maintainer in the world and immediately reply to every feature request with an hourly charge out rate.
Yes, I was talking about hackintoshes that don't have AMD support for some reason.
Specifically I was talking about this hardware guide:
https://www.tonymacx86.com/buyersguide/october/2017/#Graphic...
Telling people they are wrong, or idiots, or entitled, is probably the quickest way to alienate them and lose all support instead of gaining it.
Bottom line, just admit it, you hate anything that is not 100% open source, which is your opinion and right to do, but that doesn't make it the only option and if Nvidia provided a solution that allows you to work with their GPUs, it is you that is wrong here. They are the bigger fish, thus they get to eat you or at least push you around. Basic life lesson.
You would have been much better off writing an article simply asking for a few passionate Nvidia user that wish to take over Nvidia support if they would like to see it continue to work in Sway. Instead, you write an article that alienates the entire user base. That's a pretty shitty thing to do and a reason people seem so unwilling to work with a lot of FOSS maintainers, because the truth is, they act like the entitled ones, as your article clearly does about you.
1. http://hexus.net/tech/news/software/105895-vulkan-opencl-wil...
With Windows users NVIDIA know that they want pretty games and they want them prettier very year, and they also know that Microsoft is probably going to work with them to make that happen. They've also got game developers and hardware vendors lining up to get NVIDIA logos on their products.
Whereas in Linuxland, they've got a kernel, a billion side-projects that may or may not be widely used and they all want NVIDIA to conform the THEIR way of doing things, an angry Finnish gentleman who just shouts and swears at things he doesn't like, and a largely non-gaming and very fragmented user base that could be using any number of desktop environments/kernel versions/drivers etc. On top of all that, this menagerie only accounts for about 3.8% of the desktop market. And they're also kicking and screaming that NVIDIA isn't doing enough to support the things that they want to do.
Sure NVIDIA could be working faster to better support Linux by throwing more people and money at it, but they don't have to and until more people use Linux they don't really have much of an incentive to do so. They'll probably have better Linux support, eventually, and if that fits in with their business plan then that's fine. If you're a Linux user and NVIDIA doesn't do what you want it to do, then that's fine as well - vote with your wallet and buy from someone else.
That's exactly what's happening. But the other side of the coin is, that in order to switch, the other choice should be good enough. Until recently, AMD had too many downsides, that many were ready to suffer through Nvidia's problems. But that is changing now.
You can observe the trend here (it's not a big sample yet, but it's still showing the trend): https://www.gamingonlinux.com/users/statistics#trends
Note: you need to click "trends" there to display change over time.
Nvidia are toxic arseholes whose business practises are on a par with 90s Microsoft - funding games studios to deliver crippled-on-AMD games, for example. They deserve bankruptcy, not sympathy.
There is one big elephant in the room here that you are missing and that is GPU computing. This is probably a big market for them now (Teslas go for a couple of thousand a pop) and the vast majority of it is on Linux. Their ecosystem with CUDA and CuDNN is pretty awesome, on the other hand, their driver has issues.
At any rate, it's a market that they cannot afford to lose. As OpenCL support for e.g. machine learning libraries such as Tensorflow is progressing they may not have a lock on the market as they have now.
I wonder if the complex OpenCL API throws off many ML developers. Also I think they tend to focus on CUDA because there is much less chance of it breaking between devices. OTOH, each vendor has their own .so for OpenCL and they usually tend to be buggy and stay a point version or two behind.
This is the explanation I tell myself when I wonder why the hell Google chose CUDA over OpenCL.
Nvidia has their own OpenGL implementation that replaces Mesa so if you do OpenGL on Linux with Nvidia you are not using Mesa. Which is a good thing since Mesa is lacking in terms of features compared to Nvidia's implementation.
Mesa is open-source. Nvidia can submit patches at any time they want.
Ironic statement, given that the article is specifically about how Nvidia proprietary drivers are lacking in features compared to the Mesa stack.
It sure as hell isn't going to be Nvidia who hold all the cards as far as CUDA based computing goes.
People who want to use this tech will go where the tech is, people even switch away from Mac to Windows to access this tech.
- Mahatma Gandhi
I think it's extremely important to express our dissatisfaction with nVidia, and strong language makes the point across. Sometimes people don't take your complaints seriously if you're too polite; (maybe because politeness signals impotence?)
There are compromises you can make, most of them easy. None of this is my problem as the maintainer of Sway.
So, in short, you're firing your Nvidia users? Sometimes it has to be done, but you'll have to be very clear that you don't want Nvidia users.
Passive-aggressive attacks in an indirectly linked blog post against the userbase and Nvidia themselves are not sufficient, you will have to just be explicit about it in your GitHub README.
Also, this article contains pretty forwardly agressive attacks, I think.
That said, if I were Nvidia, and the post was an example of "cooperating" and "working" with the Wayland developers, I don't think I'd go out of my way to cooperate.
You can certainly make the swap and the sentence still makes sense and is factually correct, but the context matters.
>That said, if I were (the Wayland developers), and (witnessed how Nvidia is) "cooperating" and "working" with (us), I don't think I'd go out of my way to cooperate.
Is also a valid point.
Do you mean cuda as a language v/s the latest opencl spec as a language, or implementations ? No one other than Intel is even implementing and updating OpenCL really, and nvidia will always push CUDA over opencl for lock ins. Which is kind of the same thing as every other argument that you can make for nvidia.
>nu-uh, I quit!
Upon thinking about this, it's kind of like listing dependencies. I think you should make it clear in the README. I don't think the blog post is relevant in this context, as people likely won't read your blog post before installing Sway (and how would they know to do so, anyway?).
Not anymore. AMD/Mesa are already competitive enough, and are getting better fast. I was using Nvidia myself as well, until around the time Polaris cards came out, and Mesa was bumped to 17.x. That's when things really started to get good with AMD.
And in the overall integration sense, it's like night and day. Nvidia is never going to reach it with their blob approach. Seamless upgrades, proper framebuffer, proper KMS/DRM, no constant screen tearing, Wayland support, GALLIUM_HUD, you name it. I wouldn't go back to Nvidia now (and I do all my gaming on Linux).
Why is that? What prevents you from using open APIs like Vulkan for GPGPU? Unless you rely on some CUDA only middleware of course.
CUDA is not as dominant as it was at first now that there are serious alternatives, but Nvidia works hard (both carrot and stick) to keep you locked in. And their hardware and software tools genuinely do have great performance, even if they should be better if Nvidia was a bit less... well evil honestly.
Using anything but Nvidia for deep learning is a great idea if you want to get noticed for not using Nvidia for deep learning, but it wouldn't be the smart thing to do if you want to actually get something done.
It worked great for me, and given Nvidia deliberately de-rate their support for OpenCL to push CUDA, I feel it's important to signal with your money that given the choice between flexible and open standards vs. proprietary, I'll support openness.
I remember seeing that scroll by on my Gentoo install about 15 years ago. This strange sentence actually got me reading deeply into the what and how of open source. I have been hoping for a nice Nvidia Open source driver since... Until Intel took that away, I'm not a gamer/deep learner so I always opt for Intel integrated graphics nowadays, saves money, hassle and power.
I always believed that if AMD/ATI got their S together and made a super nice open source driver they'd make a lot of money! Guess I've always over estimated the Linux users' market share.
https://lists.freedesktop.org/archives/dri-devel/2016-Octobe... https://github.com/cubanismo/allocator
This is far from the truth. This is a piece of code that everybody has wanted for the longest time (surface allocation is far from a solved problem), the solution was discussed with the nouveau developers at XDC2016 and XDC2017. People from ARM and Red Hat have both contributed to the project.
https://www.x.org/wiki/Events/XDC2016/Program/jones_unix_dev... https://www.x.org/wiki/Events/XDC2017/Program/#james_jones
> When people complain to me about the lack of Nvidia support in Sway, I get really pissed off. It is not my fucking problem to support Nvidia, it’s Nvidia’s fucking problem to support me. Even Broadcom, fucking Broadcom, supports the appropriate kernel APIs. And proprietary driver users have the gall to reward Nvidia for their behavior by giving them hundreds of dollars for their GPUs, then come to me and ask me to deal with their bullshit for free. Well, fuck you, too. Nvidia users are shitty consumers and I don’t even want them in my userbase. Choose hardware that supports your software, not the other way around.
Now, contrast with [1]:
> I first heard about this from one of the developers of the hit game SimCity, who told me that there was a critical bug in his application: it used memory right after freeing it, a major no-no that happened to work OK on DOS but would not work under Windows where memory that is freed is likely to be snatched up by another running application right away. The testers on the Windows team were going through various popular applications, testing them to make sure they worked OK, but SimCity kept crashing. They reported this to the Windows developers, who disassembled SimCity, stepped through it in a debugger, found the bug, and added special code that checked if SimCity was running, and if it did, ran the memory allocator in a special mode in which you could still use memory after freeing it.
[1] https://www.joelonsoftware.com/2004/06/13/how-microsoft-lost...
On the other hand, a polite refusal to support EGLStreams may not have moved the needle enough to reach the front page of HN.
How did you come to that conclusion? SirCmpwn doesn't maintain Wayland Nvidia support, just the Sway Compositor. If you want a Wayland compositor that supports Nvidia-proprietary, you can use GNOME.
What am I missing?
If someone offers to paint your fence for free, and your fence has some really nasty angles at some point, would you say the volunteer was unprofessional if they said "yeah I'm not going to paint that part"?
Guess what: if you ask your local Catholic priest to give sermons for your weird sect, he'll probably refuse too. And if lots of people keep insisting, it's not surprising he gets annoyed.
Ironically, that's exactly what Microsoft has been saying about Linux during those bad old days. Linux was successful because its developers didn't say "If you want to talk to a professional, buy something else."
I'm not saying an OSS developer should bend over and take abuse from users. But I believe there's a line between that and calling users "entitled brats" just because they use vendor-supplied drivers for their $500 cards.
Except, the reason why Microsoft was wrong was that Red Hat existed. If you're running CentOS or Arch Linux or something, you really are fucked as a business. The key distinction here is that SirCmpwn is not a Red Hat dev, so should not be expected to meet the responsibilities of one.
That's weird. Professionalism should be expected in all aspects of life. That's basic human respect.
https://finance.google.com/finance?q=NASDAQ%3AMSFT&fstype=ii
With this:
I believe I read about this phenomenon here https://www.gamedev.net/forums/topic/666419-what-are-your-op...
Overall, all the hardware in the laptop is now working perfectly, and has been extremely stable. It took a long time, but I'm glad it's finally working using the proprietary drivers. Unfortunately, I haven't gotten this to work yet using nouveau. I'm currently running Mate and XMonad on X, and I have a feeling it's going to be a few more years before I will be able to run Wayland on this machine.
Another note, a window manager author shouldn’t have to deal with these sorts of issues. Puts into question the “wayland way.” I guess this is what wlc and wlroots are for but seems like those approaches have flaws given there was a need for wlroots to even exist in the first place.
You also seem to have missed the whole point of wayland's design. There is no separation between "window managers" and "display servers"; there are just "compositors". So naturally it is something that needs to be dealt with. wlc, libweston, wlroots (for which I am an author, responsible for the DRM/GBM code), etc., are designed to make it easier to write compositors and allow for more code reuse. So yes, someone using one of these libraries wouldn't need to deal with these details, but we're actually writing such a library.
I think the point is that this design is bad.
There were also open source drivers, which worked quite well, but they weren't even close in terms of performance. (Intel has always played nicely, and their official GPU drivers are open source and work well. Their performance falls into this same category.)
Recently, however, AMD has replaced its proprietary driver with a new, open source, high performance driver. AMD is now a serious choice. Sadly the tables have turned, with NVIDIA holding back progress on Wayland by not cooperating with the community.
Last I checked it was only in a mesa dev version. But it would be a standard hopefully everyone using Vulkan can support
i3 uses X11, which is old and crusty and not particularly fast.
Wayland is also a standard, that should be running on a stack of other standards (DRM, GBM, etc.), but then Nvidia comes along and goes "Fuck GBM. I'll make my own, incompatible "standard"".
On Wayland the "window manager" (compositor) has to provide both the mechanism and the policy.
Watch out, we have a wannabe Linus over here!
Wayland, systemd, heck, that they removed ifconfig - these are all changes I understand and welcome from a technical POV, but that lose me as a user. The pinnacle of desktop linux was around 2009, afterwards usability seemed to regress. I'd love to use Linux, but currently I feel more comfortable on Mac or Windows.
Doesn't help that leading projects on the linux desktop often have such abrasive developers.
----
[x] I tried them, but I found they are not really for me:
- I need something that passes the coworker or girlfriend test: Other people should be able to sit down and use my computer.
- Keyboard shortcuts don't actually make me faster. I find personally there is a lot of cognitive load trying to remember the keys to press, even after a lot of practice. I like to offload this to my eyes and arms, and use a mouse to e.g. arrange windows. That is the reason I gave up and now use arrow keys in VIM, and VS Code when possible.