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

GPU errors with NixOS Unstable #239

Open
gender-combinator opened this issue Oct 5, 2024 · 4 comments
Open

GPU errors with NixOS Unstable #239

gender-combinator opened this issue Oct 5, 2024 · 4 comments

Comments

@gender-combinator
Copy link

I'm having trouble getting the gpu working. It didn't show up in /dev/dri on NixOS 24.05, so I switched to Unstable, which now the card shows up, but throws errors when my wayland compositors try using it (Sway, Jay). I've ran drm_info and that is failing for /dev/dri/card/1.

unstable revision: 27e30d177e57d912d614c88c622dcfdb2e6e6515
nixos configuration includes:

hardware.asahi.useExperimentalGPUDriver = true;
hardware.graphics.enable = true;

drm_info output and logs: info.txt
sway logs:
without any env: sway-log-default.txt
with WLR_DRM_DRIVERS=/dev/dri/card1: sway-log.txt
asahi logs in kernel: kernel.txt

@Smaug123
Copy link
Contributor

This is me too, with my config being https://github.com/Smaug123/nix-dotfiles/blob/d7221c2af1c68422e6f1f73b4cac071c7f8ba1b8/home-manager/earthworm-config.nix . (Looks like the same issue, specifically the error: EGL_BAD_PARAMETER (0x300c), message: "eglQueryDeviceStringEXT"; I asked at https://discourse.nixos.org/t/asahi-sway-gpu-failure/54721 before finding this GitHub issue.)

(My knowledge of the graphics stack is too bad to even know who would be best placed to receive a support request, I'm afraid!)

@fx-chun
Copy link
Contributor

fx-chun commented Oct 23, 2024

@gender-combinator @Smaug123:
It sounds like we've had similar issues. That EGL_BAD_PARAMETER error is a bit of a red herring; I'm still able to successfully run hardware-accelerated sway even with that message occurring in the beginning. I believe it occurs as a side effect of the initialization process wlroots does to find a valid DRM configuration to display with & isn't harmful.

When running with sway -d, are you seeing an Operation not supported error from drmSyncobjCreate in the logs? This ultimately ended up being my true problem when trying to diagnose my sway issue: nix-community/nixpkgs-wayland#469

TL;DR: I had to set WLR_RENDER_NO_EXPLICIT_SYNC=1 for sway built against a recent-enough wlroots.

@Smaug123
Copy link
Contributor

Smaug123 commented Oct 23, 2024

That env var didn't help me I'm afraid. Sorry I'm on my phone, but "DRM device '/dev/dri/card0' has no render mode, falling back to primary node" is the last log line before a segfault in strlen (stack trace is strdup, dri2_initialize_drm, dri2_initialize, eglInitialize, egl_initdisplay, egl_init...). No lines related to drmSyncObjCreate.

@gender-combinator
Copy link
Author

My setup seems similar to @Smaug123 , since I'm also getting the same error except with card1.

I probably won't be able to reproduce this after tomorrow as I switch over to the fedora build. (I've been banging my head on this a lot...)

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