VMware Workstation

 View Only

 Linux guest goes permanently black after a host UAC prompt / lock-unlock (DX12 present backend, DEVICE_REMOVED partial recovery) — Workstation 26h1

Christian Anke's profile image
Christian Anke posted Jul 07, 2026 04:24 AM

SUMMARY

On a Windows host, a Linux guest presented via the DX12 present backend turns permanently black whenever the host does a secure-desktop switch — a UAC elevation prompt or a Win+L lock/unlock. The VM keeps running (guest, apps, SSH all alive); only the displayed image is lost. It does NOT recover on its own, and NOT on a guest reboot or a VM reset — only on Suspend/Resume or a full power-cycle. A Windows guest on the identical host does NOT hit this. I've traced it to a host-side DX12 "device-removed partial recovery" bug in vmware-vmx.exe. I'm looking to (a) confirm others see it, and (b) get a VMware engineer to confirm it's tracked / fixable — because both known workarounds are unacceptable.

IMPORTANT — not every VM is affected, and it is intermittent: it hits LINUX guests presented via DX12 (VKRenderer); a WINDOWS guest on the same host does not hit it at all. And even on an affected Linux guest, a given secure-desktop switch is hit-or-miss. So "it works fine here" does not mean the bug is absent — see the note under STEPS TO REPRODUCE.


ENVIRONMENT

 •  VMware Workstation 26.0.0 build-25388281 ("26h1"); the same behavior exists in 25.x (build-25219725).
 •  Host: Windows 11, UAC enabled. NVIDIA (Optimus) laptop — also reproduces in discrete-only BIOS mode, so it is not an Optimus GPU-switch artifact.
 •  Guest: Kubuntu, KDE Plasma Wayland/KWin, stock in-tree vmwgfx. Reproduces fully stock.
 •  Present config: mks.enableDX12Presentation="TRUE", remoteMKSHardwareAccel="TRUE"; renderer = ISBRenderer (VKRenderer). Host log at power-on: "MKS-HWinMux: Started DX12 presentation backend."


STEPS TO REPRODUCE

 1.  Power on the Linux guest with the DX12 present backend active.
 2.  On the host, trigger a UAC elevation (any admin prompt = secure-desktop switch) — or lock/unlock the host.
 3.  Repeat about 10–20 times. Intermittently the guest window goes black and stays black.
 4.  Confirm it clears only via Suspend/Resume or power-on — not by closing/resizing the VMware window, switching monitors, changing guest resolution, guest reboot, or VM reset.

WHY NOT EVERYONE SEES IT — two things determine whether you reproduce it:

 •  Which guest (VM-dependent): this affects LINUX guests presented via the DX12 backend (VKRenderer). A WINDOWS guest on the same host does NOT hit it — its WDDM present path never sees the device removal. So the single biggest factor is what is running in the VM. (Among the Linux guests I've tested the behavior is consistent — two Kubuntu VMs behaved identically and a fully-stock guest fails too — so I have not seen one Linux VM be intrinsically immune; the remaining variation is the per-switch lottery below.)

 •  Per switch (intermittent): on an affected Linux guest, some secure-desktop switches cause a genuine DXGI_ERROR_DEVICE_REMOVED (black); others only transient DXGI_ERROR_INVALID_CALL / E_ACCESSDENIED that do not trigger the recovery (survive). So you may need several attempts to hit it, and surviving a few does not mean you are immune.

Caveat on scope: I've only tested this on ONE physical host, so I can't say whether the host GPU/driver changes how OFTEN a switch escalates to a genuine device removal — that's plausible but unverified, which is exactly why I'm asking others to report their setup below. The underlying vmware-vmx recovery defect is host-side and would apply to any host that does experience a genuine DEVICE_REMOVED with a Linux/DX12 guest.


CURRENT BEST MITIGATION (for anyone else hitting this)

 •  UAC case — fixed by disabling the UAC secure desktop: UAC slider to "Notify me... (do not dim my desktop)" (HKLM\...\Policies\System\PromptOnSecureDesktop = 0). No secure-desktop switch means no device removal means no black, and DX12 present is retained. Caveats: modest security reduction, and it does not cover lock/unlock.
 •  Lock/unlock case — no config fix. Practical options: disable idle auto-lock (so a lock never surprises you mid-call), and use Suspend/Resume to clear it if it happens.


WHAT I'VE ALREADY RULED OUT (all tested, no effect)

 •  mks.enableDX12Presentation="FALSE" — avoids the bug but disables the DX12 BlitToSharedSurface GPU present path, falling back to software compositing (large present-latency regression vs a Windows guest). Not acceptable.
 •  enableDXGIPresentation="TRUE" (DX12 off) — fails to start here: "MKS-HWinMux: Failed to start a presentation backend" (only GDI/software starts).
 •  Disable MPO (Dwm\OverlayTestMode=5), NoLockScreen=1, TdrDelay — no effect (and hr is DEVICE_REMOVED 0x887A0005, not DEVICE_HUNG — a genuine removal, not a TDR/timeout; VRAM is not exhausted).
 •  mks.dx12.gpuPreference / mks.dx12.vendorId, NVIDIA high-performance — no effect.
 •  HAGS off, PCIe Link State Power Management off — no effect (expected: the removal is a desktop/session switch, not a power or scheduling event).
 •  USB passthrough, concurrency, guest kernel/compositor/driver (fully stock fails identically).


TECHNICAL ROOT CAUSE (host-side reverse engineering — optional detail)

Included so it's clear this is a real, localized defect, not a config problem. Function addresses are 26h1, image base 0x140000000; I can provide logs and decompilations.

The Linux-guest present is a cross-process shared-surface blit: the sandboxed VKRenderer creates a D3D shared texture plus an NT shared handle (DX12Renderer::CreateSharedSurface, FUN_14021c1c0), the guest frame is blitted into it (FUN_1402278f0), and the present backend opens that surface and blits it into the swapchain back buffer behind an IDXGIKeyedMutex (DXGIBlitToBackbuffer, FUN_1401b0850 / FUN_140240e50) on an HWND FLIP_DISCARD swapchain.

On the secure-desktop switch the host DX12 present device is removed (DX12Window::Present returns hr = DXGI_ERROR_DEVICE_REMOVED 0x887A0005). The recovery (FUN_140264730 -> FUN_140175b20 -> reset-worker FUN_1401753c0 -> StartBackend FUN_1401790e0) rebuilds the renderer + present backend + swapchain successfully — Present() even returns S_OK — but it never re-establishes the shared-surface content binding. Three steps that run only at MKS ThreadPowerOn (FUN_14014aec0) or on the renderer's surface-publish event are skipped:

 1.  the shared-surface re-import handshake HWinMux_SharedSurfaceReady (FUN_140179b80) that re-opens the source into the NEW device and re-acquires its keyed mutex;
 2.  the SWBScreenComp per-screen source-handle table (DAT_1415d6870), whose only writer is the cold-init FUN_14015fa70;
 3.  a refresh of the per-window cached surface id (DX12Window+0x28) — the texture builders have a same-size early-out, so an unchanged-resolution recovery reuses the stale surface.

Because the guest keeps rendering, DX12EndFrame (FUN_140242690) re-registers the cached (dead) surface id as the present source every frame, so the keyed-mutex AcquireSync returns 0x80 and the binary logs "DXGIPresentation: Shared surface in an inconsistant state!" — blit skipped — black, forever. This is the classic DX12 "partial device-lost recovery" failure that Microsoft's own device-removed guidance / DirectXTK12 DeviceResources warn about: on device removal you must recreate the device + swapchain AND all device-dependent + content bindings, not just device + swapchain.


WHAT I'M ASKING VMWARE (either resolves it)

 1.  Complete the recovery: on DEVICE_REMOVED, after restarting the renderer/backend, also re-import the guest shared surface into the new present device + re-acquire its keyed mutex, invalidate the per-window cached texture so it re-creates/re-DEFINEs on the new device, and re-init the SWBScreenComp source table — i.e. re-establish the content binding, not just the swapchain.
 2.  Or prevent the removal: figure out why the Windows/WDDM guest present path never sees DEVICE_REMOVED across the same secure-desktop switch, and apply the same handling to the Linux/VKRenderer path.


QUESTIONS FOR THE COMMUNITY / VMWARE

 •  Anyone else running a Linux guest with DX12 presentation seeing black-outs on UAC prompts or lock/unlock? Please reply so this gets weighted — whether you DO or DON'T reproduce it (reports either way help). Please include: guest OS/distro and whether DX12 presentation is on; and host GPU + driver version, laptop or desktop, and whether it's an Optimus/hybrid-graphics system. Comparing setups that hit it vs. those that don't is how we pin down which configurations actually escalate a desktop switch to a genuine device removal.
 •  Can a VMware engineer confirm whether this is already tracked internally, and whether a fix is planned for a Workstation update?

I have vmware.log excerpts (the DEVICE_REMOVED recovery vs a healthy Suspend/Resume bring-up), Frida instrumentation traces, and per-function decompilations for all addresses above — glad to attach whatever helps. Thanks!

Attachment  View in library
vmware.log 387 KB
Shibdas Bandyopadhyay's profile image
Broadcom Employee Shibdas Bandyopadhyay

We added vulkan presentation for this issue specifically. You need to disable DX12 and enable vulkan presentation,

mks.enableVulkanPresentation = "TRUE"
mks.enableDX12Presentation = "FALSE"

Once you do that, please send the logs to verify.

Christian Anke's profile image
Christian Anke

Thank you for your answer.

Since this was the default i have tested that already (sorry for not mentioning it). Unfortunately this is the sub optimal presentation backend when it comes to responsiveness and graphics performance. I wanted to reach on the same UI performance on a KDE VM as i have perceived with a Windows 11 VM and found the DX12 presentation backend is the best one here. This is why i would like to stick to it.

But i have a follow-up with a significant update. Since posting, I've been able to narrow down exactly what determines WHICH VM goes black and WHEN — and it's cleaner and more reproducible than the "intermittent" picture in my first post. It comes down to a single thing: which VM is in the FOREGROUND.


THE PATTERN

 •  On a host lock/unlock, the VM in the FOREGROUND (the selected Workstation tab, the one actively displayed) is the one whose DX12 device is removed and left unrecovered -> black.
 •  A VM sitting in a BACKGROUND tab survives the exact same lock.
 •  Cleanest demonstration: with two Linux VMs open at once, a single lock/unlock blacks out the foreground one and leaves the background one running — same host, same event, split purely by which tab is in front.

This also explains the "intermittent / VM-dependent" behavior I described earlier: my two Linux VMs are actually identical in this respect (same .vmx bar USB entries, same displays), and what looked random was really just whichever VM happened to be in front at the moment of the switch. For the lock trigger, with a VM in the foreground, it reproduces essentially every time.


TWO CLUES THAT PIN DOWN THE MECHANISM

 •  MINIMIZING the Workstation window does NOT protect the foreground VM.
 •  Switching Workstation to the HOME tab (so no VM is displayed) DOES — the VM then survives the lock.

So it's tied to which VM's swapchain Workstation is actively presenting on screen, not to whether the window is visible. That fits the root cause in the original post exactly: the foreground VM is the one whose active DX12 present device is bound to the output the secure desktop takes over, so that's the device that gets removed — and the recovery never re-establishes its shared-surface content binding.


A LOCK-CASE WORKAROUND I CAN NOW ADD (keeps DX12, no performance loss)

My original post said the lock/unlock case had no workaround. There's at least a reliable habit:

 •  BEFORE locking, switch Workstation to the HOME tab (or move the VM you care about to a background tab). The VM then rides through the lock intact. Note: minimizing the window does NOT work — it has to be the Home/background tab.
 •  Combine with disabling idle auto-lock, so a surprise lock never catches a VM in the foreground.
 •  Suspend/Resume still clears it if a VM does go black.

It's a manual habit rather than a fix, but it's the first thing that reliably prevents the lock-case black while keeping DX12 presentation on.


WHY THIS HELPS TOWARD A FIX

Because it's deterministic, it reproduces in one try — just lock with a VM in the foreground — which should make it far easier for VMware to reproduce than "intermittent." And it points straight at the repair: on DEVICE_REMOVED the recovery needs to re-establish the foreground present device's shared-surface binding (or avoid removing it in the first place), instead of stopping at "device + swapchain rebuilt."


FOR ANYONE FOLLOWING ALONG

If you also run a Linux guest with DX12 presentation: does a host lock black out only your FOREGROUND VM, and does switching to the Home tab before locking save it — same as I'm seeing? A confirmation (or a counter-example) would help. Still tested here on one host (Windows 11, NVIDIA); a Windows guest does not reproduce it.

Shibdas Bandyopadhyay's profile image
Broadcom Employee Shibdas Bandyopadhyay

>> Since this was the default i have tested that already (sorry for not mentioning it). Unfortunately this is the sub optimal presentation backend when it comes to responsiveness and graphics performance. I wanted to reach on the same UI performance on a KDE VM as i have perceived with a Windows 11 VM and found the DX12 presentation backend is the best one here. This is why i would like to stick to it.

Vulkan presentation is also hardware accelerated and from our testing performs as good as DX12 presentation. Note that we have two components using the GPU, presentation backend and renderer backend. We have switched to vulkan Renderer for  rendering a while ago. If you look at your vmware.log you will see it being powered on

"2026-07-04T18:53:24.583Z -INFO vmware-vmx.exe 12680 [ws@4413 threadName="mks"] MKSRenderMain: ISB enabled by config
2026-07-04T18:53:24.583Z -INFO vmware-vmx.exe 12680 [ws@4413 threadName="mks"] MKSRenderMain: Collecting RenderOps caps from ISB
2026-07-04T18:53:24.583Z -INFO vmware-vmx.exe 12680 [ws@4413 threadName="mks"] MKSRenderMain: Starting ISB
2026-07-04T18:53:24.583Z -INFO vmware-vmx.exe 12680 [ws@4413 threadName="mks"] ISBRendererComm: ISBRendererComm DataChannel size=4294967296
2026-07-04T18:53:24.599Z -INFO vmware-vmx.exe 12680 [ws@4413 threadName="mks"] LocalMKS: MKS_UUID=52 7c 14 cc fe 9b 70 a3-a1 24 67 77 f9 50 e9 32
2026-07-04T18:53:24.601Z -INFO vmware-vmx.exe 12680 [ws@4413 threadName="mks"] LogRotation: Rotating to a new log file (keepOld 3) took 0.000568 seconds.
2026-07-04T18:53:24.601Z -INFO vmware-vmx.exe 12680 [ws@4413 threadName="mks"] ISBRendererComm: mksSandbox command-line: C:\Program Files\VMware\VMware Workstation\x64\mksSandbox.exe --pipeInfo \\.\pipe\vmware\mksSandbox\mksSandbox-52 b5 89 a2 6d 32 73 d4-0e f0 6b c4 50 84 ff bd
2026-07-04T18:53:24.637Z -INFO vmware-vmx.exe 12680 [ws@4413 threadName="mks"] ISBRendererComm: Spawned process with handle 1512
2026-07-04T18:53:24.637Z -INFO vmware-vmx.exe 12680 [ws@4413 threadName="mks"] ISBRendererComm: Waiting for mksSandbox state 1...
2026-07-04T18:53:24.814Z -INFO vmware-vmx.exe 12680 [ws@4413 threadName="mks"] ISBRendererComm: Sandbox Renderer: VKRenderer
2026-07-04T18:53:24.814Z -INFO vmware-vmx.exe 12680 [ws@4413 threadName="mks"] MKS: Renderer adapter luid = 0x1678B
2026-07-04T18:53:24.815Z -WARNING vmware-vmx.exe 12680 [ws@4413 threadName="mks"] mksSandboxLog: Vulkan Renderer: VK_MESA_fragment_coverage_mask extension not supported. Per-sample coverage mask will not follow d3d convention.
2026-07-04T18:53:24.818Z -INFO vmware-vmx.exe 12680 [ws@4413 threadName="mks"] MKSRenderMain: Started ISB (VK)
2026-07-04T18:53:24.818Z -INFO vmware-vmx.exe 12680 [ws@4413 threadName="mks"] MKSRenderMain: Found Full Renderer: ISBRenderer (VKRenderer)"

Your mksSandbox.log would also say which renderer we powered on.

So vulkan presentation works quite well with vulkan renderer which accelerated shared surface blits without any software fallback. If we are seeing graphics perf issues that might be somehting else we need to look at.

Unfortunately, we were not able to find fix for the DX12 presentation issue that you are hitting as Microsoft is yanking the device underneath us. We tried creating the swapchain with various flags but nothing was able to workaround the problem.

Christian Anke's profile image
Christian Anke

Thanks again, that was helpful.

i gave it another try to use the Vulkan presentation, unfortunately i experience other issues with the VMWare UI now - but the rendering is faster!

What i experience now is that i can not see the VMWare control panel when having the VM in fullscreen. Therefore i can not switch to multi monitor as well as i am unable to leave the VMs window so i can not even navigate on the Host machine any longer. I have to shutdown the VM to get back my cursor.

So, i can remember that with 25H2 the default behavior was different. There it started with a GDI presentation by default:

2026-06-09T11:37:18.652Z -INFO vmware-vmx-debug.exe 10832 [ws@4413 threadName="mks"] MKS-HWinMux: Started GDI presentation backend.

And with VKRenderer:

2026-06-09T11:37:18.343Z -INFO vmware-vmx-debug.exe 10832 [ws@4413 threadName="mks"] ISBRendererComm: Sandbox Renderer: VKRenderer

This is where i started looking around and tweak things.

Now with 26H1 the default behavior changed (i even tried with a fresh .vmx) so that the previously described issues are present even for stock configured VMs.

I have seen this behavior as well during my journey when switching to Vulkan presentation and this is why i abandoned this way as it seemed more broken than the DX12 way.

Btw. i was able to see that Vulkan render and presentaion was fired up.

So, i could use the Vulkan presenation and benefit from better performance, but what can i do about the inability to navigate on the host?

Many thanks so far.

Shibdas Bandyopadhyay's profile image
Broadcom Employee Shibdas Bandyopadhyay

>>> So, i could use the Vulkan presenation and benefit from better performance, but what can i do about the inability to navigate on the host?

That's the same question we asked before this release as we couldn't reproduce your bug in house for devs to work on (We think it might be NVIDIA driver bug but we don't have enough to file a bug with them) and we decided to turn off vulkan presentation. So if your only requirement in full screen VM is go back to  host you can use the hotkey ctrl+alt+enter. I wish I had better answer for you regarding the bug but we are not able to hit it here.