utmapp / UTM

Virtual machines for iOS and macOS
https://getutm.app
Apache License 2.0
26.73k stars 1.34k forks source link

Crash when enabling virtio-gpu-gl-pci in UTM #5987

Open AbrahamR176 opened 10 months ago

AbrahamR176 commented 10 months ago

Describe the issue As the title describes, selected VM UTM images crash when utilizing the virtio-gpu-gl-pci option for hardware acceleration. Using virtio-ramfb seems to be the most stable for me yet it is noticeable slower than in the brief seconds I get off a VM with hw acceleration enabled.

To elaborate in the issue, using the virtio-gpu-gl-pci option on either Ubuntu 20.04 or Debian 12, which seemed to actually utilize hw acceleration, crash upon doing essentially anything in the VM. I read from the UTM release changelog on Github that some mesa driver versions might be the cause of this issue, yet when I checked the version of the Ubuntu VM, the mesa driver version was older than the known to be causing these issues.

Configuration (required)

Crash log

Debug log debug.log

Upload VM I always used the UTM prebuilt VM, in the UTM Gallery. I managed to get the exact same issue with Ubuntu 20.04 and Debian 12

Henriouss commented 10 months ago

This seems very similar to the issue I have on #5976 . I haven’t found any alternative.

Henriouss commented 10 months ago

After investigation I can confirm, using the virtil-ramfb without GPU acceleration enable does NOT result in any crashes on Ubuntu or Kali Linux (.utm machines provided in the UTM gallery). Something is wrong with the GPU acceleration.

kmatheussen commented 10 months ago

If this is the problem where everything freezes, meaning you can't click on anything and nothing happens when pressing the keyboard, then turning off GPU acceleration made no difference here, if anything it just made it happen more often. What I found to work was to increase memory. Increasing it from 2 to 4 GB helps a lot.

kmatheussen commented 10 months ago

It still freezes now and then, but far less often with more memory.

Quantizr commented 10 months ago

Able to reproduce the issue on iPad Pro 11 inch 3rd gen running iOS 16.2 with Debian 12 as the guest. Issue only occurs on Default and ANGLE (OpenGL) backends.

Have not been able to reproduce the issue on ANGLE (Metal) which could serve as a temporary fix for usability purposes.

AbrahamR176 commented 9 months ago

Upon testing, it seems setting the the backend to metal as Quantizr described fixed the crashing issue.

BlakeOttinger commented 9 months ago

This is very likely another issue with the mesa drivers. I experienced some issues a few weeks ago that were resolved upon updating the drivers in Ubuntu (they appear to have hit the repos on 23.10). Some distributions may not have the latest ones in the repos, sometimes it's worthwhile to get them straight from the PPA if the distribution being used has a compatible third party repository with the upstream ones.