virtio-ramfb-gl crashes with NativeResolution=true (Neptune context destroyed)
- Dominant language
- Swift
- Stars
- 35.5k
- Forks
- 1.8k
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 7
Description
## UTM v5.0.5: `virtio-ramfb-gl` crashes with `NativeResolution=true`
### Environment
* **UTM:** 5.0.5 (Beta)
* **macOS:** macOS Sequoia, Darwin 24.x
* **Hardware:** Apple Silicon MacBook Pro, M1 Pro, 32 GB RAM
* **VM:** QEMU, `aarch64`, `virt` machine
* **Display:** `virtio-ramfb-gl`
* **Guest:** Windows 11 ARM64, build 26100.x
* **Guest tools:** UTM Guest Tools installed, including SPICE agent and VirtIO drivers
### Issue
I found that the VM consistently crashes when `NativeResolution=true` is enabled with the `virtio-ramfb-gl` display.
### Steps to reproduce
1. Create a Windows 11 ARM64 VM using QEMU `aarch64` and the `virtio-ramfb-gl` display.
2. Install Windows and UTM Guest Tools.
3. Shut down the VM.
4. Enable `NativeResolution=true` and `DynamicResolution=true`.
5. Test with both `Nearest` and `Linear` for the upscaling and downscaling filters.
6. Start the VM.
### Expected result
The VM should start normally and use the Mac's native Retina resolution.
### Actual result
QEMU crashes during startup with:
```text
QEMU error: QEMU exited from an error:
QEMURenderServer: npt: destroying Neptune context
```
After this happens, Windows can also enter the Recovery screen on the next boot.
### Tests
| Upscaling | Downscaling | Native Resolution | Dynamic Resolution | Result |
| --------- | ----------- | ----------------- | ------------------ | --------- |
| Linear | Linear | false | true | OK |
| Nearest | Nearest | false | true | OK |
| Nearest | Nearest | **true** | true | **CRASH** |
| Linear | Linear | **true** | true | **CRASH** |
I tested both scaling filters, and the result is the same in both cases. The VM works when `NativeResolution=false` and crashes when it is changed to `true`.
Based on these tests, the problem seems to be related to `NativeResolution` rather than the scaling filters. The crash also appears to happen in the QEMU rendering process when Neptune creates or handles the rendering context at the higher Retina resolution.
### Configuration that works
This is the configuration I am currently using:
```xml
DownscalingFilter
Nearest
DynamicResolution
Hardware
virtio-ramfb-gl
NativeResolution
UpscalingFilter
Nearest
```
With `Nearest`, text and UI elements look sharper to me than with `Linear`, which tends to look slightly blurry.
Contributor guide
Research direction
No source file, test, or entry point is named. Reproduce the Windows 11 ARM64 QEMU setup with virtio-ramfb-gl and compare NativeResolution=false and true using both filter pairs; done means the VM starts with NativeResolution=true without the Neptune context crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100