Home > How to Tips

[Fixed!] macOS Ventura WindowServer Prevents from Sleeping

Updated on Monday, April 8, 2024

iBoysoft author Amanda Wong

Written by

Amanda Wong
Professional tech editor

Approved by

Jessica Shee


Mac Won't Sleep? WindowServer Or Something Else Prevents It?

Summary: This post explores the issue WindowServer prevents from sleeping on macOS Ventura and earlier. In addition, something else could also keep Mac from going to sleep. Reading to know how to fix when Mac doesn't sleep.

windowserver prevent from sleeping ventura

Most users choose to temporarily put idle Macs to sleep to save energy, and wake them up quickly when they continue to use the Macs. Although the Mac is in sleep mode, it is also turned on and consumes less power with all the processes suspended, you can pick up where you left off. 

Abnormally, when you head to the Apple menu and choose Sleep or close the display, the Mac won't sleep and remains working. I noticed quite a few Mac users encountered the same problem and they found that WindowServer prevents from sleeping on macOS Ventura

Hi, I just updated my MacBook software to Ventura and after that my MacBook battery is draining pretty quickly while the MacBook is closed. So, I checked my preventing to sleep and it seems that the WindowServer is preventing my MacBook from sleeping. Is there any fix to this?

This is a true case of a Mac user, if the Mac not going to sleep issue also befalls you, stay tuned to know more.

Table of Contents:

Does someone around you encounter the same issue? Share this post to help them!


Check out what prevents your Mac from sleeping

When you fail to put your Mac to sleep, you can find out the culprit of the problem with the Activity Monitor, Mac's default tool that monitors all the activities behind the scene in real-time. Here is how to check out what is keeping your Mac from sleeping:

  1. Open the Launchpad and search for Activity Monitor, click to open it.
  2. On the top menu bar, click View > Columns > Prevent Sleeping.check prevent sleeping in activity monitor
  3. Locate the last column and click the Prevent Sleeping tab to sort the processes.
  4. Check the value of the process, "Yes" means the current process prevents your Mac from sleeping.
    windowserver prevent from sleeping ventura

In addition, using the command line in Terminal, another macOS tool used to control the operating system and perform tasks with commands, can also find the issue, this is a more advanced method. 

  1. Open Terminal by going to Finder > Applications > Utilities.
  2. In the Terminal window, enter the command line: pmset -g assertions
  3. Look for PreventUserIdleDisplaySleep, PreventSystemSleep, and PreventUserIdleSystemSleep in the output.
  4. Check the status of these three assertions, if either of these has an accompanying status of 1, it is now triggered.
  5. Then check the Listed by owning process section, it lists which process is preventing your Mac from sleeping.check prevent sleeping with terminal

WindowServer prevents from sleeping, how to fix it?

As you can see, in my case, the value of the WindowServer process is "Yes" and the rest of the processes are "No," then WindowServer is the only process that makes My MacBook Air 2020 running macOS Ventura not sleep. 

The WindowServer process manages and deals with all the visual appearances on the Mac display. When you turn on your Mac and open apps, all you see on the display is rendered by this process. Without it, the device might not function properly, and you won't be able to dynamically view anything on your Mac either.

When it points out that it is the WindowServer that keeps Mac from sleeping, it indicates that some apps are requiring the WindowServer to redraw your Mac's display, be it a video player or something else. You can quit suspicious apps or even close all apps to fix this issue. This also works when WindowServer occupies a high CPU.

Attention, it is not recommended to quit the WindowServer process in Activity Monitor straightforwardly, it will forcibly close all the open windows and log out your account, then brings you to the login screen on Mac, just as you have restarted your Mac, and you may lose data if you haven't saved the documents you were editing. 

Fix the WindowServer prevent sleeping issue now? Share this post with more people!


Other reasons Mac doesn't sleep on macOS Ventura

However, in most cases, it is hard for Mac users to figure out what is the exact cause of the Mac not sleeping error. Some software- or hardware-related issues could keep your Mac from going to sleep on macOS Ventura and earlier. It might be the sleep settings, the system's network access settings, running processes, connected storage or devices, etc.

What to do when Mac won't sleep on macOS Ventura?

It is a headache when the Mac can't go to sleep, it always consumes large energy which could lead to the battery draining fast on Mac. It is annoying when you can't always keep the power charged and your Mac can only work for a short period when it won't sleep.

Whether it is the WindowServer that prevents Mac from sleeping or something else, it is necessary to get rid of this problem to make the Mac go to sleep as normal when you are not using it to save energy. iBoysoft concludes with some proven methods for you to fix the Mac won't sleep error on macOS Ventura.

1. Close prevent-sleeping processes 

In case you check out that several processes are preventing Mac from sleeping, you can force quit these processes one by one by double-clicking it in Activity and choosing Quit on the new dialogue. Then, try to put Mac to sleep again. If it fails, close all applications.

quit process in activity monitor

2. Restart your Mac

When there are some minor system errors on your Mac, it makes the Mac function abnormally such as Mac is stuck on the spinning wheelMacBook Pro is overheating, as well as the Mac doesn't sleep on macOS Ventura. Then, you can try to restart your Mac to boot it from scratch. It may help you out of the issue.

restart mac on ventura

3. Check system sleeping settings

You may unconsciously incorrectly set your Mac's system sleeping settings, so it won't sleep even though it is inactive for a long time, you can check this with a few steps in the System Settings app.

  1. Head to the Apple menu and choose System Settings.
  2. On the left sidebar, select Lock Screen.
  3. Check whether you have set it as Never next to Turn display off on battery when inactive and Turn display off on power adapter when inactive.check sleep setting on ventura
  4. If so, click the pop-up menu and choose a period of time you want.

4. Turn off the Wake for network access

If you have set your Mac to wake when other users access your computer's resources such as the printer or Music playlist, it may prevent your Mac from sleeping if those resources are sharing when you attempt to put the Mac to sleep. Then turning off the Wake for network access can solve this issue easily.

  1. Click on the Apple logo and choose System Settings.
  2. Locate the Battery on the left sidebar and click it.
  3. Move to the bottom on the right and click the Options… button.
  4. On the new window, choose Never for Wake for network access.never wake for network access

5. Change system sharing settings

On your Mac, shared services might be used by other users, which will keep it awake. For instance, they can be accessing shared files kept on your Mac or utilizing a printer that is connected to it. You can disable any services you don't need to use if you don't want this to occur.

  1. Open the Apple menu and choose System Settings.
  2. Choose General on the left sidebar.
  3. Scroll down on the right side and click Sharing.
  4. Disable the service you don't need to use.turn off sharing services on mac

6. Boot Mac into Safe Mode

You can use Safe Mode to test whether a problem is brought on by startup-related software on your Mac. It only loads the essential software required by the macOS, deletes some system caches, and basically checks the startup disk of your Mac. 

Boot Intel Mac into Safe Mode:

  1. Restart your Mac and simultaneously press the Shift key.
  2. Release the key when the login window appears.
  3. Log in to your account and you should see Safe Boot in the upper-right corner of the window.

Boot Apple Silicon Mac into Safe Mode:

  1. Reboot the Mac and press and hold the Power button.
  2. Release the key when you see the startup options window.
  3. After choosing your startup disk, select Continue in Safe Mode while holding down the Shift key. 
  4. Log in to your account.

If your Mac doesn't sleep in Safe Mode either, reinstalling macOS may fix the issue, and updating your Apple and third-party apps is also advised. If you can get the Mac into sleep mode in Safe Mode, you can leave the mode and restart the Mac normally to test the issue again. If the problem persists, startup items are definitely to blame, then ensure that all updates for your Apple software and third-party apps have been installed.

If you are still stuck with the Mac won't sleep trouble, you can then try to remove login itemscreate a new user account, disconnect all accessories, and reinstall macOS to get it solved.

7. Check if Spotlight is indexing

Your Mac won't sleep if Spotlight is indexing your hard drive. To check if Spotlight is indexing, open it with the Command and Space bar. Depending on how many files your Mac has, indexing may take many hours. During the process, it keeps your Mac awake.

8. Disconnect malfunctioned external devices

Your Mac can refuse to go to sleep if your USB and Thunderbolt storage and peripherals aren't working properly. Check to see if your Mac goes to sleep after disconnecting those devices. If it does, reconnect each component one at a time until you identify the broken one.

9. Turn off Handoff

Some Mac users figured out that the Handoff causes their Macs to fail to get into sleep mode. And if you have enabled Handoff on your Mac, you can disable it to see whether it is the cause of your case. 

  1. Go to the Apple menu and select System Settings.
  2. Choose General on the left and select AirDrop & Handoff on the right.
  3. Toggle off the button beside Allow Handoff between this Mac and your iCloud devices.turn off handoff

10. Update macOS

By keeping your software up to date, you can fix some software problems given that the latest update may fix the bugs of the previous one. When you encounter some system-related malfunctions, you can update macOS to get rid of the problem.

  1. Get into the System Settings by clicking the Apple logo.
  2. Choose General and select Software Update.
  3. Wait for it to check for updates.
  4. Install the latest macOS if there is an available one.update macos on ventura

If any of the above 10 methods help to fix Mac won't sleep issue, you can share it with others!


The end

Once the Mac won't sleep problem occurs, it indicates something is occupying the computer's resources or it is caused by certain software- and hardware-related errors. With these 10 methods, you can fix it When the WindowServer prevents from sleeping on macOS Ventura happens to your Mac.

Also read: [Fixed] 'WindowServer quit unexpectedly' on Ventura/Monterey