13:50 frytaped: Could something be done so that NVIDIA GPU ends up becoming /dev/dri/card1 and gets the /dev/dri/renderD129 node on an optimus laptop ? Everytime NVIDIA GPU becomes /dev/dri/card0 a lot of stuff breaks for me on Wayland.
13:56 karolherbst: frytaped: huh.. normally the intel one should be card0 but it kind of depends on loading time
13:56 karolherbst: userspace shouldn't rely on any order
13:57 frytaped: For me the NVIDIA GPU becomes the card0 almost every time.
13:57 frytaped: Chromium on wayland is what breaks for me.
13:57 karolherbst: mhhh
13:58 karolherbst: in most cases intel usually becomes card0 but it could be different depending on your setup.. maybe there is something obvious in your kenrel log. Mind sharing your dmesg?
13:59 frytaped: https://paste.centos.org/view/210a9875
14:02 karolherbst: mhhh
14:02 karolherbst: is intel or nouveau card0 in this?
14:03 frytaped: nouveau
14:03 karolherbst: strange
14:04 karolherbst: though nouveau seems to be a bit faster to create those nodes, but intel seems faster to claim the frame buffer
14:05 karolherbst: but what breaks wiht chromium specifically? It's starts to use nouveau or?
14:05 frytaped: GPU stuff start crashing
14:05 frytaped: Probably because it tries to use nouveau I think
14:06 karolherbst: mhh.. annoying
14:06 frytaped: It doesnt crash if Intel is card0 and gets the renderD128 node
14:06 karolherbst: do you know if it's just chromium or do other applications also use nouveua?
14:06 karolherbst: *nouveau
14:07 frytaped: Well electron apps start crashing too if I try to run it using the wayland backend
14:07 karolherbst: :(
14:07 frytaped: But it uses chromium under the hood anyway
14:07 karolherbst: well.. that's chromium still though
14:08 karolherbst: if electron/chromium is the only one, then I'd file a bug, because that's clearly wrong. But if others use it there might be something else going on
14:08 karolherbst: you can check with /sys/kernel/debug/dri/*/clients
14:08 frytaped: I have not tried to deliberately run apps using nouveau though
14:08 karolherbst: this should list active processes per node
14:11 frytaped: chromium output -> https://paste.centos.org/view/7cc1f1a5
14:11 frytaped: /sys/kernel/debug/dri/129/clients -> https://paste.centos.org/view/76588acb
14:12 karolherbst: okay.. so stuff usually uses the intel GPU
14:13 frytaped: chrome seems to be using both D128 and D129 (judging by the outputs)
14:14 karolherbst: mhh
14:14 karolherbst: yeah...
14:15 karolherbst: no idea why chrome is doing that, it's clearly wrong
14:16 frytaped: Is there any udev rule or something that I could use to force Intel gpu to get initialized first ?
14:17 karolherbst: frytaped: one thing you could try is to stop chrome, unload nouveau and see if chrome starts
14:17 karolherbst: frytaped: not that I am aware of, because this depends on the kernel loading modules
14:17 karolherbst: and you usually can't tell which GPU is the main/secondary one until you actually load the driver
14:18 karolherbst: that might be simple for your system, but you can have desktops where the nvidia one is main and intel secondary
14:18 karolherbst: or systems with two nvidia gpus
14:18 frytaped: How would I unload nouveau while I am in my GUI session ?
14:18 frytaped: Its still in use
14:19 karolherbst: mhhh
14:19 karolherbst: at least with gnome that should be possible, maybe something is still using it
14:20 karolherbst: having a display connected might also prevent unloading
14:20 karolherbst: otherwise check with lsof on the /dev/dri/ nodes
14:20 frytaped: Well closing an electron app (running under Xwayland) made it work
14:20 karolherbst: ahh
14:20 frytaped: (I actually didnt expect it to work)
14:20 karolherbst: question is.. do they start now or are they simply giving up
14:20 karolherbst: and if chrome starts, what is "chrome://gpu" saying
14:21 frytaped: It does seem to work
14:21 frytaped: Though I do get GPU process exited unexpectedly: exit_code=134
14:21 karolherbst: heh
14:22 karolherbst: somewhat weird on my system, where intel is card0
14:22 karolherbst: "GPU0 VENDOR= 0x10de, DEVICE=0x1fb9"
14:22 frytaped: Yeah I got a segfault but chrome://gpu says everything's fine
14:22 karolherbst: "GPU1 VENDOR= 0x8086, DEVICE=0x9bc4 *ACTIVE*"
14:22 karolherbst: and 8086 is intel
14:22 karolherbst: so whatever chromium is doing, I suspect it's broken
14:23 karolherbst: we had some bug in this domain a few weeks earlier (overall GPU bug, not nouveau) where applications assumed there is no gap
14:23 karolherbst: so if you'd have card0 and card2 -> crash
14:23 frytaped: Wait how is chromium detecting two GPUs even after unloading nouveau
14:23 karolherbst: pci devices
14:23 frytaped: But there shouldnt be a dri driver right ?
14:24 karolherbst: correct
14:24 karolherbst: unless something loaded nouveau again
14:24 frytaped: It still reports the mesa version for the nvidia gpu
14:24 karolherbst: but I assume you only have the card1 and renderD129 nodes
14:24 frytaped: Yeah nouveau isnt loaded
14:24 frytaped: and no card0
14:24 karolherbst: "strange"
14:25 karolherbst: anyway, sounds broken
14:25 karolherbst: might want to restart gnome to be sure
14:25 frytaped: But atleast chromium seems to work now
14:25 karolherbst: but I'd fill a bug report against chromium and see what they say
14:26 karolherbst: or maybe somebody already did.. I'll ask in #dri-devel
14:27 frytaped: I had a similar problem getting va-api working with Firefox some time back but Firefox had fixed it
14:27 frytaped: Had to set some env var to make ff use D129
14:28 karolherbst: frytaped: sure that chrome uses the wayland backend btw?
14:29 frytaped: replied there
20:08 top: hello