BUG: WebGPU finds no adapter on Linux when a DRM card has no vendor file (ONNX Runtime 1.24.4)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- desktop, machine-learning
Research direction
Read scripts/onnxruntime/fetch-runtimes.py and build.rs to see how Linux ONNX Runtime versions and hashes are selected. Update the Linux runtime to at least 1.25.1 for both architectures, then refresh the corresponding hashes. Done means Linux builds bundle the newer runtime and the WebGPU adapter is discovered on systems with a DRM card that lacks a vendor file.
Written by the indexing model from the issue text.
Description
What happened?
Follow-up to #2280: @CyberTimon asked me to test the WebGPU support for the AI models from 8e84c0aa on Linux.
On my machine the AI models stay on the CPU even with "Use GPU for AI models" on. app.log says:
[WARN] WebGPU acceleration for AI models is unavailable: no WebGPU adapter was found
The cause is in the bundled ONNX Runtime 1.24.4, not in RapidRAW. Its Linux GPU discovery reads /sys/class/drm/card*/device/vendor and gives up on the first card that has no such file, so it reports no GPUs at all and the WebGPU plugin has no device to offer. Here that card is an evdi (DisplayLink) device. ONNX Runtime logs:
GPU device discovery failed: device_discovery.cc:92 ReadFileContents Failed to open file: "/sys/class/drm/card3/device/vendor"
What did you expect to happen?
The AI models run on the GPU through WebGPU.
They do once that card is hidden from the process (a private mount namespace with a copy of /sys/class/drm without card3): the log shows AI models use WebGPU through .../libonnxruntime_providers_webgpu.so, and a headless export of a 24 MP image with AI denoise takes 10 s instead of 88 s on the CPU, with output within 3/255 of the CPU result.
How can we reproduce this?
- Linux with a DRM card that has no
device/vendorfile in sysfs, for example a DisplayLink adapter withevdiloaded (sudo modprobe vkmsprobably does the same; not tried). - Turn on "Use GPU for AI models" and run AI denoise.
app.logshows the warning above, and denoise runs on the CPU.
The same check without RapidRAW, using the bundled plugin and pip install onnxruntime==1.24.4:
import onnxruntime as ort
ort.register_execution_provider_library("WebGpuExecutionProvider", "/path/to/libonnxruntime_providers_webgpu.so")
print([d.ep_name for d in ort.get_ep_devices()]) # only CPUExecutionProvider
Operating System
Other Linux (Arch Linux)
RapidRAW Version
main at 70c3e369, built from source (after v1.7.1)
Additional information
- NVIDIA driver 620.73.04.
- With the same 0.6.0 WebGPU plugin, 1.24.4 and 1.25.0 find no GPUs here, while 1.25.1, 1.26.0, 1.27.0, 1.28.0, 1.29.0, 1.30.0, 1.31.1 and 1.32.0 all list them (checked with the device listing above).
Suggested fix
Bump the Linux runtime to ONNX Runtime 1.25.1 or later; 1.25.1 is the first release that handles such cards. It is the smallest step up from 1.24.4, and the Microsoft.ML.OnnxRuntime 1.25.1 NuGet package has both linux-x64 and linux-arm64 builds.
Tested in RapidRAW: with the linux-x64 libonnxruntime.so from that package in place of the bundled one, and card3 left as it is, the log shows AI models use WebGPU through ... and the 24 MP AI denoise export takes 10 s instead of 88 s with the switch off. The GPU output is byte-identical to the 1.24.4 GPU run with the card hidden, and within 3/255 of the CPU result.
This can stay Linux-only, the way macOS already has ORT_MACOS_VERSION: for example an ORT_LINUX_VERSION = "1.25.1" in scripts/onnxruntime/fetch-runtimes.py for the two Linux libonnxruntime.so entries, then the new hashes in build.rs. The WebGPU plugin can stay at 0.6.0, and Windows (DirectML) and Android are unaffected.
As far as I can tell RapidRAW can't work around this in its own code: the plugin only gets a device through ONNX Runtime's hardware discovery.
Acknowledgement
- My issue is unrelated to camera/lens support.
- I have searched all existing issues, both open and closed, and did not find a duplicate.
🤖 Generated with Claude Code
- Dominant language
- TypeScript
- Stars
- 10.4k
- Forks
- 592
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 37
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CyberTimon/RapidRAW
-
BUG: Escape key not closing some modals, but exiting full screenPossibly taken @Eapp1e claimed this 3 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
CyberTimon/RapidRAW#2267 · 2 comments ·
Maintainers usually reply within 1 day
-
FEATURE: Single click expanding of the folderPossibly taken @lnorton89 claimed this 5 days ago. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
CyberTimon/RapidRAW#2200 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
CyberTimon/RapidRAW#2151 ·
Maintainers usually reply within 1 day
-
BUG: Indicated focus on extra image in album viewPossibly taken @lnorton89 claimed this 6 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
CyberTimon/RapidRAW#2114 ·
Maintainers usually reply within 1 day
-
BUG: Android: AI provider switch in Settings > General > Generative AI overflows, AI-Free option unreachablePossibly taken @lnorton89 claimed this 5 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
CyberTimon/RapidRAW#2070 ·
Maintainers usually reply within 1 day
All issues in CyberTimon/RapidRAW
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
OHDSI/Data2Evidence#3749 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
bug severity:low triage:confirmed triage:in-progress
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Cotal-AI/Cotal#10749 · 1 comment ·
Maintainers usually reply within 1 day
-
needs-atl
Difficulty 1/5 Under an hour Newbie friendliness 88/100
GoogleChrome/modern-web-guidance-src#3726 ·
Maintainers usually reply within 1 day
-
e2e-failure ready-to-code
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
redhat-developer/rhdh-plugin-export-overlays#4935 · 1 comment ·
Maintainers usually reply within 1 day