jaeger changed the topic of #crux-devel to: CRUX (https://crux.nu/) development channel | Logs: https://libera.irclog.whitequark.org/crux-devel/
<beerman> jaeger xorg-xwayland and waylandpp depend on egl-wayland, if I can install those without having to install the nvidia package I don't really care. I have no system with nvidia stuff right now and I intent on keeping it that way
groovy2shoes has quit [Ping timeout: 250 seconds]
groovy2shoes has joined #crux-devel
jue has quit [Ping timeout: 248 seconds]
groovy3shoes has joined #crux-devel
groovy2shoes has quit [Ping timeout: 268 seconds]
<jaeger> I might just make nvidia skip installing the lib if egl-wayland is installed
<beerman> i have no idea what would make more sense
<beerman> something tells me that nvidia might ship more up to date stuff in their driver package, but I wouldn't want to download the full nvidia driver package if all i want is to satisify the dependency
<beerman> i'll look around how other packagers handle this
<jaeger> Worth noting that the egl-wayland package installs more than just the lib, whereas nvidia only does that
<jaeger> So maybe nicer to have the egl-wayland package for pkgconf support, etc.
<beerman> yeah
chrcav has quit [Ping timeout: 268 seconds]
<jaeger> And I agree it wouldn't make any sense to install nvidia on a system without any nvidia hardware, so I'll go the route of making nvidia skip the lib if egl-wayland is installed already.
<beerman> jaeger how would making nvidia depend on egl-wayland on wayland systems sound?
<jaeger> Something like "if wayland is installed, tell the user to install egl-wayland"?
chrcav has joined #crux-devel
<beerman> yeah, I mean, thats the best we could do at this point
<beerman> no idea if its not working properly without that, so if an early exit of the build() would work. I do that, e.g. in libreoffice, because the build would just fail "later on", so I thought this might safe somebody some unneeded compile-time
<jaeger> Not sure which way I prefer... making nvidia skip the lib if egl-wayland is installed is simple and stays out of the user's way, but on the flip side, if they install egl-wayland AFTER nvidia it creates a conflict
<beerman> i can't make the decision for you, but I would opt for the less painful way and get it out of the way with the check and an early exit
<jaeger> Another option would be to just skip it entirely in the nvidia port... because wayland itself doesn't require egl-wayland, only xorg-xwayland and waylandpp.
<jaeger> If you're installing either of those you're gonna get it via depinst anyway
<beerman> Like I said, I have no idea what meaning it has for a wayland session with nvidia drivers.. no idea what we are "loosing"
<jaeger> Same... I'm not even sure (at the moment) how one runs a wayland session with an nvidia GPU
<jaeger> But I haven't really tried recently
<beerman> mh
<beerman> https://github.com/crispyricepc/sway-nvidia/blob/main/wlroots-env-nvidia.sh these look recently enough to give them a try I'd say
<jaeger> hrmm, interesting
<jaeger> I'll give it a try without any egl-wayland stuff and see what happens, if I can even start it
<beerman> sure
<beerman> from an uneducated viewpoint, I would set my betting money on that one: export GBM_BACKEND=nvidia-drm
<beerman> for the most crucial part for this setup to work 😄
<beerman> arch does include a patch, as well as a config file https://github.com/archlinux/svntogit-packages/blob/packages/egl-wayland/trunk/10_nvidia_wayland.json that goes to usr/share/egl/egl_external_platform.d
<jaeger> yeah, that's already part of my local nvidia port... would still install only that file
<beerman> thats somethign I could include with the port, I don't see why it wouldn't be part of it. I'd also be fine with "giving it away" to somebody that can actually make use of it
<beerman> but it actually raises the question for me: how much of a hard dependency is it for both ports that pull it..
<jaeger> all good, it comes with the nvidia source
<beerman> https://github.com/NilsBrause/waylandpp/blob/master/CMakeLists.txt#L117 well this seems to be pretty much a hard dependency for waylandpp
<beerman> https://github.com/archlinux/svntogit-packages/blob/packages/xorg-xwayland/trunk/PKGBUILD#LL38C5-L38C33 that might also be an important bit for nvidia support, no idea what our version builds, it doesn't set the option
<jaeger> Both waylandpp and xorg-xwayland already list egl-wayland as a dependency, so not sure if there's any worry there
<beerman> just checked what meson_options.txt says and yes, thats auto enabled
<jaeger> Hrmm, no luck. I just get wlr saying it found 0 GPUs and cannot create backend
<beerman> mh... that sucks
<beerman> i mean it should just work so we are obviously missing something
<beerman> xwayland is "additional anyway" so I suppose its not that
<beerman> your nvidia driver package installs addition nvidia gbm libs?
<beerman> oh i see, thats the egl-wayland package.. i am just looking at what arch does in regards to nvidia..
<beerman> https://github.com/archlinux/svntogit-packages/blob/packages/nvidia-utils/trunk/PKGBUILD#L115 they still have that one, in addition to the egl stuff
<jaeger> hrmm... broken symlink, I'll look into that
<jaeger> Wonder why I did that, heh. Maybe started and never finished it?
<beerman> you lost me, which symlink? 😄
<jaeger> nvidia-drm_gbm.so -> libnvidia-allocator.so.525.89.02
<beerman> ah
<beerman> in your port?
<jaeger> the symlink is there but the lib is not installed
<jaeger> yes
<beerman> ah, well, that is worth a try 🙂
<beerman> man, that PKGBUILD makes me appreciate amdgpu so much more
<jaeger> amdgpu is great... the old AMD fglrx shit was way worse than this even
<beerman> i am old enough to know that what you say about fglrx is very true 😄
<beerman> i dunno when they switched to gpu exactly, I just know that it was the right decision
<jaeger> nvidia improved a LOT with libglvnd doing away with the need for stuff like gl-select... but it's still a mess
<beerman> i do remember that script as well 😆 and the "new kernel - nvidia broke" game that i suspect to still hold some truth, but I dunno
<jaeger> you still need to rebuild nvidia with a kernel change but it's far less annoying now
<jaeger> without the gl-select dance
<beerman> gotcha, at least there is that
<beerman> i suspect that multi monitor support is still crap if you are a 3+ kinda person
<beerman> but i dunno how future proof that is, with whats available today..
<jaeger> I use 2 monitors so not sure about 3+
<beerman> last time when I was out to buy a new one I've read the driver even craps out on windows with quadro cards... 3+ seems to be the number things can get extremely funny with nvidia. black screens on bios etc
<jaeger> weird
<jaeger> You'd think that would be a solved problem by now, heh
<beerman> i was shopping whenever the rx580 was already the second pick, I dunno, but it still serves me very well
<beerman> just to rate where i stopped caring about nvidia, so anything I say can be outdated etc 😄
<beerman> anyway, it would be nice to have it running on nvidia
<beerman> so.. on arch it looks like the nvidia package is heavily split, but they all depend on the one I formerly linked to. This only installs the gbm libs, not the egl libs, but for that it depends on egl-wayland..
<jaeger> Well, still no luck with sway/sway-nvidia at all, but I think fixing up the issues with the nvidia Pkgfile is a good thing either way
<beerman> mh..
<beerman> https://src.fedoraproject.org/rpms/libglvnd/blob/rawhide/f/egl-use-device-dispatch-if-at-least-one-vendor-suceeds.patch dunno if that might be interesting for libglvnd, also no idea why we set tls=false there, egl=true is redundant as thats the default with meson
<jaeger> Also tried kernel 5.15.x, no change vs. 6.1.x
<jaeger> no idea
<beerman> i have to admit, I never read up about glvnd, gles, gbm, egl etc, so I have no clue whats really important here for nvidia
<jaeger> http://ix.io/4qPi <-- current diff
<jaeger> (for nvidia)
<jaeger> I might end up compressing other lib/symlink install sections into loops like the one for the component libraries...
<beerman> usr/lib/libEGL_nvidia.so.525.89.02 do we have that file as well?
<beerman> i only see that one symlink in your diff: ln -s libEGL_nvidia.so.$version $PKG/usr/lib/libEGL_nvidia.so.0
<beerman> oh wait, i am stupid, nevermind
<jaeger> Yeah, it's in there
<jaeger> diff not showing the entire picture :)
<beerman> yeah 😄 but well, I dunno really... did you already start sway with debug and verbose and looked if that told a new clue on whats going on?
<beerman> e.g. like this `exec dbus-run-session -- sway -d -V 2> /tmp/sway.log`
<jaeger> That's next, keep getting pulled back and forth for work stuff
<beerman> Heh, I know that feeling as well..
<beerman> just asking the most obvious and I dunno if I ever did: you do have seatd installed and running? launching sway with the dbus env? I also have this in my sway config: `exec "/usr/bin/dbus-update-activation-environment DISPLAY SWAYSOCK WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway"`
<jaeger> yeah, can't even start sway on a non-nvidia system without seatd running
<beerman> yeah, makes sense, its needed to avoid setting the suid-bit on the executable
<beerman> ok.. this sorta bums me out. didn't danny say he used wayland now?
<beerman> the diff looks good, i just don't know what else is missing
<jaeger> I wonder if this is the issue:
<jaeger> parm: modeset:Enable atomic kernel modesetting (1 = enable, 0 = disable (default)) (bool)
<jaeger> modesetting disabled by default
<beerman> i mean, its worth a try
<jaeger> yeah
<jaeger> This definitely has some effect, though it doesn't solve the issue entirely. Now a new error
<beerman> yippie, progress 😄
<jaeger> shifted to a vulkan issue
<beerman> well alright, maybe start with removing the vulkan flags in the nvidia-sway env script i linked earlier
<jaeger> vulkan-validation_layers not installed, will see if that helps
<jaeger> er, vulkan-validation-layers
<beerman> just curious, did you have WLR_RENDERER=vulkan set?
<jaeger> I'm using the default settings from that nvidia-sway setup, haven't changed anything yet to reduce variables
<beerman> i guess it makes vulkan-layers a runtime dependency, thats why it quits
<beerman> but having vulkan around doesn't really hurt the cause
<jaeger> Adding vulkan-validation-layers didn't help. Commenting the WLR_RENDERER var lets it start but nothing is displayed, heh
<jaeger> lots of wlr GLES2 errors
<jaeger> 00:00:00.559 [wlr] [GLES2] GL_INVALID_OPERATION error generated. EGLImage not supported
<jaeger> 00:00:00.559 [wlr] [render/gles2/renderer.c:139] Failed to create FBO
<jaeger> 00:00:00.559 [sway/config/output.c:511] Failed to commit output HDMI-A-1
<beerman> can you try without export GBM_BACKEND=nvidia-drm?
<jaeger> same behavior, starts with lots of errors and no output
<jaeger> Not sure how to tell if this is in the release or not
<jaeger> 0.16.2 is newer than that merge request, at least
<jaeger> may need to rebuild wlroots
<beerman> it is, but i don't see it in the changelog, at least its not obvious to me
<jaeger> No luck. Rebuilding wlroots after installation of vulkan-validation-layers does produce a new footprint but no change in behavior, even after also rebuilding sway packages as well.
<beerman> does this have two monitors connected?
<jaeger> no
<beerman> darn it
<jaeger> Romster: if you're running a wayland session on nvidia hardware can you share some details? Like what compositor/WM/session and how
<beerman> i know he was looking at wayfire at some time
<beerman> https://download.nvidia.com/XFree86/Linux-x86_64/525.89.02/README/xwayland.html that as well as the next chapter are the only official information available from nvidia? I mean.. c'mon..
<beerman> it doesn't look very updated, but I guess we check all the requirements listed there
<beerman> https://github.com/archlinux/svntogit-packages/blob/packages/nvidia-utils/trunk/nvidia.rules those rules mention wayland/egl, currently the port doesn't have all those listed
<beerman> the port = our opt version
<jaeger> Yeah, I check those two sections of the README periodically but not much there as you've seen
darfo has quit [Ping timeout: 268 seconds]
<beerman> i hope that romster can shed some light on what might be missing
<beerman> i asked chatgpt and it answered that: https://dpaste.com/2GFSXFERN the sway config looks a bit weird, but still, not too shabby for chatgpt 😄
<beerman> you can ask it for instructions to do that on CRUX and it starts with prt-get depinst mesa-dri 😬 oh well 😄
darfo_ has joined #crux-devel
<beerman> https://github.com/danvd/wlroots-eglstreams there is also that
darfo_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
darfo has joined #crux-devel
<beerman> https://github.com/nix-community/nixpkgs-wayland/issues/305 but it reads like nvidia + gbm is the way to go
<beerman> jaeger does the driver actually create some file structure under /run/opengl-driver ?
<jaeger> not that I see
<beerman> maybe it makes sense to double check the installed jsons that all paths check out etc
<beerman> https://github.com/NixOS/nixpkgs/pull/139354 currently reading this, but i gotta stop now, i can't test anyway and i am still working on my sleep 😄
<jaeger> Heh, understandable
<beerman> but anyway, eglstreams is basically what made ddevault hate nvidia so much that he had that weird "--next-time-i-wont-buy-nvidia" flag in sway 😄 gbm support is what you should try to focus on, as much as i can see it.
<jaeger> Agreed, seems that way
<beerman> so looking at the diff: maybe the one line purge of -ln -s libnvidia-allocator.so.$version $PKG/usr/lib/nvidia-drm_gbm.so might still be needed: https://github.com/NixOS/nixpkgs/pull/139354#issuecomment-950414855
<beerman> the comment is old, but arch still does that as well: https://github.com/archlinux/svntogit-packages/blob/packages/nvidia-utils/trunk/PKGBUILD#L115 or i am misjudging the diff 😄
<jaeger> In the current version that line isn't removed entirely its path is corrected
<jaeger> (added gbm/)
<jaeger> entirely, its
<beerman> ah, right
<jaeger> http://ix.io/4qPi <-- current
<beerman> on unstable
<beerman> are you sure it should be in the added gbm/ dir?
<jaeger> Not, not 100%, but I've seen that in more than one spot including nvidia's own yum spec
<jaeger> So I assumed mine was wrong
<jaeger> Their documentation doesn't specify
<beerman> mh
<jaeger> At least not the driver documentation... it might be somewhere else I've not found yet
<beerman> it even lists appstream-glib as a dependency
<beerman> at least if that one if check is true, whatever that really tests
<jaeger> That's RHEL8-specific
<beerman> ok