Announcement

Collapse
No announcement yet.

Ubuntu 22.04 LTS Changes Default For NVIDIA Driver Back To Using X.Org Rather Than Wayland

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Originally posted by treba View Post

    - the issue is about Xwayland / backward compatability, not native Wayland clients.
    - is related to implicit vs explicit sync.
    While the referenced issue is specifically about Xwayland, the lack of implicit sync support in the nvidia drivers affects native Wayland clients as well.

    Implicit sync has been a major pain point for Wayland compositors,
    Not sure what you mean by that. Implicit sync is surely easier for compositors than explicit sync — the former allows skipping all the explicit handling required by the latter, after all.

    including the famous "cursor only updates at game refresh rate" problem.
    That is arguably more of a KMS API limitation. For the time being, compositors can work around it by submitting only idle scanout buffers together with cursor updates (which is one effect of my mutter MR). No passing of explicit fences over Wayland/X11 protocol required. Note that contrary to what one might expect, explicit sync doesn't even help for this, but is actually again harder to handle than implicit sync.

    I.e. IIUC this is purely about missing legacy features in either X or the nvidia driver - while the architecture for the future is already in place.
    The architecture for explicit sync over X11 isn’t in place yet, otherwise that issue wouldn’t exist.

    Comment


    • Originally posted by mdedetrich View Post

      Implicit sync by definition is shit and outdated, this is a fact that even Linux kernel developers admitted (hence the lkml article created by a mesa developer). There is now an ongoing effort to fix this problem and NVidia said they will provide full support when Linux properly supports explicit sync (which actually some Linux kernel devs begrudgingly agreed).

      BTW this implicit sync is causing lots of issues in the Linux kernel that is completely unrelated to NVidia, for example Linux is having issues with Vulkan because just like the NVidia driver it has a proper modern design that only supports explicit sync.



      I wouldn't create a driver in Nvidia's position either, they are being told to rewrite their entire driver to an outdated design just to satisfy stubborn Linux dev's that can't admit their they are using an outdated design from the 90's.
      Per https://gitlab.freedesktop.org/xorg/...7#note_1358237 , in a nutshell:

      * Explicit vs implicit sync isn't all or nothing, either can be used depending on the use case.
      * For the particular use case of sharing buffers between clients and display servers, explicit sync cannot provide any tangible benefit over implicit sync.
      * To support implicit sync enough for correct operation of this use case, the nvidia driver should require only minor changes, certainly not a rewrite.

      Comment


      • Originally posted by mdedetrich View Post
        Implicit sync by definition is shit and outdated, this is a fact that even Linux kernel developers admitted (hence the lkml article created by a mesa developer). There is now an ongoing effort to fix this problem and NVidia said they will provide full support when Linux properly supports explicit sync (which actually some Linux kernel devs begrudgingly agreed).
        All of this tech detail I think is confirmed, it doesn't put Nvidia in a good light the way you think it does though. Particularly the bolded part.

        In a lot of ways, it feels like Nvidia is dragging on purpose, and hurting its customers along the way. I suspect it's not what you meant, that "well Nvidia will provide support when and only when they get their way" but at the end of the day that's how its playing out. It's almost fair to say that the no-support/no-GBM Nvidia driver was superior to what we have now with a half-beta solution.

        Originally posted by mdedetrich View Post
        BTW this implicit sync is causing lots of issues in the Linux kernel that is completely unrelated to NVidia, for example Linux is having issues with Vulkan because just like the NVidia driver it has a proper modern design that only supports explicit sync.

        I wouldn't create a driver in Nvidia's position either, they are being told to rewrite their entire driver to an outdated design just to satisfy stubborn Linux dev's that can't admit their they are using an outdated design from the 90's.
        Then Nvidia should have never put out GBM driver 495 series. They should've pulled a reverse Linus and put their middle finger up and stayed where they were at since they were already there. (minus the middle finger)

        Instead, a half driver - that doesn't even work with SDL2(Wayland) for crying out loud - a gaming video card from a gaming company that apparently didn't even test with a gaming API - I mean, really. This can't possibly have passed even basic corporate testing. This is alpha quality and it is an insult to the customer. SDL isn't some funky quirk of an API that's barely used that nobody but their second uncle ever heard of. A lot of games use SDL.
        Last edited by ezst036; 27 April 2022, 09:53 PM.

        Comment


        • Originally posted by ezst036 View Post

          All of this tech detail I think is confirmed, it doesn't put Nvidia in a good light the way you think it does though. Particularly the bolded part.

          In a lot of ways, it feels like Nvidia is dragging on purpose, and hurting its customers along the way. I suspect it's not what you meant, that "well Nvidia will provide support when and only when they get their way" but at the end of the day that's how its playing out. It's almost fair to say that the no-support/no-GBM Nvidia driver was superior to what we have now with a half-beta solution.
          You do know what the alternative is right? They would have to recode a giant portion of their driver for it to be thrown away again. It actually doesn't make any sense no matter how you try and justify it


          Originally posted by ezst036 View Post
          Then Nvidia should have never put out GBM driver 495 series. They should've pulled a reverse Linus and put their middle finger up and stayed where they were at since they were already there. (minus the middle finger)

          Instead, a half driver - that doesn't even work with SDL2(Wayland) for crying out loud - a gaming video card from a gaming company that apparently didn't even test with a gaming API - I mean, really. This can't possibly have passed even basic corporate testing. This is alpha quality and it is an insult to the customer. SDL isn't some funky quirk of an API that's barely used that nobody but their second uncle ever heard of. A lot of games use SDL.
          That's not how it works because of the design difference between X11 and Wayland. With X11 you have almost all of the control of the graphics stack which means that it was less of an issue because NVidias X11 implementation internally is completely explicit sync and only has to go to implicit once.

          On the ither hand with Wayland, by design, there are a lot of moving parts between the Linux graphics stack/kernel and NVidias driver is actually only a small moving part.

          Comment


          • Originally posted by MrCooper View Post

            Per https://gitlab.freedesktop.org/xorg/...7#note_1358237 , in a nutshell:

            * Explicit vs implicit sync isn't all or nothing, either can be used depending on the use case.
            * For the particular use case of sharing buffers between clients and display servers, explicit sync cannot provide any tangible benefit over implicit sync.
            * To support implicit sync enough for correct operation of this use case, the nvidia driver should require only minor changes, certainly not a rewrite.
            And there is already a response from NVidia stating technically why that's not possible they would have already done it if it was as easy as described by Michel.

            You can already tell in the response by James how ridiculous the workarounds are, i.e. if you are at the point of putting fences everywhere you may as well just put explicit sync everywhere.
            Last edited by mdedetrich; 28 April 2022, 04:38 PM.

            Comment


            • Originally posted by mdedetrich View Post
              You do know what the alternative is right? They would have to recode a giant portion of their driver for it to be thrown away again. It actually doesn't make any sense no matter how you try and justify it.
              That's what they should have done years ago, yes, and that would've been absolutely justifiable for a large recode because it would've seen use for a decade or more. At this point, now, no, it may not make sense. AMD devs(Marek) floated the idea of explicit but who knows where that effort is currently at. But you really shouldn't act like today is today and it's all brand new and nobody ever heard of any this before. This stonewalling began at least at XDC 2014.

              Does Nvidia actually contribute upstream? I don't think they used to. Or is the long slog toward getting implicit changed to explicit being done by Intel and AMD and Mesa devs?(And probably Valve)

              Originally posted by mdedetrich View Post
              That's not how it works because of the design difference between X11 and Wayland. With X11 you have almost all of the control of the graphics stack which means that it was less of an issue because NVidias X11 implementation internally is completely explicit sync and only has to go to implicit once.
              Yes. I know, Nvidia holds Wayland back in favor of X11 because it benefits them. That's plain for anybody to see. It does sound less and less to me though like this is as new of an issue even with Wayland or GBM, since as you indicated Nvidia's driver re-implements X11 internally.

              Here is what would make sense though. Nvidia should step up and directly take as maintainer of X11 in the mean time. They're the main beneficiaries, and they're the main ones holding everybody back since XDC 2014. Why shouldn't they pay the piper after all these years?

              Especially since their driver has a partial internal re-implementation of X11, as you indicated. So they're already maintaining it anyways, they're just doing it in an out-of-tree way. Why not be a good community player about it instead of the existing walled garden? It actually wouldn't change one thing at all, except, the doors to the garden would now be open.

              Perhaps that's just too much to ask.

              Comment


              • Originally posted by ezst036 View Post

                That's what they should have done years ago, yes, and that would've been absolutely justifiable for a large recode because it would've seen use for a decade or more. At this point, now, no, it may not make sense. AMD devs(Marek) floated the idea of explicit but who knows where that effort is currently at. But you really shouldn't act like today is today and it's all brand new and nobody ever heard of any this before. This stonewalling began at least at XDC 2014.

                Does Nvidia actually contribute upstream? I don't think they used to. Or is the long slog toward getting implicit changed to explicit being done by Intel and AMD and Mesa devs?(And probably Valve)
                I agree about the point on NVidia coding upstream but I suspect its not as easy as you make it out to be for the following reasons

                1. NVidia is seen as "evil" by a lot of Linux community so they are already disadvantaged from a relations which is much more critical when you are advocating for wide sweeping changes
                2. if I would stereotype, Linux developers generally speaking are stubborn and dogmatic which usually works out but in the current case it evidently didn't.

                Ultimately the point is that NVidia would need buy in to do any of the necessary changes from the Linux community and they did not. And its not like Nvidia doesn't contribute to OS, they do and in some areas quite significantly (you can even search Phoronix articles on this), it just gets conveniently ignored in these discussions.

                Originally posted by ezst036 View Post
                Yes. I know, Nvidia holds Wayland back in favor of X11 because it benefits them. That's plain for anybody to see. It does sound less and less to me though like this is as new of an issue even with Wayland or GBM, since as you indicated Nvidia's driver re-implements X11 internally.

                Here is what would make sense though. Nvidia should step up and directly take as maintainer of X11 in the mean time. They're the main beneficiaries, and they're the main ones holding everybody back since XDC 2014. Why shouldn't they pay the piper after all these years?
                NVidia is already doing this and they do it more than Linux does. NVidia's blob (which includes Wayland integration) actually supports multiple Linux version generations which is actually a lot higher than what the Linux community currently does, i.e. its quite rare for graphics driver related things to get backported to previous kernel reasons (and btw this one reason why people like NVidia, they can run older kernels and still get the most up to date graphics experience).

                There is also the point that which is that Linux graphics community that has refused to support X11 and they are the gateholders so even if Nvidia theoritically could take control of X11 they wouldn't and its also not in their or in Linux's interest. Furthermore the question you posited is already creating a false dichotomy because a lot of people still use and rely on X11 because Wayland is missing a lot of features. I actually had to revert some servers I am maintaining from Wayland to X11 because of broken VNC support and missing things like dummy displays

                Originally posted by ezst036 View Post
                Especially since their driver has a partial internal re-implementation of X11, as you indicated. So they're already maintaining it anyways, they're just doing it in an out-of-tree way. Why not be a good community player about it instead of the existing walled garden? It actually wouldn't change one thing at all, except, the doors to the garden would now be open.

                Perhaps that's just too much to ask.
                If you are talking about them contributing their driver into the tree, this has already been discussed Ad nauseam and its not going to happen for very obvious reasons.
                Last edited by mdedetrich; 25 May 2022, 09:46 AM.

                Comment


                • Originally posted by mdedetrich View Post

                  I agree about the point on NVidia coding upstream but I suspect its not as easy as you make it out to be for the following reasons

                  1. NVidia is seen as "evil" by a lot of Linux community so they are already disadvantaged from a relations which is much more critical when you are advocating for wide sweeping changes
                  Well... If you have a history of coming to the party and pissing in the pool, repeatedly, for decades, people will eventually get tired of that behavior. It isn't that Nvidia is *evil*, per se, it is that their behavior as the 800 lb Gorilla has burned quite a few bridges by now.

                  Originally posted by mdedetrich View Post
                  2. if I would stereotype, Linux developers generally speaking are stubborn and dogmatic which usually works out but in the current case it evidently didn't.
                  This is where you are wrong. See, it isn't about a small obscure technical detail that can easily be fixed if some resources are allocated to it. It is about Nvidia setting themselves up for failure by repeatedly pissing in the pool when asked not to piss in the pool. If Nvidia stops pissing in the pool, then scars will eventually heal. One way to not piss in the pool is to develop a working proof-of-concept and then work with AMD and intel devs on an explicit sync model that works for everyone. Note that "working with" is not the same thing as forcing a solution down everyones throat.

                  Linux may go the way of Explicit sync, Nvidia is welcome to collaborate. I suspect Nvidia has forgotten the defininition of a collaboration though.

                  Comment


                  • Originally posted by wertigon View Post

                    Linux may go the way of Explicit sync, Nvidia is welcome to collaborate. I suspect Nvidia has forgotten the defininition of a collaboration though.
                    Im not quoting the rest of your post because as you would say its "pissy" trash, but NVidia already did try and contribute/collaborate but they were constantly ignored (what do you think EGLStreams was?). The reason things are moving forward now is that other graphics card vendors (such as AMD) are saying the same thing NVidia is and some Linux mesa dev's such as Ekstrand are humble and mature and realized that NVidia is right and are slowly pushing the point that "yeah, maybe we got it wrong here guys".

                    Comment


                    • Originally posted by mdedetrich View Post

                      Im not quoting the rest of your post because as you would say its "pissy" trash, but NVidia already did try and contribute/collaborate but they were constantly ignored (what do you think EGLStreams was?). The reason things are moving forward now is that other graphics card vendors (such as AMD) are saying the same thing NVidia is and some Linux mesa dev's such as Ekstrand are humble and mature and realized that NVidia is right and are slowly pushing the point that "yeah, maybe we got it wrong here guys".
                      EGLStreams was not collaboration though. Here is a good rundown on EGLStreams vs GBM that explains pretty much everything. The short version is that Nvidia came stomping in almost from out of the blue, saying "Hai guyz, we are are totally turning this Disco hut to a Waltz palace now! Because Waltz is just better in every conceivable way, and the waltz palace is gonna be awesome!" If you know anything about 3/4 vs 4/4 dancing, you would understand what an utter braindead move that would be. There were no real collaboration, no deeper reach out, only Nvidia saying you should collaborate with them, because everyone should collaborate with Nvidia since everything Nvidia does is awesome.

                      The world doesn't work this way. Collaboration does not happen because you write code and try to push it upstream. Collaboration is the thing that happens as and after the code is written. Your code got bugs. Fix those. Your code does not play nice with another vendors drivers. Fix it. Then try again. Repeat until successful. Even projects like the PREEMPT_RT guys took years to get their shit into the kernel, despite pretty much everyone agreeing they need to go that direction. Collaboration with Linux is a hard, messy and painful affair, but once it is in there, well... So worth it.

                      Not saying Nvidia is the only company with questionable behavior in the Linux world BTW. Nor that AMD or Intel are any less evil than Nvidia. But those two know how to really collaborate with the Linux people - Nvidia doesn't, and now they need to learn, and fast, or risk getting left behind. This is just how the world works now.

                      Comment

                      Working...
                      X