Occasionally, I leave my computer turned on all night with some program running. If the computer logged off or sleep, the program is stopped. The monitor light is bright enough to disturb my sleep. My monitor power button is broken. I have to pull out the monitor power cable to turn it off.

I've tried to reduce all the contrast and color to 0. But, it is still not enough. How to make my monitor completely black without make it sleep or logged off and keep the program running? My monitor is
HP ZDisplay.


  • The program I running is auto move the mouse cursor (something like mouse recorder).
  • I do not want to cover my monitor with some blanket or other thing.
  • 1
    Why can't you let your OS put the monitor to sleep? Does the program not work if the monitor is asleep?
    – Salman A
    Dec 5, 2017 at 8:57
  • 7
    That program of your smells like a bot or a cheat for something... Hm...
    – T. Sar
    Dec 5, 2017 at 10:52
  • 5
    Super lo-fi solution: throw a thick towel / blanket on your monitor Dec 5, 2017 at 14:24
  • 7
    change the input source to something else, wait for monitor to sleep.
    – xvk3
    Dec 5, 2017 at 19:13
  • 2
    My comment got caught up with the others that got moved to chat, so sorry if you replied and I missed it. @Vahn what is your objection to unplugging the power or video cord for the monitor? Is it hard to reach? Are you worried about damage? Does your software require a connected and powered monitor to run?
    – Kat
    Dec 5, 2017 at 22:41

16 Answers 16


Since you're having issues with the other answers so far:

  • "it prevent my program from running"
  • "I think it's not force turn off the display. I've just test it"
  • "the main problem is how to keep my program running with black screen. Most third party program stopped my program from running."

You're saying pretty clearly that your mystery program is just not going to co-operate with a software solution. You're just going to have to "think outside the desktop" & tackle the real problem:

Fix the power button.

You might get lucky and it's just dirty (like a remote control), or you say "it's missing the button to press" so just replace it with any similar shaped object, wood, plastic, a marble, tape it in & press away.

Or at least do the next best thing:

Install another power switch inline on the monitor's power cord

Use an inline lamp switch / inline rocker switch:

enter image description here

They're quite easy to install, just carefully strip the wire & attach according to the specific switch, there shouldn't even be any soldering or shrink tubing required. They usually only switch the "hot" wire, and of course unplug the wire first! Better search for how to install an inline rocker switch to see some videos too.

Oops, I just read the "I don't want to cover the monitor" line, after typing the next part... Well, give it a second thought, it's probably the easiest solution. Just put some cloth over the monitor & cover it up. It shouldn't be hot enough to start a fire or anything hazardous (if it is that's a separate problem), so buy a cover or use a shirt or a cardboard box, basically anything opaque.

If you're concerned about extra heat from covering it completely wearing away at the remaining life of your monitor, then don't cover it up completely. You really only need to block the screen side, so lean a piece of cardboard up against the screen, or optionally use paperclip "hooks" to hold/hang it, and let the other 5 sides breathe free:

enter image description here A nearly-finished DIY screen cover, just bend to fit.

  • 4
    Hot enough to cause extra wear on the monitor electronics will happen long before "hot enough for fire" :( Something loose-fitting like a cardboard box might be reasonable, though. Dec 4, 2017 at 11:40
  • 32
    Upvoted for "fix the power switch". That's a far better option, because it saves 30 to 50 Watts on a typical screen. Dec 4, 2017 at 11:51
  • 6
    As an alternative to adding an inline switch (which could be unsafe, depending on the OP's confidence with electrical stuff), consider just using a switched mains outlet or extension cord. I'm in the UK, and I have something like this attached to the wall behind my desk. Dec 4, 2017 at 12:34
  • 1
    Thx guys. I think I'll just fix that button. I thought there are some build in setting in the monitor to reduce light to zero.
    – Vahn
    Dec 4, 2017 at 14:12
  • 1
    @Mast Only blocking the screen side's the coolest, as mentioned. But does the front of your monitor really have ventilation holes? I haven't seen that before... maybe yours has speed holes? ;-)
    – Xen2050
    Dec 4, 2017 at 14:28

I recommend getting a power strip and installing it within reach of your foot or hand. Not sure where you live but I can buy one for about $2 - $3.

This way you can plug the monitor into this switch and power it on/off whenever you need.

enter image description here

IMPORTANT - for daisy-chaining

Make sure to get a simple power strip and NOT a surge protection device or else you will have the potential to create a fire hazard. As long as your house's circuit breaker maintains complete control of your circuit then it should be relatively safe to plug in nothing more than a monitor via daisy-chaining.

  • 3
    This. All of a sudden you have a new power button and all will be well.
    – user366447
    Dec 4, 2017 at 14:11
  • 14
    @Vahn You buy a second one, plug it into the first one, and only plug your monitor into the second one.
    – MonkeyZeus
    Dec 4, 2017 at 14:22
  • 2
    WARNING: it can be very dangerous to chain power interruption devices. If you do this, then be sure to plug this one into the wall and do not daisy chain it off the one your computer is plugged into (and it should be plugged into one). You would be better off with this or this
    – user76225
    Dec 4, 2017 at 18:59
  • 2
    @Snowman - The pictured device, and the description provided by MonkeyZeus, show that is not a device equipped with surge protection. It would not cause the problems as described in that link (Which is actually very informative, that's something I had never thought of). It would be better off to state that if they get one with an interruption circuit, to plug it in the wall separately and not daisy chain them.
    – Taegost
    Dec 4, 2017 at 20:10
  • 2
    @Taegost Thank you for your comment, I now have a better understanding of what Snowman was trying to say. It really stinks that so many things are being scare-mongered for the lowest-common-denominator. I will update my answer with something relevant :)
    – MonkeyZeus
    Dec 4, 2017 at 20:33

Try changing the input of your monitor to a source with no video eg: vga. Most modern monitors have multiple inputs and you can manually select the one you want. Then, it will tell you there is no source and then go to sleep.

  • 3
    After all these other answers that suggest getting programs, switching the power off or doing some DIY work, this is one of the simplest. The computer won't see that the monitor was disconnected and will keep running the program. The monitor just needs to support sleeping, which it should :P
    – user487867
    Dec 4, 2017 at 13:56
  • good answer, but I think "most monitor" may be over stating it. I suggest one of "many monitors", "most newer monitors" (still not 100% but more confidant) , or "your model of monitor" (OP did give model number, I've not checked if this works for that one). Dec 4, 2017 at 14:30
  • 2
    @LyndonWhite I can't think of a monitor I have used in a considerable time that was lacking more than one input. In addition, I verified that the model listed includes multiple inputs, one of which is vga. Never the less, I have updated to most modern monitors.
    – Andy
    Dec 4, 2017 at 14:58
  • In my experiance most monitors will by default auto-switch inputs when the current input has no signal. Sometimes this functionality can be turned off, sometimes it can't.
    – plugwash
    Dec 4, 2017 at 15:59

Just turn off the monitor.

enter image description here

Seriously! Assuming your other power settings don't shut down the PC (set it to never go to sleep), your task should still be running in the background. My system's also set to turn the monitors off automatically after 10 minutes

enter image description here

You might also be able to use a third party tool to turn off the monitor in software - nircmd comes to mind - with a simple command like "nircmd monitor async_off" doing what you need.

  • 11
    sorry I forget to tell that my power button is damaged.
    – Vahn
    Dec 4, 2017 at 7:43
  • is it force the display to be turned off?
    – Vahn
    Dec 4, 2017 at 7:48
  • 1
    Oh, It does with mine. It depends on some monitor functionality IIRC but both these options should work. The nice thing with nircmd is its pretty easy to check if it works for you, and you can do it immediately. How you'd turn it back on with a broken power switch though... I'm not sure about
    – Journeyman Geek
    Dec 4, 2017 at 7:49
  • I think it's not force turn off the display. I've just test it.
    – Vahn
    Dec 4, 2017 at 7:52
  • 3
    The functionality the software uses to turn off the monitor is called DPMS. If you have good enough drivers for your video card (i.e. not the simple VBE driver), it should be available.
    – Ruslan
    Dec 4, 2017 at 10:16

Since the power switch is broken (how do you turn it on, anyway?) you can use a separate switch. Rather than splicing the power cable as someone else suggested, it would be easier to use one of these:

electric plug with switch

These are great for any device that does not have a built-in power switch (increasingly rare anymore) or the switch is broken.

You can also buy cables that have switches inline. You are better off purchasing a cable made for the purpose rather than splicing your own. The pre-made cable will have proper strain relief, water resistance, and all of the components and splices will be rated for the current expected from that type of cable.


Are you able to turn your monitor around? Turning it to face the wall shouldn't introduce any overheating issues.

Alternatively, have you looked into wearing an eye mask for sleeping? I use these when I'm camping since the tent rarely provides sufficient darkness during early morning in Summer to let me sleep.

  • 1
    I do realise that my answer has nothing at all to do with the subject of this particular SO so if it is considered unsuitable I'll delete it. Dec 4, 2017 at 14:05
  • 4
    +1 for simple, low-tech. "Face monitor away from sleeping area" is a valid answer, IMO, since the issue is "monitor light is too bright and keeps me up". Facing it away would diffuse the light at worst... stop it at best.
    – WernerCD
    Dec 4, 2017 at 16:25

Cover the monitor's power light with masking tape (or with more opaque tape if you want it fully blacked out). I use masking tape on some of the brighter lights on my tower case (e.g. the stupid blue LEDs for HD activity. What was wrong with red LEDs? Nice sleep-friendly color, and still easy to see).

Turn off the monitor's backlight with the DPMS "off" powersaving state. Activate it with
sleep 1 && xset dpms force off (Linux or any other OS using an X11 display server) or
wizmo monoff (Windows). The sleep is so you can release the enter key before the command runs, otherwise the key-release would wake up your the screen again. (IIRC, wizmo sleeps first).

Moving the mouse or pressing a key will bring your computer out of powersaving screensaver mode. You may want to turn your mouse upside down to make sure it doesn't detect movement if your desk is jiggled (or depending on your mouse, even if it isn't).

This might not work in your case, where your program involves simulated mouse movements. IDK if it's possible to disable mouse wakeup and only leave keyboard. wizmo shake=0 only works for it's built-in animated screensavers, not for triggering Windows' built-in monitor powersaving mode.

Presumably anything that covers the Windows desktop with a black window will stop your program from working, unless it passes through mouse clicks. But backlight-on is not the same as dark, and is a waste of power.

Alternate Option 1: Run your program inside a VM, so the Windows that's directly connected to the actual monitor isn't seeing virtual mouse movements, only the OS inside the VM.

Option 2: Put your monitor on a separate power bar with its own switch.

(Or buy a power bar with switches for every outlet, but make sure you label the switch well and don't plug the monitor in next to your computer or anything else it would be annoying to accidentally power-cycle.)

  • wizmo ? my windows 10 system does not recognize that command
    – edc65
    Dec 4, 2017 at 12:07
  • @edc65 Try clicking the link. You need to download the program first.
    – user487867
    Dec 4, 2017 at 12:30

nircmd has a "put the monitor to sleep" option.

I put this in a shortcut in my PATH:

nircmd.exe cmdwait 100 monitor off
  • My answer mentions nircmd, but OP seems to think it dosen't work
    – Journeyman Geek
    Dec 4, 2017 at 14:56
  • @JourneymanGeek I think he mentions he has a program that moves the mouse - IE: Activity which stops "sleep".
    – WernerCD
    Dec 4, 2017 at 16:23
  • @JourneymanGeek oh yes, apologies - I missed it.
    – Attie
    Dec 4, 2017 at 17:08
  • I would edit this to include setprimarydisplay. If he has 2 ports on his graphics card (DVI/VGA... dual DVI... graphics card/on-board...) and configures the second port (so that "Does this configuration work?" doesn't reset to previous working configuration)... he could use this with a keyboard shortcut to toggle between the monitor ports.
    – WernerCD
    Dec 7, 2017 at 12:13
  • I don't follow... I've used this with a multi-monitor setup for years.
    – Attie
    Dec 7, 2017 at 12:44

Just unplug the monitor at the wall! Or, if it's receiving power from the PC, unplug it at the PC.

The question has now been edited to add "without unplugging the monitor". As far as I can see, that's only because the plug is in an inconvenient location. In that case, just use an extension lead to move the plug to a more accessible location.

Alternatively as @brichins points out, some monitors allow you to unplug the power and/or data cable at the monitor end.

  • More conveniently, unplug the power cord from the back of the monitor. Or unplug the display cable from the back of the monitor.
    – brichins
    Dec 6, 2017 at 22:27
  • @brichins Good point -- if that's possible with the asker's monitor, that would be easier. Not all monitor power or data cables are detachable at the monitor. Dec 6, 2017 at 23:23

Couple other options I hadn't seen mentioned (As of the time of posting this):

  • KVM Switch? Switch the Monitor to alternative/empty input.

  • If your software doesn't "Sleep" because of a mouse macro (can't sleep if mouse is moving)... maybe you could virtualize the software? Move it into a VMWare PC? Program runs in a VM and your main OS can then go to sleep?

  • Do you have multiple inputs? Use a keyboard shortcut to switch output location? (You might have to plug something into the other port long enough to say "Yes, this is a valid option")

  • Anti-Glare/Privacy Filters - they block light from angles and are typically used in office environments where you don't want people to see your stuff. But they should lessen the light and alleviate the light "noise" thats keeping you up at night.

privacy screen blocker


Try enabling presentation mode

Hopefully, pressing Win+P will let you throw your display to a non-existent projector and turn your main display off.

  • 1
    after some testing, the message projector cannot be found is popped out.
    – Vahn
    Dec 4, 2017 at 11:22

Here is a Windows PowerShell script that I researched several years ago - I got some help from folks on a forum - I don't remember which one.

Incidentally, the main reason I use it is to reset my graphics card. I use 4 screens and for some reason my primary screen occasionally reverts to low res and I can not get to the reboot button. I found that when the monitor wakes up it restores to the proper res.

Copy the text below into a file name like monitor_off.ps1. If you edit your file associations, you can execute it by double clicking the file. Or as pointed out by "Davidw" below, right click and select run with Powershell.

# Windows PowerShell - Turn display off by calling WindowsAPI.
# Jan Zumwalt - rev 2017.12.05
# Moving the mouse or pressing a keyboard key reactivates the screen.
# works with multi-screen systems too.

# WM_SYSCOMMAND   0x0112
# POWER_OFF       0x0002

Add-Type -TypeDefinition '
using System;
using System.Runtime.InteropServices;

namespace Utilities {
   public static class Display
      [DllImport("user32.dll", CharSet = CharSet.Auto)]
      private static extern IntPtr SendMessage(
         IntPtr hWnd,
         UInt32 Msg,
         IntPtr wParam,
         IntPtr lParam

      public static void PowerOff ()
            (IntPtr)0xffff, // HWND_BROADCAST
            0x0112,         // WM_SYSCOMMAND
            (IntPtr)0xf170, // SC_MONITORPOWER
            (IntPtr)0x0002  // POWER_OFF

  • 2
    You have to right click the script and select "Run with Powershell" unless you change the file associations, which, by the way, is not considered best practice. Otherwise, it just opens in Notepad.
    – Davidw
    Dec 6, 2017 at 23:58
  • Thanks for the additional information. Something I will add at a future time is a 10 or 20 sec time delay. I sometimes bump my desk as I leave and then have to execute it again.
    – jwzumwalt
    Dec 7, 2017 at 7:23
  • You can always call the script from a Powershell prompt, of course.
    – Davidw
    Dec 7, 2017 at 8:53

There are a few good answers here. I black out all the LED lights on my system so it does not disturb sleep. I have all my monitors plugged into a power strip and when I turn that strip off all the monitors turn off. Any software I run will continue to run when the power strip and monitors are off.

Any modern OS or app should not be dependent on a physical monitor being on, and should work headless. If that isn't the case with this particular piece of software, then you will need another solution to whatever that software is doing.


I have a similar problem, as sometimes I have to leave the computer on to let the weekly backup complete, and I have the external hard drive plugged into one of the ports on the monitor, so if I turn the whole monitor off, it turns off the USB ports, so here's my solution for Windows 7:

In Control Panel, go to Power Options and click on "Chose when to turn off the Display" enter image description here Set the "Turn off the Display" option to 1 minute and set "Put the Computer to Sleep" option to never. enter image description here

You can save this setting as a Power plan by clicking on "Create a Power Plan" on the Power Options page.

At the next page, set the name for your power plan: enter image description here

Set the above options for your power plan: enter image description here

Set the power plan: enter image description here


While there are many tools that can turn off your monitor or even windows is able to set it to sleep (which is definetely the recommended way here) there is one simple solution I would like to propose:

Just create a black powerpoint presentation and open it as a fullscreen presentation ;-)

  • 3
    It won't be a 'real' dark screen unless its an OLED - you'd still have some amount of LED glow
    – Journeyman Geek
    Dec 4, 2017 at 9:25
  • it prevent my program from running
    – Vahn
    Dec 4, 2017 at 9:30

Simply create/download a black image and open it full screen while your program runs on the background. Simple and no hardware changes needed.

  • I was about to suggest that. :) A black image in full-screen mode will be completely black. Irfanview (for example) has an option to hide the mouse in full-screen mode, so you won't see it moving around. Also cover the power light with some black tape. Dec 4, 2017 at 21:54
  • 5
    Not every monitor will even come close to black with a black image. This solution is more likely to give you a nightlight of doom. Dec 5, 2017 at 10:24
  • 3
    @NickGammon: "A black image in full-screen mode will be completely black"—only in the sense that the pixels will be at their darkest possible value. The screen will still be backlit, which could be sufficient to disturb OP's sleep.
    – wchargin
    Dec 5, 2017 at 13:37
  • @wchargin: True, however I think we are now getting from what a "super user" might do with their computer system to cunningly display as little as possible on the monitor, to a more simple question: "My appliance has a broken power switch. How do I work around that?" - you may as well complain that the toaster in your room has a similar problem. Dec 5, 2017 at 23:55
  • 1
    "Toaster won't turn off" - "set to lowest setting and enjoy as a space heater" Dec 6, 2017 at 15:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .