The Desktop Window Manager
Before WindowsВ Vista, a Windows program would draw directly to the screen. In other words, the program would write directly to the memory buffer shown by the video card. This approach can cause visual artifacts if a window does not repaint itself correctly. For example, if the user drags one window over another window, and the window underneath does not repaint itself quickly enough, the top-most window can leave a trail:
The trail is caused because both windows paint to the same area of memory. As the top-most window is dragged, the window below it must be repainted. If the repainting is too slow, it causes the artifacts shown in the previous image.
WindowsВ Vista fundamentally changed how windows are drawn, by introducing the Desktop Window Manager (DWM). When the DWM is enabled, a window no longer draws directly to the display buffer. Instead, each window draws to an offscreen memory buffer, also called an offscreen surface. The DWM then composites these surfaces to the screen.
The DWM provides several advantages over the old graphics architecture.
- Fewer repaint messages. When a window is obstructed by another window, the obstructed window does not need to repaint itself.
- Reduced artifacts. Previously, dragging a window could create visual artifacts, as described.
- Visual effects. Because the DWM is in charge of compositing the screen, it can render translucent and blurred areas of the window.
- Automatic scaling for high DPI. Although scaling is not the ideal way to handle high DPI, it is a viable fallback for older applications that were not designed for high DPI settings. (We will return to this topic later, in the section DPI and Device-Independent Pixels.)
- Alternative views. The DWM can use the offscreen surfaces in various interesting ways. For example, the DWM is the technology behind Windows Flip 3D, thumbnails, and animated transitions.
Note, however, that the DWM is not guaranteed to be enabled. The graphics card might not support the DWM system requirements, and users can disable the DWM through the System Properties control panel. That means your program should not rely on the repainting behavior of the DWM. Test your program with DWM disabled to make sure that it repaints correctly.
Desktop Window Manager high CPU usage in Windows 10
Original Title: Desktop Window Manager — Help Me
So if you couldn’t figure out my issue. Desktop Window Manager is running non stop and eating up 50% and more of my CPU. It is really slowing everything down and its a pain in the butt to ‘End Task’ all day. (I have to do this 3 to 4 times a work day) What can I do to stop this from happening? Thank you in advance for any help.
Replies (11)
* Please try a lower page number.
* Please enter only numbers.
* Please try a lower page number.
* Please enter only numbers.
Thank you for posting your query in Microsoft Community. Let me help you.
I would suggest you to perform following methods and check.
Method 1: Run System Maintenance troubleshooter and check if it helps.
Follow the steps:
Press Windows and X key together and select Control Panel.
Click on Troubleshooting.
Click on View all option on the left side of the Windows.
Click on System Maintenance option.
Click on Next and follow the onscreen instructions to troubleshoot the issue.
If the issue still persists, continue to the next method.
Method 2: We will check the functionality in safe mode with networking.
Step 1: Safe mode with Networking.
Safe mode is useful for troubleshooting problems with programs and drivers that might not start correctly or that might prevent Windows from starting correctly. Safe mode starts Windows with a limited set of files and drivers. To start your system in safe mode follow the below steps:
On your lock screen, click on the power button and press shift + restart.
After that, you will be redirect to an option screen.
Select troubleshoot>advanced option > start up repair.
Follow the on screen instructions and select safe mode with networking.
If the issue still persists, please run a clean boot and check if the issue persists.
Step 2: Clean boot.
Putting your system inClean Boot state helps in identifying if any third party applications or startup items are causing the issue. You need to follow the steps from the article mentioned below to perform a Clean Boot.
DISCLAIMER: After troubleshooting, refer to this section «How to reset the computer to start normally after clean boot troubleshooting».
Check if it helps.
Keep us posted on the issue. We will be happy to assist you further.
5 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Nothing was detected and nothing was resolved. The answer was very generic and talked about third-party software, when the Desktop Window Manager is a built in windows feature. I would really like a legitimate solution to why this is happening every single day.
This is a service that you used to be able to turn off in previous OS, but now you can’t. Thank you in advance for any further information.
7 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Microsoft isn’t going to help you. I’ve told them time and time again about this problem and they keep responding with the same suggestions as they gave you. When I tell them their suggestions didn’t work I end up getting no response.
I see quite a few of your applications in your Task Manager are 32-bit, how long have you had your computer? Was Windows XP installed on it when you first got it? If so, you may be having issues because of a hardware limitation. All the computers that I have that had Windows XP on them ended up having the same issue with Windows 10, high CPU usage caused by the Desktop Window Manager. It wasn’t always like this though. Earlier builds of Windows 10 work just fine. Later builds are giving me a lot of trouble.
Whatever Microsoft did before worked just fine. I just don’t know what they changed or why they changed it. They won’t tell me. It’s as if they don’t want people with older hardware using Windows 10.
50 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
All I can suggest is to get a 64-bit version of your web browser and see if that helps. I’ll give you the link to Firefox which is what you’re using:
Be sure to select the one for Windows that has a 64 on it (second download option). That might fix your problem. Let me know if it does.
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
I’ve been running into this problem regularly in the past few weeks. I’ve had Windows 10 installed for much longer than that and this problem showed up independently of my Windows 10 upgrade.
In my case, I found that if I uninstalled my Citrix/GoToMeeting client, the problem went away.
I’m not saying that the fault lies with GoToMeeting, it could still be a Microsoft issue that is evident when GoToMeeting is installed.
Of course, it sucks to have to reinstall GoToMeeting whenever I have a conference call, but it’s better than having my CPU pegged at 100% 100% of the time.
Of course, when I reinstall GoToMeeting, the problem comes back until I uninstall it.
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Well the computer I have is a personal computer so there is no conference calling software on it or whatever. Pretty much the only things I have installed is a web browser, a media player, an office suite and a photo editor.
I do have an old computer but I highly doubt that has anything to do with the sluggishness I’m experiencing. My computer does meet the minimum system requirements to run Windows 10.
Whenever I open the Start Menu, Cortana or the Notification Center or open a Windows app such as Weather or the Xbox app, the CPU usage skyrockets to 100% and the Desktop Window Manager process is at the top of the list hogging all the resources. So when that happens, my computer slows way down.
I pretty much came to a decision that if Microsoft doesn’t resolve this problem by the time Redstone releases to the public, then I will be removing it from my computer. I also can’t recommend it to my friend who wanted Windows 10 installed on his computer which is as old as mine. Windows 10 simply does not work well on older hardware.
Desktop Window Manager
Desktop Window Manager
Included with
Service name
Service description
Related components
Desktop Window Manager (DWM, previously Desktop Compositing Engine or DCE) is the desktop graphical user interface system in Windows Vista and Windows 7 that enables the Windows Aero graphical user interface and visual theme. The Desktop Window Manager requires video cards supporting DirectX 9.0 and Shader Model 2.0. DWM is not included with Windows Vista Starter edition. It is included with Windows Vista Home Basic edition, but with some aspects of the Windows Aero interface (such as transparent Glass and Flip 3D) disabled. It is also included with Windows Server 2008, but requires the «Desktop Experience» feature and compatible graphics drivers to be installed. [1]
Contents
Architecture
The Desktop Window Manager is a Compositing window manager, each program has a buffer that it writes data to, the DWM then composites each program’s buffer into a final image, compared to the stacking window manager in Windows xp and earlier (and Windows 7 and Vista with aero disabled) which has each program writing to the same main buffer.
DWM works in different ways based on if it is the Windows 7 DWM or the Windows Vista DWM and if the graphics drivers it is using are WDDM 1.0 or 1.1. Under Windows 7 and with WDDM 1.1 drivers, DWM only writes the the program’s buffer to the video RAM, even if it is a GDI program, this is because Windows 7 supports (limited) hardware acceleration for GDI [2] and in doing so does not need to keep a copy of the buffer in system RAM so that the cpu can write to it.
Because the compositor has access to the graphics of all applications, it easily allows visual effects that string together visuals from multiple applications, such as transparency. The DWM uses DirectX 9 to perform the function of compositing and rendering in the GPU, freeing the CPU of the task of managing the rendering from the off-screen buffers to the display. However, it does not affect applications painting to the off-screen buffers; depending on the technologies used for that, it might still be CPU-bound. DWM-agnostic rendering techniques like GDI are redirected to the buffers by rendering the UI as bitmaps. DWM-aware rendering technologies like WPF directly make the internal data structures available in a DWM-compatible format. The window contents in the buffers are then converted to DirectX textures.
The desktop itself is a full-screen Direct3D surface, with windows being represented as a mesh consisting of two adjacent (and mutually-inverted) triangles, which are transformed to represent a 2D rectangle. The texture, representing the UI chrome, is then mapped onto these rectangles. Window transitions are implemented as transformations of the meshes, using shader programs. [3] With Windows Vista, the transitions are limited to the set of built-in shaders that implement the transformations. Greg Schechter, a developer at Microsoft has suggested that it might be opened up for developers and users to plug in their own effects in a future release. [4] The DWM only maps the primary desktop object as a 3D surface; other desktop objects, including virtual desktops as well as the secure desktop used by User Account Control are not. [5]
Windows Flip 3D demonstrates multiple features of the DWM: 3D transformation of 2D planes, scaling and translating the planes to a different position, embedding dynamic views of one application in another and use of custom shader programs.
The blur effect of Windows Aero, which blurs the background when viewing through the Window borders, is enabled by the DWM compositing manager, using custom pixel shader programs.
Since all applications render to an off-screen buffer, they can be read off the buffer embedded in other applications as well. Since the off-screen buffer is constantly updated by the application, the embedded rendering will be a dynamic representation of the application window and not a static rendering. This is how the live thumbnail previews, Windows Flip and Windows Flip 3D work in Windows Vista. The DWM exposes a public API that allows applications to access these thumbnail representations. [6] The size of the thumbnail is not fixed; applications can request the thumbnails at any size — smaller than the original window, at the same size or even larger — and DWM will scale them properly before returning. Windows Flip 3D uses the thumbnail APIs to get the window representations as bitmaps, and then uses that as texture for 2D rectangles, which are further processed by custom shaders to transform them to 3D meshes and rotate them in a 3D plane.
The Desktop Window Manager uses Media Integration Layer (MIL), the unmanaged compositor which it shares with Windows Presentation Foundation, to represent the windows as composition nodes in a composition tree, representing the desktop and all the windows hosted in it, which are then rendered by MIL from back of the scene to the front. [7] Since all the windows contribute to the final image, the color of a resultant pixel can be decided by more than one window. This is used to implement effects such as per-pixel transparency. DWM allows custom shaders to be invoked to control how pixels from multiple applications are used to create the resultant pixel. The DWM includes built-in Pixel shader 2.0 programs that computes the color of a pixel in a window by averaging the color of the pixel as determined by the window behind it and its neighboring pixels. These shaders are used by DWM to achieve the blur effect in the window borders of windows managed by DWM, and optionally for the areas where it is requested by the application. [3]
Since MIL provides a retained mode graphics system by caching the composition trees, the job of repainting and refreshing the screen when windows are moved is handled by DWM and MIL, freeing the application of the responsibility. The background data is already in the composition tree and the off-screen buffers, that is directly used to render the background, without having the background applications to re-render themselves by sending them the WM_PAINT message, as was the case with pre-Vista Windows OSs. [6] DWM uses double-buffered graphics to prevent flickering and tearing during window moves. [3] [6] The compositing engine uses optimizations such as culling to improve performance, as well as not redrawing areas that haven’t changed. [7] Because the compositor is multi-monitor aware, the DWM natively supports that too. [7]
During full-screen applications, such as games, the DWM does not perform window compositing and therefore performance will not appreciably decrease.
Redirection
For rendering techniques that are not DWM-aware, output must be redirected to the DWM buffers. With Windows, either GDI or DirectX can be used for rendering. To make these two work with DWM, redirection techniques for both are provided with DWM.
With GDI, which is the most used UI rendering technique in Microsoft Windows, each application window is notified when it or a part of it comes in view and it is the job of the application to render itself. Without DWM, the rendering rasterizes the UI in a buffer in video memory, from where it is rendered to the screen. Under DWM, a buffer equal to the size of the window is allocated in system memory. GDI calls are redirected to write their outputs to this buffer, rather than the video memory. Another buffer is allocated in the video memory to represent the DirectX surface, which is used as the texture for the Window meshes. The system memory buffer is converted to the DirectX surface separately, and kept in sync. This round-about route is required as GDI cannot output directly in DirectX pixel format. The surface is read by the compositor and is composited to the desktop in video memory. Writing the output of GDI to system memory is not hardware accelerated, nor is conversion to DirectX surface. When a GDI window is minimized, by the limitations of GDI, the buffer is no longer updated. So, DWM uses the last bitmap rendered to the buffer before the application was minimized. [8]
For applications using DirectX to write to a 3D surface, the DirectX implementation in Windows Vista uses WDDM to share the surface with DWM. DWM then uses the surface directly and maps it on to the window meshes. For WPF applications, which are DirectX applications, the compositor renders to such shared surfaces, which are then composited into the final desktop. [8] Applications can mix either rendering technique across multiple child windows, as long as both GDI and DirectX are not used to render the same window. In that case, the ordering between DirectX and GDI rendering cannot be guaranteed, and as such it cannot be guaranteed whether the GDI bitmap from the system memory has been translated to the video memory surface. So, the final composition may not contain the GDI-rendered elements. [8] To prevent this, DWM is temporarily turned off, as long as an application which mixes GDI and DirectX in the same window is running.
Hardware requirements
In Windows Vista, DWM requires compatible physical or virtual hardware: [9]
- A GPU that supports the Windows Display Driver Model (WDDM)
- Direct3D 9 support
- Pixel Shader 2.0 support,
- Support for 32 bits per pixel
- Passes the Windows Aero acceptance test in the Windows Driver Kit (WDK)
In Windows 7, the Desktop Window Manager has been reworked to use Direct3D 10.1, but the hardware requirements remain the same as in Windows Vista; Direct3D 9 hardware is supported with —-
Until recently, virtual machine software has not been able to emulate the shaders required for DWM to be functional. VMware Fusion 3.0 and VMware Workstation 7.0 will bring support for this [ citation needed ] . In addition, Windows Virtual PC allows composition using the Remote Desktop Protocol.