fix(agc): name the reason when /dev/udmabuf cannot be opened #1688
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1688"
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?
Imported from boykopovar/AnyPS5. Originally posted by johnmaia on 2026-10-08T16:30:22Z.
What
On Linux, shared direct memory is imported through
/dev/udmabuf(#943) when the driver imports dma-buf memory. Many distributions create the node asroot:kvmwith mode0660(#943's checklist notes this, and its test machine had a per-user ACL), so a user outside thekvmgroup cannot open it. The ranges are then copied instead of imported, and GPU stores through FLAT/GLOBAL addresses to them fail. The only trace was the import step and a Vulkan result, which hideserrno:DOOM PPSA99666 (homebrew) presents through a compute kernel that stores into a 32 MiB direct memory range, so on such a machine it logs
video: GPU presentation failed, switching to the CPU scaler.udmabufDeviceprints the open error once, with the fix forEACCES: The device is only opened wherecontext.dmaBufImportis set, so nothing is printed on the NVIDIA proprietary driver (#1329).docs/user/USAGE.mddocuments the requirement next to the Windows direct memory note, including the 64 MiBsize_limit_mbabove which ranges are copied anyway (#943).No behaviour change.
Tested
Linux, Ubuntu 24.04.5, GCC 13.3, RX 7600 (RADV, Mesa 25.2.8),
/dev/udmabufroot:kvm 0660./dev/udmabuffailuresBDA access failedmainPermission deniedkvmgroup)--exclude-sce-module libc.prxonmain, run under Xvfb. The run without access used a private mount namespace in which/dev/udmabufwas a root-only file, with the process running as the normal user.ctest -R "agc|guest_agc"withANYPS5_REQUIRE_VULKAN=1: 227/227 with access; the new line does not appear.#ifndef _WIN32block.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by johnmaia on 2026-10-08T16:51:24Z.
End-to-end check with a display, on this PR's head: Linux, RX 7600 (RADV, Mesa 25.2.8), headless weston + Xwayland, DOOM PPSA99666 v1.1.1 built from source (byte-identical to the release), relinked with
--exclude-sce-module libc.prx.User without access to
/dev/udmabuf(a private mount namespace with a root-only file over the node, process running as the normal user):User in the
kvmgroup: no import failures, no write-back failures, and the title stays onAGC compute presentationfor the whole run. DOOM's own frame capture (test plancapture 120) of the GPU-presented frame matches apresent cpucapture of the same frame in 93.5% of the detiled pixels; the rest are small differences from the kernel's bilinear scaling against the CPU path's nearest-neighbour scaling. On screen:The first run after a rebuild can still fall back with
gpu: frame 1 never completed: the cold compile of the kernel exceeds DOOM's 500 ms fence wait, as noted in #684. A second run stays on the GPU path.Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T19:43:47Z.
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
55be83f9, merged ontomain8b393b6ein one build with 31 other PRs that had no Windows run.guest_offline_imports, broken by #2359 (reported there).No title was run.
🤖 Addressed by Claude Code