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

Latest nixpkgs-wayland breaks GLX on wayland #438

Closed
dmayle opened this issue Jan 27, 2024 · 16 comments
Closed

Latest nixpkgs-wayland breaks GLX on wayland #438

dmayle opened this issue Jan 27, 2024 · 16 comments

Comments

@dmayle
Copy link

dmayle commented Jan 27, 2024

I use nixpgs-wayland with the nvidia driver, and that ensures that my experience under sway is flicker free.

Sometime over the last month, GLX stopped working. If I remove the nixpkgs-wayland overlay, I get GLX working again (but now with all of the flickering).

With the nixpkgs-wayland overlay, EGL and Vulkan work just fine, but GLX fails to load hardware (mesa only)

[nix-shell:~]$ GBM_BACKEND=nvidia-drm __GLX_VENDOR_LIBRARY_NAME=nvidia LIBGL_DEBUG=verbose glxinfo -B
name of display: :0
X Error of failed request:  BadAlloc (insufficient resources for operation)
  Major opcode of failed request:  149 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  0
  Current serial number in output stream:  29
[nix-shell:~]$ LIBGL_DEBUG=verbose glxinfo -B
name of display: :0
MESA-LOADER: dlopen(/run/opengl-driver/lib/dri/zink_dri.so)
did not find extension DRI_CopySubBuffer version 1
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/douglas/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/douglas/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/douglas/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/douglas/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/douglas/.drirc: No such file or directory.
DRI3 not available
failed to load driver: zink
MESA-LOADER: dlopen(/run/opengl-driver/lib/dri/swrast_dri.so)
did not find extension DRI_Kopper version 1
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/douglas/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/douglas/.drirc: No such file or directory.
did not find extension DRI2_Flush version 1
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Mesa (0xffffffff)
    Device: llvmpipe (LLVM 16.0.6, 256 bits) (0xffffffff)
    Version: 23.3.3
    Accelerated: no
    Video memory: 128746MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 4.5
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 0 MB, largest block: 0 MB
    VBO free aux. memory - total: 123969 MB, largest block: 123969 MB
    Texture free memory - total: 31 MB, largest block: 31 MB
    Texture free aux. memory - total: 123969 MB, largest block: 123969 MB
    Renderbuffer free memory - total: 31 MB, largest block: 31 MB
    Renderbuffer free aux. memory - total: 123969 MB, largest block: 123969 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 1968074 MB
    Total available memory: 2096820 MB
    Currently available dedicated video memory: 31 MB
OpenGL vendor string: Mesa
OpenGL renderer string: llvmpipe (LLVM 16.0.6, 256 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 23.3.3
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.5 (Compatibility Profile) Mesa 23.3.3
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.3.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
@Artturin
Copy link
Member

You should bisect and report the issue to the offending projects repo

@dmayle
Copy link
Author

dmayle commented Jan 28, 2024

Okay, I'm working to do that now. Previous revision 511bd3364d5bab789093d774c7c276d9b7e51011 is good, while revision 791da42b6442870964b11ea28cf5932a76483548 is no longer working:

[douglas@beast:~/src/nix-config]$ git diff
diff --git a/flake.lock b/flake.lock
index 2100970..c4d0c11 100644
--- a/flake.lock
+++ b/flake.lock
@@ -278,11 +278,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1706386306,
-        "narHash": "sha256-YCiWq2bSt+fKxnYpP9PJ52cthm8dkHUuEVFkwJDauSw=",
+        "lastModified": 1703725031,
+        "narHash": "sha256-PYxvnZcqn66Orlfmr/t/f5ywLYnGhP2oDAFlsQ0GFOQ=",
         "owner": "nix-community",
         "repo": "nixpkgs-wayland",
-        "rev": "791da42b6442870964b11ea28cf5932a76483548",
+        "rev": "511bd3364d5bab789093d774c7c276d9b7e51011",
         "type": "github"
       },
       "original": {

@dmayle
Copy link
Author

dmayle commented Jan 28, 2024

Revision b2b2ac38df53cdcae172302a11ae34448f4a2598 is good

@dmayle
Copy link
Author

dmayle commented Jan 28, 2024

Revision b40e4b779702ff40c4e6ef072dccf47c8f077702 is bad, while revision b2b2ac38df53cdcae172302a11ae34448f4a2598 is good.

BTW: I'm using the following command to only update nixpkgs-wayland:

nix flake lock --update-input nixpkgs-wayland --override-input nixpkgs-wayland github:nix-community/nixpkgs-wayland/$REV

@dmayle
Copy link
Author

dmayle commented Jan 28, 2024

Revision 237c5549c149a261165d1116a513c7df84ced1d7 is good

@dmayle
Copy link
Author

dmayle commented Jan 28, 2024

Revision d93ff536c8fecffaf2dc09db3b14b2c8fcbcab7c is bad

@dmayle
Copy link
Author

dmayle commented Jan 28, 2024

Revision 904707f5522c7414a634c14f29f96f108b6d2d27 is good

@dmayle
Copy link
Author

dmayle commented Jan 28, 2024

Revision 75f79ac32cc3ec8d37b8c2f08b17275f2487384f is bad

@dmayle
Copy link
Author

dmayle commented Jan 28, 2024

The offending commit is 298b728f5bb64eca3a57e7767cc649cfecf308fb, which is responsible for updating sway-unwrapped.

Previously, sway was at revision fa294a9094b673e99e5de0c456dc5a6b9ff7db55 from January 2nd.

This commit brings sway up to revision ae33f4eb37a8ee647907e4fef72c6a488b8b1138 from January 19th

@Artturin
Copy link
Member

swaywm/sway#7897

@dmayle
Copy link
Author

dmayle commented Jan 28, 2024

That's exactly the issue. It looks like good progress is being made on fixing the issues. I'm freezing my nixpkgs-wayland for the moment until all of the various broken pieces get picked up (XWayland, libva, and sway)

@dmayle dmayle closed this as completed Jan 28, 2024
@Artturin
Copy link
Member

You can launch sway with -Dlegacy-wl-drm

@dmayle
Copy link
Author

dmayle commented Jan 30, 2024 via email

@dmayle
Copy link
Author

dmayle commented Jan 30, 2024

That is a runtime flag! Once the new sway hits nixpgs-wayland (if it hasn't already), I'll give it a shot.

@colemickens
Copy link
Member

Merged last week, I'd expect it to be there. Let us know. This is probably why I've had to run Steam under gamescope.

@Artturin
Copy link
Member

Mpv was segfaulting for me and that flag fixed it

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

3 participants