Open rkunschke opened 1 year ago
Since I don't use any DM it would need some time removing my autologin hacks to test it with a real working GDM. So instead I checked the GDM source, and it doesn't seem to test for GLES or use libglapi directly. Nixpkgs doesn't seem to mess with the two envvars we require.
:sweat_smile: yeah, logs in this case would be great. I think for gdm you can get them through journalctl.
I've updated the original post with logs. I hope the form is okay. My PC with a AMDGPU is behaving the same.
gnome-session-c: gnome-session-check-accelerated: GLES Helper exited with code 512
This executable runs fine for me in my user session. I imagine gbm/systemd is cleaning our envvars before starting this executable.
Just for testing once, can you build with { chaotic.mesa-git.method = "replaceRuntimeDependencies"; }
added to your configuration? (you will need to add --impure
to nixos-rebuild
command)
gnome-session-c: gnome-session-check-accelerated: GLES Helper exited with code 512
This executable runs fine for me in my user session. I imagine gbm/systemd is cleaning our envvars before starting this executable.
Just for testing once, can you build with
{ chaotic.mesa-git.method = "replaceRuntimeDependencies"; }
added to your configuration? (you will need to add--impure
tonixos-rebuild
command)
This worked. Gdm found both session and hardware accelleration is working.
Ok, now remove that one, and instead try this one:
{ systemd.services.display-manager.serviceConfig.PassEnvironment = "GBM_BACKENDS_PATH GBM_BACKEND LD_PRELOAD"; }
Ok, now remove that one, and instead try this one:
{ systemd.services.display-manager.serviceConfig.PassEnvironment = "GBM_BACKENDS_PATH GBM_BACKEND LD_PRELOAD"; }
that resulted in the same issue than before. I get only software rendering in a x11 session. The logs are here: filtered by "gdm
16:57:19 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm 16:57:09 gdm: Gdm: Child process -1272 was already dead. 16:57:09 .gnome-shell-wr: Registering session with GDM 16:57:03 gdm-session-wor: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring 16:56:42 .gnome-shell-wr: Registering session with GDM 16:56:40 .gnome-session-: WARNING: Desktop file /nix/store/690cq7xpw5kfxdcbfnq7cszsi1jhlj7v-gdm-44.1/share/gdm/greeter/autostart/orca-autostart.desktop for application orca-autostart.desktop could not be parsed or references a missing TryExec binary 16:56:38 systemd: Started Session c2 of User gdm. 16:56:38 systemd-logind: New session c2 of user gdm. 16:56:38 gdm: Gdm: Child process -1219 was already dead. 16:56:37 .gnome-session-: WARNING: Desktop file /nix/store/690cq7xpw5kfxdcbfnq7cszsi1jhlj7v-gdm-44.1/share/gdm/greeter/autostart/orca-autostart.desktop for application orca-autostart.desktop could not be parsed or references a missing TryExec binary 16:56:37 systemd: Started Session c1 of User gdm. 16:56:36 (systemd): pam_unix(systemd-user:session): session opened for user gdm(uid=132) by (uid=0) 16:56:36 systemd-logind: New session c1 of user gdm.
all logs:
17:00:13 systemd: logrotate.service: Deactivated successfully. 16:59:56 kernel: sd 2:0:0:0: [sda] Starting disk 16:59:56 kernel: ata3.00: configured for UDMA/133 16:59:56 kernel: ata3: SATA link up 6.0 Gbps (SStatus 133 SControl 300) 16:59:55 kernel: sd 2:0:0:0: [sda] Stopping disk 16:59:36 kernel: ata3.00: configured for UDMA/133 16:59:36 kernel: ata3: SATA link up 6.0 Gbps (SStatus 133 SControl 300) 16:59:33 kernel: sd 2:0:0:0: [sda] Stopping disk 16:59:24 dbus-daemon: [session uid=1000 pid=1990] Failed to activate service 'org.gnome.Weather.BackgroundService': timed out (service_start_timeout=120000ms) 16:59:06 kernel: sd 2:0:0:0: [sda] Starting disk 16:59:06 kernel: ata3.00: configured for UDMA/133 16:59:06 kernel: ata3: SATA link up 6.0 Gbps (SStatus 133 SControl 300) 16:58:55 kernel: sd 2:0:0:0: [sda] Stopping disk 16:58:24 systemd: systemd-hostnamed.service: Deactivated successfully. 16:58:07 systemd: Started Virtual filesystem metadata service. 16:58:07 dbus-daemon: [session uid=1000 pid=1990] Successfully activated service 'org.gtk.vfs.Metadata' 16:58:07 systemd: Starting Virtual filesystem metadata service... 16:58:07 dbus-daemon: [session uid=1000 pid=1990] Activating via systemd: service name='org.gtk.vfs.Metadata' unit='gvfs-metadata.service' requested by ':1.14' (uid=1000 pid=2117 comm="/nix/store/52g417lfsn0n21898isd8jiakk3jqwwr-gnome-") 16:57:54 .gnome-shell-wr: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x3600337 16:57:38 cupsd: Saving subscriptions.conf... 16:57:37 .gnome-shell-wr: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x360002a 16:57:37 systemd: systemd-localed.service: Deactivated successfully. 16:57:36 .gnome-logs-wra: _gtk_css_corner_value_get_y: assertion 'corner->class == >K_CSS_VALUE_CORNER' failed 16:57:35 .org.gnome.Char: JS LOG: Characters Application exiting 16:57:33 .gnome-shell-wr: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x360001d 16:57:32 .gnome-logs-wra: _gtk_css_corner_value_get_y: assertion 'corner->class == >K_CSS_VALUE_CORNER' failed 16:57:29 systemd: Started Tracker metadata extractor. 16:57:29 dbus-daemon: [session uid=1000 pid=1990] Successfully activated service 'org.freedesktop.Tracker3.Miner.Extract' 16:57:29 .gnome-shell-wr: Can't update stage views actor
[ :0x9f2d860] is on because it needs an allocation. 16:57:28 .dleyna-rendere: dLeyna: Exit 16:57:27 systemd: Starting Tracker metadata extractor... 16:57:27 dbus-daemon: [session uid=1000 pid=1990] Activating via systemd: service name='org.freedesktop.Tracker3.Miner.Extract' unit='tracker-extract-3.service' requested by ':1.92' (uid=1000 pid=3142 comm="/nix/store/9iz5kj6g3ay6i1bwfpl4fizigri2x6j5-tracke") 16:57:27 .gnome-shell-wr: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x3600004 16:57:27 .dleyna-rendere: Client :1.86 lost 16:57:26 systemd: Started Tracker file system data miner. 16:57:26 dbus-daemon: [session uid=1000 pid=1990] Successfully activated service 'org.freedesktop.Tracker3.Miner.Files' 16:57:26 .dleyna-rendere: Calling GetRenderers method 16:57:26 dbus-daemon: [session uid=1000 pid=1990] Successfully activated service 'com.intel.dleyna-renderer' 16:57:26 .dleyna-rendere: Entries: (null) 16:57:25 dbus-daemon: [session uid=1000 pid=1990] Activating service name='com.intel.dleyna-renderer' requested by ':1.86' (uid=1000 pid=2867 comm="/nix/store/vhnliac3knybijxfhfwsfbwpzlnhnn0i-gnome-") 16:57:25 .gnome-logs-wra: Unknown key gtk-modules in /home/reini/.config/gtk-4.0/settings.ini 16:57:25 dbus-daemon: [session uid=1000 pid=1990] Successfully activated service 'org.gnome.Logs' 16:57:25 .gnome-shell-wr: clutter_actor_set_mapped: assertion '!CLUTTER_ACTOR_IN_MAP_UNMAP (self)' failed 16:57:25 dbus-daemon: [session uid=1000 pid=1990] Activating service name='org.gnome.Logs' requested by ':1.14' (uid=1000 pid=2117 comm="/nix/store/52g417lfsn0n21898isd8jiakk3jqwwr-gnome-") 16:57:25 .kgx-wrapped: Unknown key gtk-modules in /home/reini/.config/gtk-4.0/settings.ini 16:57:25 dbus-daemon: [session uid=1000 pid=1990] Successfully activated service 'org.gnome.Console' 16:57:25 .tracker-miner-: Path '/home/reini/Downloads' being removed from recursive directories list, as it also exists in single directories list
I pushed the branch https://github.com/chaotic-cx/nyx/tree/mesa-git-gdm-env
In my test I see that it adds what I need:
$ nix repl
nix-repl> :lf .
nix-repl> lib = inputs.nixpkgs.lib
nix-repl> sys = lib.nixosSystem { modules = [ nixosModules.default { chaotic.mesa-git.enable = true; services.xserver.displayManager.gdm.enable = true; } ]; system = "x86_64-linux"; }
nix-repl> sys.config.systemd.services.display-manager.serviceConfig.Environment
[ "'GBM_BACKENDS_PATH=/run/opengl-driver/lib/gbm'" "'GBM_BACKEND=dri_git'" "'LD_PRELOAD=/nix/store/g4by42bp515ac7mp2b3skcjljrhsyy2b-mesa-7f63d2/lib/libglapi.so.0'" ]
Can you test it?
Bump @rkunschke
Sorry for replying that late. Just to get that right: I changed the input in my flake.nix to that branch and just enabled mesa-git.enable; gdm.enable; and gnome.enable was that what I am supposed to do?
I have the same problem as before with that. Gnome only in X11 with software rendering. logs filtered by "gdm":
10:02:44 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm 10:02:43 dbus-daemon: [session uid=1000 pid=1975] Activating service name='org.gnome.Console' requested by ':1.77' (uid=1000 pid=2943 comm="/nix/store/3af7pavw1hn3vrjciif2pzvgdmhy8caj-nautil") 10:02:43 .nautilus-wrapp: Unable to get contents of the bookmarks file: Error opening file /home/reini/.gtk-bookmarks: No such file or directory 10:02:43 dbus-daemon: [session uid=1000 pid=1975] Activating via systemd: service name='org.freedesktop.Tracker3.Miner.Files' unit='tracker-miner-fs-3.service' requested by ':1.77' (uid=1000 pid=2943 comm="/nix/store/3af7pavw1hn3vrjciif2pzvgdmhy8caj-nautil") 10:02:43 .nautilus-wrapp: Unknown key gtk-modules in /home/reini/.config/gtk-4.0/settings.ini 10:02:34 gdm: Gdm: Child process -1255 was already dead. 10:02:34 .gnome-shell-wr: Registering session with GDM 10:02:04 gdm-session-wor: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring 10:01:56 .gnome-shell-wr: Registering session with GDM 10:01:54 .gnome-session-: WARNING: Desktop file /nix/store/xdd83yx1qyis5drj8vi5g0p0nmx0513r-gdm-44.1/share/gdm/greeter/autostart/orca-autostart.desktop for application orca-autostart.desktop could not be parsed or references a missing TryExec binary 10:01:52 systemd: Started Session c2 of User gdm. 10:01:52 systemd-logind: New session c2 of user gdm. 10:01:52 gdm: Gdm: Child process -1194 was already dead. 10:01:51 .gnome-session-: WARNING: Desktop file /nix/store/xdd83yx1qyis5drj8vi5g0p0nmx0513r-gdm-44.1/share/gdm/greeter/autostart/orca-autostart.desktop for application orca-autostart.desktop could not be parsed or references a missing TryExec binary 10:01:50 systemd: Started Session c1 of User gdm. 10:01:50 systemd-logind: New session c1 of user gdm. 10:01:50 systemd: pam_unix(systemd-user:session): session opened for user gdm(uid=132) by (uid=0)
all logs:
10:03:06 systemd: systemd-localed.service: Deactivated successfully. 10:03:05 syncthing: [24ITL] 2023/08/19 10:03:05 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting 10:03:04 cupsd: Saving subscriptions.conf... 10:03:03 systemd: systemd-hostnamed.service: Deactivated successfully. 10:03:00 dbus-daemon: [session uid=1000 pid=1975] Successfully activated service 'org.freedesktop.Tracker3.Miner.Extract' 10:03:00 .tracker-extrac: remote volume monitor with dbus name org.gtk.vfs.GoaVolumeMonitor is not supported 10:03:00 .gvfs-goa-volum: monitor says it's not supported 10:02:59 systemd: Starting Tracker metadata extractor... 10:02:59 dbus-daemon: [session uid=1000 pid=1975] Activating via systemd: service name='org.freedesktop.Tracker3.Miner.Extract' unit='tracker-extract-3.service' requested by ':1.87' (uid=1000 pid=3255 comm="/nix/store/w0srlb38wf9x0np93rk79hcybzhysaw0-tracke") 10:02:53 .org.gnome.Char: JS LOG: Characters Application exiting 10:02:46 .gnome-shell-wr: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x2a00004 10:02:45 .gnome-logs-wra: Unknown key gtk-modules in /home/reini/.config/gtk-4.0/settings.ini 10:02:45 dbus-daemon: [session uid=1000 pid=1975] Successfully activated service 'org.gnome.Logs' 10:02:45 .gnome-shell-wr: clutter_actor_set_mapped: assertion '!CLUTTER_ACTOR_IN_MAP_UNMAP (self)' failed 10:02:45 dbus-daemon: [session uid=1000 pid=1975] Activating service name='org.gnome.Logs' requested by ':1.14' (uid=1000 pid=2106 comm="/nix/store/ravzy0pag40zagn27p7b4a1rg5skrx87-gnome-") 10:02:45 systemd: Stopped User Runtime Directory /run/user/132. 10:02:44 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm 10:02:44 systemd: Reached target Exit the Session. 10:02:44 wireplumber: disconnected from pipewire 10:02:44 systemd: Stopped sandboxed app permission store. 10:02:44 gamemoded: Successfully initialised bus with name [com.feralinteractive.GameMode]... 10:02:44 systemd: Stopped target Main User Target. 10:02:44 dbus-daemon: [session uid=1000 pid=1975] Successfully activated service 'org.gtk.vfs.Metadata' 10:02:44 systemd: Starting Virtual filesystem metadata service... 10:02:44 dbus-daemon: [session uid=1000 pid=1975] Activating via systemd: service name='org.gtk.vfs.Metadata' unit='gvfs-metadata.service' requested by ':1.88' (uid=1000 pid=3247 comm="/nix/store/kahyii7s8fw5f6smfb9ww6hiacm3dkak-webkit") 10:02:44 .dleyna-rendere: Entries: (null) 10:02:44 dbus-daemon: [session uid=1000 pid=1975] Activating service name='com.intel.dleyna-renderer' requested by ':1.82' (uid=1000 pid=2955 comm="/nix/store/9wz5fhwx5kgzv9rrb63f14ir63hlw14h-gnome-") 10:02:43 systemd: Started Tracker file system data miner. 10:02:43 dbus-daemon: [session uid=1000 pid=1975] Successfully activated service 'org.freedesktop.Tracker3.Miner.Files' 10:02:43 .tracker-miner-: remote volume monitor with dbus name org.gtk.vfs.GoaVolumeMonitor is not supported 10:02:43 .gvfs-goa-volum: monitor says it's not supported 10:02:43 .kgx-wrapped: Unknown key gtk-modules in /home/reini/.config/gtk-4.0/settings.ini 10:02:43 dbus-daemon: [session uid=1000 pid=1975] Successfully activated service 'org.gnome.Console' 10:02:43 .nautilus-wrapp: Unable to get contents of the bookmarks file: Error opening file /home/reini/.gtk-bookmarks: No such file or directory 10:02:43 .gvfs-goa-volum: monitor says it's not supported 10:02:43 .tracker-miner-: Path '/home/reini/Downloads' being removed from recursive directories list, as it also exists in single directories list 10:02:43 .nautilus-wrapp: remote volume monitor with dbus name org.gtk.vfs.GoaVolumeMonitor is not supported 10:02:43 .gvfs-goa-volum: monitor says it's not supported 10:02:43 dbus-daemon: [session uid=1000 pid=1975] Successfully activated service 'org.gnome.Photos' 10:02:43 systemd: Starting Tracker file system data miner... 10:02:43 .gnome-photos-w: remote volume monitor with dbus name org.gtk.vfs.GoaVolumeMonitor is not supported 10:02:43 .gvfs-goa-volum: monitor says it's not supported 10:02:43 systemd: Created slice User Background Tasks Slice. 10:02:43 dbus-daemon: [session uid=1000 pid=1975] Activating via systemd: service name='org.freedesktop.Tracker3.Miner.Files' unit='tracker-miner-fs-3.service' requested by ':1.77' (uid=1000 pid=2943 comm="/nix/store/3af7pavw1hn3vrjciif2pzvgdmhy8caj-nautil") 10:02:43 .epiphany-searc: Unknown key gtk-modules in /home/reini/.config/gtk-4.0/settings.ini 10:02:43 dbus-daemon: [session uid=1000 pid=1975] Successfully activated service 'org.gnome.Epiphany.SearchProvider' 10:02:43 .gnome-calendar: Unknown key gtk-modules in /home/reini/.config/gtk-4.0/settings.ini 10:02:43 systemd: Started Bluetooth OBEX service. 10:02:43 dbus-daemon: [session uid=1000 pid=1975] Successfully activated service 'org.bluez.obex' 10:02:43 obexd: OBEX daemon 5.66 10:02:43 systemd: Starting Bluetooth OBEX service...
was that what I am supposed to do?
Exactly.
I have the same problem as before with that.
Ok, I'll think of another solution...
I get software rendering (or crashes) with anything OpenGL that uses either X11 or XWayland. No issues if the software uses either Vulkan (including Zink) or Wayland.
This is by launching Plasma Wayland from SDDM. (Plasma X11 works with software rendering.)
I get software rendering (or crashes) with anything OpenGL that uses either X11 or XWayland. No issues if the software uses either Vulkan (including Zink) or Wayland.
This is by launching Plasma Wayland from SDDM. (Plasma X11 works with software rendering.)
GBM_BACKENDS_PATH
, GBM_BACKEND
and libglapi
in LD_PRELOAD
)PS: If possible, please add some logs.
I've put a page in the Wiki for tracking compatibility: https://github.com/chaotic-cx/nyx/wiki/Mesa%E2%80%90Git-Compatibiltiy-Tracking (anyone should be able to edit it)
Do these crashes stop when following the instructions from this comment?
When doing this, it's... weird?
Like, Plasma X11 now uses hardware rendering. Many OpenGL applications that weren't working before, now work (e.g. osu! doesn't crash, glxinfo doesn't say llvmpipe
). But some of them still don't (e.g. Wine without DXVK, but only in some games). And with Dolphin Emulator, firstly it didn't work (it freezes shortly after launching a game), then without me changing anything, it magically worked. So... is that expected?
Without the changes from (1), in a terminal within your graphical session, do you see our envvars set? (
GBM_BACKENDS_PATH
,GBM_BACKEND
andlibglapi
inLD_PRELOAD
)
Yes, except in Plasma Wayland, where LD_PRELOAD
isn't set.
If I export LD_PRELOAD
manually before launching an application, nothing changes (app is still extra slow or crashes, due to using llvmpipe).
Do those said apps have wrappers that could be messing with any of the envvars from (2)?
No wrapping done, I checked manually with cat /proc/pid/environ
.
Logs after launching Plasma X11, with journalctl --this-boot
: logs.txt
So... is that expected?
Actually, no. This method is supposed to work 100% even in edge-cases, since it replaces all mesa files impurely.
Hummm, just to be certain, what GPU do you have there?
The Wine one was a false positive, sorry. Anyway, RX 6700 XT.
Tomorrow I'll work on workarounds for both GDM and Plasma. Thanks for the reports and logs.
EDIT: Monday, today was rushed!
But also note that { mesa-git + Wayland + Vulkan } is broken for everybody: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9692
Monday EDIT1: I can reproduce Plasma X11 with a virgl-powered VM:
Mesa Stable:
Mesa Git:
With #292 I can no longer reproduce problems (llvmpipe instead of hw-driver) with neither GDM nor SDDM:
EDIT: This solution will only be deployed after #293 merges.
@rkunschke and @SuperSamus, please let me know if the latest deploy fixes it for you.
Plasma X11 is now completely fixed.
However, Plasma Wayland has the same problems. I noticed that LD_PRELOAD
is still not set, but this time, if export
it manually, then XWayland∧OpenGL applications will work as they should.
So... why is Plasma Wayland unsetting LD_PRELOAD
?
EDIT: LD_PRELOAD
is now set.
So... why is Plasma Wayland unsetting
LD_PRELOAD
?
My bad, I pushed the fix, and tested the 4 possibilities now: SDDM + Plasma { X11, Wayland } and GDM + Gnome { X11, Wayland }.
@rkunsc
For me everything works fine now. Thank you :)
Steam doesn't work with the default mesa-git.method
.
The app launches, I can see the gamepad reacting to Steam, but the UI simply doesn't appear at all (the only exception is the "Updating/Extracting" window at the beginning). The tray bar is visible, and the menu shows the options it should, but clicking on any of them does nothing. In other words, Steam is unusable.
Steam's logs say nothing useful, but journalctl
does:
kernel: traps: steamwebhelper[68634] general protection fault ip:7f1ffdd06582 sp:7ffd38f56e50 error:0 in libglapi.so.0.0.0[7f1ffdcf9000+e000]
plus a coredump. This is printed many times while Steam is open.
Tested on Plasma, both X11 and Wayland.
Resetting Steam doesn't fix the issue.
None of this happens with chaotic.mesa-git.method = "replaceRuntimeDependencies";
.
UPDATE: Current stuck due to: https://github.com/chaotic-cx/nyx/issues/403 (PRs are welcome)
EDIT: But still updating almost daily.
It seems to be extra broken for me now, both methods are not working.
EDIT2: Ok, the problem this time was sway_git
, and not mesa_git
.
@PedroHLC could you please include this PR as a patch? https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26165
It's required for VAAPI in Chromium
could you please include this PR as a patch?
Sure, just push a PR adding two final.fetchpatch2
to this list: https://github.com/chaotic-cx/nyx/blob/9b09f64ccaa2e52e1934f1a5e2295ff923d6298e/pkgs/mesa-git/default.nix#L70-L72
It's better to have two of them pointing to the commit's diff URL (like url = "https://gitlab.freedesktop.org/mesa/mesa/-/commit/eff9f33d49db7e7562ed5b93551dcf21b78b916a.patch"
) than one pointing to the MR's diff because this last one might change when new commits are added.
okie then, I'll handle this after work today
The OpenGL option name has been changed from "hardware.opengl" to "hardware.graphics". My rebuild is currently failing when I use mesa-git.
NixOS/nixpkgs#320228
My rebuild is currently failing when I use mesa-git.
It should be fixed when this action ends: https://github.com/chaotic-cx/nyx/actions/runs/9616571745 (thanks to #767)
What happens?
I recently tried out gnome and gdm on my system. (I am on KDE wayland) When I entered gdm there was only one session which was the X11 session with software rendering. When I used sddm instead, I could enter the wayland session. Deactivating the mesa-git option resulted in both sessions appearing in gdm.
What is expected to happen?
The wayland session working out of gdm.
If possible, please attach logs
logs filtered by "gdm"
all logs since boot
More information
I am using a skylake notebook with the i915 driver in early kms. My desktop PC with AMDGPU is experiencing the same behavier.