utmapp / UTM

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

Windows 11 VM black screen when expanded to Full Screen mode #3631

Open LPFchan opened 2 years ago

LPFchan commented 2 years ago

Describe the issue

https://user-images.githubusercontent.com/1547081/154188833-f975600c-419b-401d-a0ef-d8c75a6281b6.mov

I have Windows 11 21H2 VM with SPICE 0.164.3 running. Resolution changes as I resize the VM window without issues. However when I expand the window into Full Screen mode (Globe+F or 🟢 button) the screen goes black and will not adapt to my monitor's full resolution (3840x2160). When I exit Full Screen mode the VM comes back to normal.

Configuration

Crash log No crashes.

Debug log

Running:  -L /Applications/UTM.app/Contents/Resources/qemu -S -qmp tcp:127.0.0.1:4001,server,nowait -nodefaults -vga none -spice "unix=on,addr=/Users/yeowool/Library/Group Containers/WDNLXAD4W8.com.utmapp.UTM/DACB7AD3-3E50-4767-B633-669CC4319FA0.spice,disable-ticketing=on,image-compression=off,playback-compression=off,streaming-video=off,gl=on" -device virtio-ramfb-gl -device virtio-rng-pci -cpu host -smp cpus=4,sockets=1,cores=4,threads=1 -machine virt,highmem=off -accel hvf -accel tcg,tb-size=1536 -drive if=pflash,format=raw,unit=0,file=/Applications/UTM.app/Contents/Resources/qemu/edk2-aarch64-code.fd,readonly=on -drive if=pflash,format=raw,unit=1,file=/Users/yeowool/Library/Containers/com.utmapp.UTM/Data/Documents/Windows.utm/Images/efi_vars.fd -boot menu=on -m 6144 -device intel-hda -device hda-duplex -name Windows -device nec-usb-xhci,id=usb-bus -device usb-tablet,bus=usb-bus.0 -device usb-mouse,bus=usb-bus.0 -device usb-kbd,bus=usb-bus.0 -device ich9-usb-ehci1,id=usb-controller-0 -device ich9-usb-uhci1,masterbus=usb-controller-0.0,firstport=0,multifunction=on -device ich9-usb-uhci2,masterbus=usb-controller-0.0,firstport=2,multifunction=on -device ich9-usb-uhci3,masterbus=usb-controller-0.0,firstport=4,multifunction=on -chardev spicevmc,name=usbredir,id=usbredirchardev0 -device usb-redir,chardev=usbredirchardev0,id=usbredirdev0,bus=usb-controller-0.0 -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=usb-controller-0.0 -chardev spicevmc,name=usbredir,id=usbredirchardev2 -device usb-redir,chardev=usbredirchardev2,id=usbredirdev2,bus=usb-controller-0.0 -device usb-storage,drive=cdrom0,removable=true,bootindex=0,bus=usb-bus.0 -drive if=none,media=cdrom,id=cdrom0 -device nvme,drive=drive0,serial=drive0,bootindex=1 -drive if=none,media=disk,id=drive0,file=/Users/yeowool/Library/Containers/com.utmapp.UTM/Data/Documents/Windows.utm/Images/data.qcow2,cache=writethrough -device virtio-net-pci,mac=9A:14:F7:21:BF:F5,netdev=net0 -netdev vmnet-macos,mode=shared,id=net0 -device virtio-serial -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 -chardev spicevmc,id=vdagent,debug=0,name=vdagent -device virtserialport,chardev=charchannel1,id=channel1,name=org.spice-space.webdav.0 -chardev spiceport,name=org.spice-space.webdav.0,id=charchannel1 -uuid DACB7AD3-3E50-4767-B633-669CC4319FA0 -rtc base=localtime
qemu-aarch64-softmmu: -netdev vmnet-macos,mode=shared,id=net0: info: Started vmnet interface with configuration:
qemu-aarch64-softmmu: -netdev vmnet-macos,mode=shared,id=net0: info: MTU:              1500
qemu-aarch64-softmmu: -netdev vmnet-macos,mode=shared,id=net0: info: Max packet size:  1514
qemu-aarch64-softmmu: -netdev vmnet-macos,mode=shared,id=net0: info: MAC:              ea:f3:90:b6:f2:1f
qemu-aarch64-softmmu: -netdev vmnet-macos,mode=shared,id=net0: info: DHCP IPv4 start:  192.168.64.1
qemu-aarch64-softmmu: -netdev vmnet-macos,mode=shared,id=net0: info: DHCP IPv4 end:    192.168.64.254
qemu-aarch64-softmmu: -netdev vmnet-macos,mode=shared,id=net0: info: IPv4 subnet mask: 255.255.255.0
qemu-aarch64-softmmu: -netdev vmnet-macos,mode=shared,id=net0: info: UUID:             8B8293F2-CC04-4221-871F-DF582A6B0680
qemu-aarch64-softmmu: warning: Spice: playback:0 (0x1508d3140): setsockopt failed, Operation not supported on socket
qemu-aarch64-softmmu: warning: Spice: record:0 (0x1508d31f0): setsockopt failed, Operation not supported on socket
gl_version 30 - es profile enabled
WARNING: running without ARB/KHR robustness in place may crash
qemu-aarch64-softmmu: Spice: red-qxl.c:807:spice_qxl_gl_scanout: condition `qxl_state->gl_draw_cookie == GL_DRAW_COOKIE_INVALID' failed

Upload VM

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>ConfigurationVersion</key>
    <integer>2</integer>
    <key>Debug</key>
    <dict/>
    <key>Display</key>
    <dict>
        <key>ConsoleFont</key>
        <string>Menlo</string>
        <key>ConsoleFontSize</key>
        <integer>12</integer>
        <key>ConsoleOnly</key>
        <false/>
        <key>ConsoleTheme</key>
        <string>Default</string>
        <key>DisplayCard</key>
        <string>virtio-ramfb-gl</string>
        <key>DisplayDownscaler</key>
        <string>linear</string>
        <key>DisplayRetina</key>
        <true/>
        <key>DisplayUpscaler</key>
        <string>nearest</string>
    </dict>
    <key>Drives</key>
    <array>
        <dict>
            <key>DriveName</key>
            <string>cdrom0</string>
            <key>ImageType</key>
            <string>cd</string>
            <key>InterfaceType</key>
            <string>usb</string>
            <key>Removable</key>
            <true/>
        </dict>
        <dict>
            <key>DriveName</key>
            <string>drive0</string>
            <key>ImagePath</key>
            <string>data.qcow2</string>
            <key>ImageType</key>
            <string>disk</string>
            <key>InterfaceType</key>
            <string>nvme</string>
        </dict>
        <dict>
            <key>DriveName</key>
            <string>drive04BA9D5F-DA13-49F2-9B56-63C105CF2AC4</string>
            <key>ImagePath</key>
            <string>efi_vars.fd</string>
            <key>ImageType</key>
            <string>none</string>
            <key>InterfaceType</key>
            <string></string>
        </dict>
    </array>
    <key>Info</key>
    <dict>
        <key>Icon</key>
        <string>windows 11 start button 4x.png</string>
        <key>IconCustom</key>
        <true/>
    </dict>
    <key>Input</key>
    <dict>
        <key>InputInvertScroll</key>
        <true/>
        <key>InputLegacy</key>
        <false/>
    </dict>
    <key>Networking</key>
    <dict>
        <key>NetworkCard</key>
        <string>virtio-net-pci</string>
        <key>NetworkCardMAC</key>
        <string>9A:14:F7:21:BF:F5</string>
        <key>NetworkMode</key>
        <string>shared</string>
    </dict>
    <key>Printing</key>
    <dict/>
    <key>Sharing</key>
    <dict>
        <key>ClipboardSharing</key>
        <true/>
        <key>DirectoryReadOnly</key>
        <false/>
        <key>DirectorySharing</key>
        <true/>
        <key>Usb3Support</key>
        <false/>
        <key>UsbRedirectMax</key>
        <integer>3</integer>
    </dict>
    <key>Sound</key>
    <dict>
        <key>SoundCard</key>
        <string>intel-hda</string>
        <key>SoundEnabled</key>
        <true/>
    </dict>
    <key>System</key>
    <dict>
        <key>Architecture</key>
        <string>aarch64</string>
        <key>BootDevice</key>
        <string></string>
        <key>BootUefi</key>
        <true/>
        <key>CPU</key>
        <string>default</string>
        <key>CPUCount</key>
        <integer>4</integer>
        <key>MachineProperties</key>
        <string>highmem=off</string>
        <key>Memory</key>
        <integer>6144</integer>
        <key>RngEnabled</key>
        <true/>
        <key>SystemUUID</key>
        <string>DACB7AD3-3E50-4767-B633-669CC4319FA0</string>
        <key>Target</key>
        <string>virt</string>
        <key>UseHypervisor</key>
        <true/>
    </dict>
</dict>
</plist>
osy commented 2 years ago

Wondering if it's too large for QEMU's graphics driver to handle. Can you, for testing, change your Mac's screen resolution to something low like 1080p (no retina) and see if you still experience this?

LPFchan commented 2 years ago

Just tried and checked it's working fine when it's running on lower resolution.

1920x1080 (no retina): works without issue 2560x1440 (no retina): works without issue

On Sun, Feb 20, 2022 at 11:15 AM osy @.***> wrote:

Wondering if it's too large for QEMU's graphics driver to handle. Can you, for testing, change your Mac's screen resolution to something low like 1080p (no retina) and see if you still experience this?

— Reply to this email directly, view it on GitHub https://github.com/utmapp/UTM/issues/3631#issuecomment-1046145037, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALZWSPUXWH54IMTCQAXAK3U4BFCHANCNFSM5OQLQOXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

conath commented 2 years ago

I can reproduce this as well. With "Retina Mode" enabled going into full screen on a 4K display causes the VM to show black screen. Without "Retina Mode" the VM resizes to 1080p as expected and works fine.

Screenshot of UTM app VM Display settings, with the Retina Mode toggle enabled and highlighte with a red circle.
berkaytheunicorn commented 1 year ago

This issue still exists in 4.1.5

dadepretto commented 1 year ago

I have the same issue with version 4.1.5, SPICE Tools installed, "Retina Mode" enabled, and an LG UltraFine 5K monitor.

3456 x 2234 is working fine 4480 x 2520 and 5120 x 2880 display a black window (although the mouse is displayed correctly)

kFYatek commented 1 year ago

It looks that the limit for the Windows guest resolution is 7.5*1024*1024 pixels (so e.g. 3840x2048 or 4096x1920) and it is probably a limitation or bug in the virtio graphics driver for Windows.

I reported this in the virtio-gpu-wddm-dod project a couple of months ago, too, but no response there: https://github.com/utmapp/virtio-gpu-wddm-dod/issues/4

maddoglee commented 10 months ago

The issue still exists in 4.4.4

reecho-tsai commented 4 months ago

still exists in 4.5.2😢

ghost commented 3 months ago

Still exists on version 4.5.3.

cyn8 commented 2 months ago

+1 - issue still exists on 4.5.3

emircanerkul commented 1 month ago

Using 4.5.3 having same issue. But in my case i get black screen after win login with/without fullscreen mode enabled.

maddoglee commented 1 week ago

Still exists in v4.5.4 (100) I found that it goes black when the horizontal pixels go above 3750... (i think). My resized display works at 3748x2097 and 3747x2097.. when I drag the window horizontally a touch more, the screen goes black. Anyone got a workaround? I've just been using UTM in a large window which is ok, but it would be nice to be absolutely full screen.

kFYatek commented 1 week ago

@maddoglee As I mentioned in https://github.com/utmapp/virtio-gpu-wddm-dod/issues/4, the limit seems to be exactly 7864320 pixels (7.5*1024*1024) in area. You can go beyond 3750 horizontally if you use less vertical space, e.g. 3840x2048 is fine (and exactly at the limit).

This is especially annoying because the limit is below some common resolutions, e.g. standard "4K", i.e. 3840x2160, is 8294400 pixels (i.e., ~7.91*1024*1024).

maddoglee commented 1 week ago

Ahhh I missed your other post. Thanks for the explanation!