Commit e54a35d
committed
fix(linux/wlr): resilient GBM allocation for headless NVIDIA
GBM buffer allocation with GBM_BO_USE_RENDERING|GBM_BO_USE_LINEAR
fails on headless NVIDIA render nodes. Try progressively relaxed
flag combinations before falling back to SHM.
Also prefer DRM render nodes over primary nodes in CUDA device
lookup — primary nodes require DRM master which is unavailable
on headless setups.
Tested on RTX 4060 Ti headless (TrueNAS, no monitor):
- GBM succeeds with GBM_BO_USE_RENDERING flag alone
- VRAM capture path works (zero-copy DMA-BUF → EGL → CUDA → NVENC)
- SHM fallback still catches cases where all GBM combos fail1 parent 79cc8e9 commit e54a35d
2 files changed
Lines changed: 48 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
256 | 273 | | |
257 | 274 | | |
258 | 275 | | |
259 | 276 | | |
260 | 277 | | |
261 | 278 | | |
262 | 279 | | |
263 | | - | |
| 280 | + | |
264 | 281 | | |
265 | 282 | | |
266 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
488 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
489 | 514 | | |
490 | | - | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
491 | 518 | | |
492 | 519 | | |
493 | 520 | | |
| |||
0 commit comments