Announcement

Collapse
No announcement yet.

Wayland - killing native Linux gaming ?

Collapse
This topic has been answered.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Wayland - killing native Linux gaming ?

    NOTE: I was testing on Kubuntu 23.10

    I tried Wayland today and my impression is the majority of 'native' Linux games will be unplayable for a lot of people simply because Wayland defaults to the Mesa backend, ie:
    OpenGL vendor string: Mesa
    OpenGL renderer string: llvmpipe (LLVM 15.0.7, 256 bits)
    OpenGL core profile version string: 4.5 (Core Profile) Mesa 23.2.1-1ubuntu3.1


    Which for me means Average FPS<20 vs >60 if I login to X11 and run the same game.
    Whilst you can try some suggestions like setting:
    export SDL_VIDEODRIVER=wayland
    export __NV_PRIME_RENDER_OFFLOAD=1
    export __GLX_VENDOR_LIBRARY_NAME=nvidia
    export DRI_PRIME=1
    export __VK_LAYER_NV_optimus=NVIDIA_only


    ​This means glxinfo will then report:
    OpenGL vendor string: NVIDIA Corporation
    OpenGL renderer string: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2
    OpenGL core profile version string: 4.6.0 NVIDIA 535.171.04


    This actually means nothing since the games I tested don't use GLX, they just use OpenGL/SDL and therefore still run terribly and report:
    Factorio:
    ​0.216 Video driver: wayland
    ...
    0.267 Initialised OpenGL:[0] llvmpipe (LLVM 15.0.7, 256 bits); driver: 4.5 (Core Profile) Mesa 23.2.1-1ubuntu3.1


    ioquake:
    SDL using driver "wayland"
    Initializing OpenGL display

    ...
    GL_RENDERER: llvmpipe (LLVM 15.0.7, 256 bits)
    GL_VERSION 4.5 (Core Profile) Mesa 23.2.1-1ubuntu3.1



    Seems like ​Wayland is doing more kill native Linux gaming than Microsoft.
    Just imagine if MS released a new replacement for DirectX - that forces all current DirectX games use software rendering - that's basically what Wayland is doing on Linux.

    Can anyone else confirm they get software rendering using wayland for 'native' games ? or if native gaming finally dead and the best we can expect now is Proton/Wine setting between the game and Wayland?
    Last edited by danteuk; Apr 27, 2024, 01:56 PM. Reason: wayland
  • Answer selected by Snowhog at Apr 28, 2024, 11:22 AM.

    Originally posted by claydoh View Post
    You do realize that a very large number of people game on Wayland, and for some time, and there is not a huge cry over native games in general?
    Mesa is the correct 3d driver for a number of things, such as AMD. (Until I had to sell it off last month, I have been gaming on Wayland for almost two years.
    RX6650XT

    Code:
    OpenGL renderer string: llvmpipe (LLVM 15.0.7, 256 bits)​
    This may indicate something is wrong, llvmpipe is software rendering, I don't think this is normal, even in Wayland.
    It's good news if some people can game on Wayland, but bad news if it's only AMD / intel as Nvidia has over 90% of the market share, I've historically always bought Nvidia because their Linux drivers where solid and stable vs AMD's.

    It seems the critical information I've yet find is why Wayland is defaulting to llvmpipe instead of the Nvidia driver - maybe this is a problem with Nvidia, but GLX on Wayland and X11 can use the Nvidia driver so it seems strange for Wayland to force OpenGL to render via llvmpipe.

    Update:
    So after more hours of googling the answer was simply:
    sudo apt-get install libnvidia-egl-wayland1

    I guess is ideally this should be installed by default when the nvidia driver was installed via apt, so someone needs to update the apt dependencies since apt should know wayland is installed and would need this library to work correctly.

    Comment


      #2
      You do realize that a very large number of people game on Wayland, and for some time, and there is not a huge cry over native games in general?
      Mesa is the correct 3d driver for a number of things, such as AMD. (Until I had to sell it off last month, I have been gaming on Wayland for almost two years.
      RX6650XT

      Code:
      OpenGL renderer string: llvmpipe (LLVM 15.0.7, 256 bits)​
      This may indicate something is wrong, llvmpipe is software rendering, I don't think this is normal, even in Wayland.

      Comment


        #3
        Welcome.

        I rarely game on Linux (and I exclusively use X11) - but this sounds if it could probably be one of those Nvidia problems…

        It would be interesting to test if this also occurs with a dedicated AMD or Intel GPU.
        I suppose not as people like claydoh would certainly have noticed this.
        Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
        Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

        get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
        install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

        Comment


          #4
          Originally posted by claydoh View Post
          You do realize that a very large number of people game on Wayland, and for some time, and there is not a huge cry over native games in general?
          Mesa is the correct 3d driver for a number of things, such as AMD. (Until I had to sell it off last month, I have been gaming on Wayland for almost two years.
          RX6650XT

          Code:
          OpenGL renderer string: llvmpipe (LLVM 15.0.7, 256 bits)​
          This may indicate something is wrong, llvmpipe is software rendering, I don't think this is normal, even in Wayland.
          It's good news if some people can game on Wayland, but bad news if it's only AMD / intel as Nvidia has over 90% of the market share, I've historically always bought Nvidia because their Linux drivers where solid and stable vs AMD's.

          It seems the critical information I've yet find is why Wayland is defaulting to llvmpipe instead of the Nvidia driver - maybe this is a problem with Nvidia, but GLX on Wayland and X11 can use the Nvidia driver so it seems strange for Wayland to force OpenGL to render via llvmpipe.

          Update:
          So after more hours of googling the answer was simply:
          sudo apt-get install libnvidia-egl-wayland1

          I guess is ideally this should be installed by default when the nvidia driver was installed via apt, so someone needs to update the apt dependencies since apt should know wayland is installed and would need this library to work correctly.

          Comment


            #5
            Originally posted by danteuk View Post
            I've historically always bought Nvidia because their Linux drivers where solid and stable vs AMD's.
            And I switched from Nvidia for the inconsistent and constant breakages and fiddling required, unrelated to Wayland. All I have to do, at times if I have a very new card, is use the current Mesa release via long-standing PPAs. Maybe a more current kernel (I usually run on LTS)

            Originally posted by danteuk View Post
            I guess is ideally this should be installed by default
            Agreed, since Ubuntu/Gnome iirc defaults to Wayland. I wonder if using the driver manager, which is Ubuntu's preferred method includes this somehow, where the specific apt package installed doesn't depend on it? Or maybe there is a different meta-package that includes this?

            Comment

            Working...
            X