-
hi, i'm new to rust. please forgive my ignorance. I was reading the code, trying to figure out how niri chooses the primary GPU by default unless explicitly specified. then I stumbled across this line: Line 3544 in 9c7e8d0 This suggests it may default to /dev/dri/renderD129 (maybe to prioritize using dgpu on laptops??) and then... perhaps fallback to another device, since not every machines has dual gpu. Is my assumption correct? I want to do the opposite: default to |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey, that line is from a test. You can see above in a big string where I set that option to that value for the test: Line 3152 in 9c7e8d0 The setting defaults to Lines 253 to 272 in 9c7e8d0 On Asahi (and KMSRO in general) this logic doesn't always work (which could be improved but I don't have any such devices), so you can override it manually in the config if you need. |
Beta Was this translation helpful? Give feedback.
Hey, that line is from a test. You can see above in a big string where I set that option to that value for the test:
niri/niri-config/src/lib.rs
Line 3152 in 9c7e8d0
The setting defaults to
None
(unset), which causes niri to try to get the primary (boot) GPU from udev:niri/src/backend/tty.rs
Lines 253 to 272 in 9c7e8d0