fix(agent): the game gets /dev/udmabuf in the Linux sandbox (AMD ran at 1-7 fps) #75
No reviewers
Labels
No labels
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Beanstalk!75
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Beanstalk:fix/sandbox-udmabuf"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Every AMD PC on Linux ran the game at 1-7 fps in the farm: Alberania's RX 7900 XTX at 150-1070 ms a frame, the Steam Decks at about 150 ms. Windows PCs and Linux NVIDIA ran at full speed. The game's own log showed 1-30 ms of GPU work a frame, but
submit 35.41ms in each frame's replay time. That made Linux AMD frame-time comparisons meaningless, and it caused the "inputs did not finish in time" errors.Longshot hands the game's memory to the GPU as dma-bufs made by
/dev/udmabuf(gpu/vk/vk_memory.cpp). bwrap's--dev /devhas no udmabuf, so the game fell back to host-pointer imports, which amdgpu looks up again at every submission. That file measured exactly this: 15-45 ms a submission, 3-8 fps.What changed
Bwrap.Argumentspasses/dev/udmabufin with--dev-bind, next to/dev/dri, when it exists. udmabuf only makes a dma-buf of a memfd the caller already owns, so it reaches nothing outside the sandbox.Bwrap.UdmabufTrouble(): the capabilities sayudmabuf: true/falseon Linux. A job on an AMD or Intel GPU logs a warning when the device is missing or not openable, pointing to Longshot's README for the udev rule.Tests
--dev-bind /dev/udmabuf. Agent: 1953 checks passed; the release build has no warnings.