[Feature] turing h264 nvenc opens but sunshine fails with "engine already in use"
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 12/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- macos, rust
- Domain
- operating-systems
Research direction
The log shows the NVENC shim opening a second encoder session in the same process while the first is still open, and the engine refusing it with "engine already in use". Start by finding where the session is opened and closed in the nvenc-shim and nve264 code, and why the first session's teardown does not release the engine first. Done means a second StartSession succeeds, or the reuse path is explained, and H.264 encoding runs without falling back to x264. The reporter's Blackwell-check and T2D-layout patches are out-of-tree, so reproduce on a clean build first.
Written by the indexing model from the issue text.
Description
What should it do, and why does it matter to you?
2070 super here. i got h264 nvenc to start on turing by patching out the blackwell check and using the t2d layout. the encoder actually opens (0xc4b7) but sunshine opens a second session before closing the first one and the lib refuses it with "engine already in use", so sunshine falls back to x264. log below
nvenc-shim: metal device created
nvenc-vt: CreateInstance 'avc1' pid 6856
nve264: classes: encoder 0xc4b7 channel 0xc46f
nve264: encoder engine NVENC0 (type 0x1b)
nve264: open: 1920x1080 pitch 1920 rows 1088, encoder class 0xc4b7
nvenc-vt: StartSession 1920x1080 pid 6856 -> 0
nvenc-vt: CreateInstance 'avc1' pid 6856
nve264: open: engine already in use in this process — refused
nvenc-vt: StartSession 1920x1080: engine refused
nvenc-vt: close 1920x1080: 0 frames emitted (0 IDR), 0 errors, 0.00 ms GPU/frame
nve264: teardown: 16 CPU mappings removed before any free
nvenc-vt: CreateInstance 'avc1' pid 6856
nve264: classes: encoder 0xc4b7 channel 0xc46f
nve264: encoder engine NVENC0 (type 0x1b)
nve264: open: 1920x1080 pitch 1920 rows 1088, encoder class 0xc4b7
nvenc-vt: StartSession 1920x1080 pid 6856 -> 0
nvenc-vt: CreateInstance 'avc1' pid 6856
nve264: open: engine already in use in this process — refused
nvenc-vt: StartSession 1920x1080: engine refused
nvenc-vt: close 1920x1080: 0 frames emitted (0 IDR), 0 errors, 0.00 ms GPU/frame
nve264: teardown: 16 CPU mappings removed before any free
nvenc-vt: CreateInstance 'avc1' pid 6856
nve264: classes: encoder 0xc4b7 channel 0xc46f
nve264: encoder engine NVENC0 (type 0x1b)
nve264: open: 1920x1080 pitch 1920 rows 1088, encoder class 0xc4b7
nvenc-vt: StartSession 1920x1080 pid 6856 -> 0
nvenc-vt: CreateInstance 'avc1' pid 6856
nve264: open: engine already in use in this process — refused
nvenc-vt: StartSession 1920x1080: engine refused
nvenc-vt: close 1920x1080: 0 frames emitted (0 IDR), 0 errors, 0.00 ms GPU/frame
nve264: teardown: 16 CPU mappings removed before any free
user@iMac-Pro ~ %```
- Dominant language
- Rust
- Stars
- 2.5k
- Forks
- 233
- Avg merge
- 1h 37m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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 nullmoth/nvidia-macos-driver
-
[Bug] `nullmoth-wsreset.sh` never restarts WindowServer at the real login window: `/dev/console` is `_windowserver`, not `root` (guard + test blind spot)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nullmoth/nvidia-macos-driver#141 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
nullmoth/nvidia-macos-driver#28 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 5/5 Over a week Newbie friendliness 12/100
nullmoth/nvidia-macos-driver#205 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 8/100
nullmoth/nvidia-macos-driver#204 · 2 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 5/5 Over a week Newbie friendliness 5/100
nullmoth/nvidia-macos-driver#201 ·
Maintainers usually reply within 1 day
All issues in nullmoth/nvidia-macos-driver
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
V1 manifest lists written by Java lose added/existing/deleted file countsPossibly taken @kacper-li-airspace-intelligence claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/iceberg-rust#3445 ·
Maintainers usually reply within 4 days
-
Slack integration: links on self-hosted domains never unfurl (parseCapShareUrl only accepts cap.so / cap.link)Possibly taken @mangeshraut712 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
CapSoftware/Cap#2546 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
area::tern-sync kind::cleanup triage::ready
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day