microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
107.6k stars 6.34k forks source link

[Run] COMException: Desktop composition is disabled (0x80263001) #30507

Open Salim-F8 opened 7 months ago

Salim-F8 commented 7 months ago

Microsoft PowerToys version

0.76.2

Installation method

Microsoft Store

Running as admin

Yes

Area(s) with issue?

General

Steps to reproduce

2023-12-18.txt

✔️ Expected Behavior

No response

❌ Actual Behavior

Display flickered, seemed like a gpu glitch or crash at the time it happened.

Other Software

No response

Jay-o-Way commented 7 months ago

Hello and thanks for your message. Can you tell what happened before the issue? Was it at the start-up of PowerToys, or a specific module, or..?

Salim-F8 commented 7 months ago

Hello, thanks for the reply.

Nothing was happening before, PowerToys was idle at the system tray, I have it running on startup. So no specific module that I can tell.

It actually occured again after a system reboot. The log was appended.

2023-12-18.txt

davidegiacometti commented 7 months ago

Error from the report

System.Runtime.InteropServices.COMException: {Desktop composition is disabled} The operation could not be completed because desktop composition is disabled. (0x80263001)
   Source: PresentationFramework
   TargetAssembly: PresentationFramework, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
   TargetModule: PresentationFramework.dll
   TargetSite: Void DwmExtendFrameIntoClientArea(IntPtr, Standard.MARGINS ByRef)
   at Standard.NativeMethods.DwmExtendFrameIntoClientArea(IntPtr hwnd, MARGINS& pMarInset)
   at System.Windows.Shell.WindowChromeWorker._ExtendGlassFrame()
   at System.Windows.Shell.WindowChromeWorker._UpdateFrameState(Boolean force)
   at System.Windows.Shell.WindowChromeWorker._HandleDwmCompositionChanged(WM uMsg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Shell.WindowChromeWorker._WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
davidegiacometti commented 6 months ago

Looked a bit into this error and it's kinda weird. References:

Desktop composition should always be enabled from Windows 8 and we should never receive WM_DWMCOMPOSITIONCHANGED. Also note that the code that handle the message double check if composition is enabled.

EDIT: OP and many users in duplicate issues reported screen flickering / turning black when this occur so it may be related to graphic cards driver.

stefansjfw commented 6 months ago

@Salim-F8 Does this still happen? Could you try updating your graphic card driver if it's not up to date? /needinfo

Jay-o-Way commented 5 months ago

@crutkas prio-0 but also closed?

stefansjfw commented 5 months ago

FYI Discussion moved here https://github.com/microsoft/PowerToys/issues/31226

Salim-F8 commented 5 months ago

@Salim-F8 Does this still happen? Could you try updating your graphic card driver if it's not up to date? /needinfo

Soon after the issue disappeared. Dunno want triggered it to be frank, but I didn't update my GPU drivers in the meantime for sure. Sorry for the belated feedback.

Jay-o-Way commented 2 months ago

@ethanfangg Do you know what the actual status of this issue is, at the moment?

jaimecbernardo commented 2 months ago

@ethanfangg Do you know what the actual status of this issue is, at the moment?

Hi @Jay-o-Way , no one in the team managed to repro. Idea is try to merge https://github.com/microsoft/PowerToys/pull/32118 and see if that brings reports down. Looks a bit worse, but it's better than a crash.

JamesDBartlett3 commented 2 months ago

I'm experiencing the same issue, but I'm running PowerToys v0.81.0.0, which is the latest version at the time of this writing. I opened an issue for it the other day, but then I found this one, so I closed my issue and I'm now subscribing to this one.

TonnyWildeman commented 1 month ago

Windows (not the OS, but the windows of any program like Notepad, vscode, etc.) freeze. Do not respond to clicks anymore. Mouse does still work when the screen is about to crash to black.

I have this issue happening every 2 hrs-ish. Not only when using the hotkey to open up PowerToys Run. I also noticed that the run window has no content when opening it just after a full crash.

Events in order:

  1. no interactions with windows possible, mouse movement works
  2. screen goes to black
  3. screen comes back with content of programs being redrawn. Except for Freecad, which gets stuck.
  4. PowerToys run shows no content in window 1st time
  5. PowerToys run shows content in window 2nd time

Graphics card is a ASRock AMD Radeon RX6750 XT 12GB with version from Device Manager properties: 30.0.15021.11005

Any tracing I can turn on to find out more? Due to the multiple crashes a day, I can have a relatively fast turnaround.

gmchanwing commented 3 weeks ago

I was AFK and had this error log when I came back to my PC.

Version: 0.79.0.0 OS Version: Microsoft Windows NT 10.0.19045.0 IntPtr Length: 8 x64: True Date: 2024-07-01 7:50:16 PM Exception: System.Runtime.InteropServices.COMException (0x80263001): {Desktop composition is disabled} The operation could not be completed because desktop composition is disabled. (0x80263001) at Standard.NativeMethods.DwmExtendFrameIntoClientArea(IntPtr hwnd, MARGINS& pMarInset) at System.Windows.Shell.WindowChromeWorker._ExtendGlassFrame() at System.Windows.Shell.WindowChromeWorker._UpdateFrameState(Boolean force) at System.Windows.Shell.WindowChromeWorker._HandleDwmCompositionChanged(WM uMsg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Shell.WindowChromeWorker._WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Saitpstc commented 1 week ago

received same error on 0.82.1 for me it occurs when I try to select an application from taskbar or try to change setting from system tray image