• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

How to prevent accidental Windows shutdowns

Joined
Apr 9, 2018
Messages
781 (0.35/day)
Posting this solution here for others who encounter the same problem.

I've been having accidental shutdown issues for years. You go to click on "Sleep", but any accidental mis-click usually lands on the "Shut Down" option instead. Of course Microsoft would place both options right next to each other.

The most elegant solution is to use the Group Policy Editor to enable the Shut Down Event Tracker:

1. Type gpedit.msc in RUN dialog box and press Enter to open the Group Policy Editor
2. Now go to: Computer Configuration -> Administrative Templates
3. Highlight the System folder
4. In the pane on the right, scroll down and double click on the Display Shutdown Event Tracker setting
5. Change the state to Enabled
6. Click Apply

The result is that whenever you click on "Shut Down" or "Restart", it will display an additional menu:

1611560514869.png


This can basically be treated as an "Are You Sure?" popup, where you can just click Continue and complete the shutdown. The "Sleep" option is unchanged.

The only downside is the "Other (Unplanned)" option is the default and will bring a popup window up after the next startup. Scrolling down one notch to the "Other (Planned)" option solves it. Otherwise, it works pretty well and isn't much of an inconvenience.
 
Last edited:
Joined
Jul 16, 2014
Messages
8,117 (2.27/day)
Location
SE Michigan
System Name Dumbass
Processor AMD Ryzen 7800X3D
Motherboard ASUS TUF gaming B650
Cooling Artic Liquid Freezer 2 - 420mm
Memory G.Skill Sniper 32gb DDR5 6000
Video Card(s) GreenTeam 4070 ti super 16gb
Storage Samsung EVO 500gb & 1Tb, 2tb HDD, 500gb WD Black
Display(s) 1x Nixeus NX_EDG27, 2x Dell S2440L (16:9)
Case Phanteks Enthoo Primo w/8 140mm SP Fans
Audio Device(s) onboard (realtek?) - SPKRS:Logitech Z623 200w 2.1
Power Supply Corsair HX1000i
Mouse Steeseries Esports Wireless
Keyboard Corsair K100
Software windows 10 H
Benchmark Scores https://i.imgur.com/aoz3vWY.jpg?2
I like the Win + X option, but you could change your power button ( Power Options in control panel ) to trigger Sleep instead of Shut Down or Restart.
 
Joined
Feb 20, 2020
Messages
9,340 (6.12/day)
Location
Louisiana
System Name Ghetto Rigs z490|x99|Acer 17 Nitro 7840hs/ 5600c40-2x16/ 4060/ 1tb acer stock m.2/ 4tb sn850x
Processor 10900k w/Optimus Foundation | 5930k w/Black Noctua D15
Motherboard z490 Maximus XII Apex | x99 Sabertooth
Cooling oCool D5 res-combo/280 GTX/ Optimus Foundation/ gpu water block | Blk D15
Memory Trident-Z Royal 4000c16 2x16gb | Trident-Z 3200c14 4x8gb
Video Card(s) Titan Xp-water | evga 980ti gaming-w/ air
Storage 970evo+500gb & sn850x 4tb | 860 pro 256gb | Acer m.2 1tb/ sn850x 4tb| Many2.5" sata's ssd 3.5hdd's
Display(s) 1-AOC G2460PG 24"G-Sync 144Hz/ 2nd 1-ASUS VG248QE 24"/ 3rd LG 43" series
Case D450 | Cherry Entertainment center on Test bench
Audio Device(s) Built in Realtek x2 with 2-Insignia 2.0 sound bars & 1-LG sound bar
Power Supply EVGA 1000P2 with APC AX1500 | 850P2 with CyberPower-GX1325U
Mouse Redragon 901 Perdition x3
Keyboard G710+x3
Software Win-7 pro x3 and win-10 & 11pro x3
Benchmark Scores Are in the benchmark section
Hi,
Yeah really win+x+u+r = restart
Win+x+u+u = shutdown
I have hibernation off so no sleep functions I'm sure there is a shortcut key for sleep and hibernate.
 
Joined
Jan 5, 2006
Messages
17,825 (2.67/day)
System Name AlderLake / Laptop
Processor Intel i7 12700K P-Cores @ 5Ghz / Intel i3 7100U
Motherboard Gigabyte Z690 Aorus Master / HP 83A3 (U3E1)
Cooling Noctua NH-U12A 2 fans + Thermal Grizzly Kryonaut Extreme + 5 case fans / Fan
Memory 32GB DDR5 Corsair Dominator Platinum RGB 6000MHz CL36 / 8GB DDR4 HyperX CL13
Video Card(s) MSI RTX 2070 Super Gaming X Trio / Intel HD620
Storage Samsung 980 Pro 1TB + 970 Evo 500GB + 850 Pro 512GB + 860 Evo 1TB x2 / Samsung 256GB M.2 SSD
Display(s) 23.8" Dell S2417DG 165Hz G-Sync 1440p / 14" 1080p IPS Glossy
Case Be quiet! Silent Base 600 - Window / HP Pavilion
Audio Device(s) Panasonic SA-PMX94 / Realtek onboard + B&O speaker system / Harman Kardon Go + Play / Logitech G533
Power Supply Seasonic Focus Plus Gold 750W / Powerbrick
Mouse Logitech MX Anywhere 2 Laser wireless / Logitech M330 wireless
Keyboard RAPOO E9270P Black 5GHz wireless / HP backlit
Software Windows 11 / Windows 10
Benchmark Scores Cinebench R23 (Single Core) 1936 @ stock Cinebench R23 (Multi Core) 23006 @ stock
My computers never sleep, it's either on or off with the power button.
 
Joined
Jul 25, 2006
Messages
12,145 (1.87/day)
Location
Nebraska, USA
System Name Brightworks Systems BWS-6 E-IV
Processor Intel Core i5-6600 @ 3.9GHz
Motherboard Gigabyte GA-Z170-HD3 Rev 1.0
Cooling Quality case, 2 x Fractal Design 140mm fans, stock CPU HSF
Memory 32GB (4 x 8GB) DDR4 3000 Corsair Vengeance
Video Card(s) EVGA GEForce GTX 1050Ti 4Gb GDDR5
Storage Samsung 850 Pro 256GB SSD, Samsung 860 Evo 500GB SSD
Display(s) Samsung S24E650BW LED x 2
Case Fractal Design Define R4
Power Supply EVGA Supernova 550W G2 Gold
Mouse Logitech M190
Keyboard Microsoft Wireless Comfort 5050
Software W10 Pro 64-bit
Of course Microsoft would place both options right next to each other.
:( Of course some automatically blame Microsoft for their own mistakes. :rolleyes: IMO, since Sleep and Shutdown are just two different sleep states, it only makes sense they be next to each other.

The "most elegant" solution, IMO, is to just walk away and let your computer go to sleep.

If you are in a public or semi-public place, pressing Win + L will instantly lock your computer so you can walk away and not worry about someone immediately stepping up to your computer and gain access. Then you can just let it go to sleep.
 
Joined
Nov 16, 2007
Messages
1,166 (0.19/day)
Location
Hampton Roads
Processor Xeon x5650
Motherboard SABERTOOTH X58
Cooling Fans
Memory 24 GB Kingston HyperX 1600
Video Card(s) GTX 1060 3GB
Storage small ssd
Display(s) Dell 2001F, BenQ short throw
Case Lian Li
Audio Device(s) onboard
Power Supply X750
Software Mint 19.3, Win 10
Benchmark Scores not so fast...
I Alt+F4 on the desktop. Oldie but a goodie.
 
Joined
Apr 9, 2018
Messages
781 (0.35/day)
:( Of course some automatically blame Microsoft for their own mistakes. :rolleyes: IMO, since Sleep and Shutdown are just two different sleep states, it only makes sense they be next to each other.

The "most elegant" solution, IMO, is to just walk away and let your computer go to sleep.

If you are in a public or semi-public place, pressing Win + L will instantly lock your computer so you can walk away and not worry about someone immediately stepping up to your computer and gain access. Then you can just let it go to sleep.

I got into the habit of using the Sleep function every time I go AFK for any period of time. When the whole computer goes from using 60-90 watts at idle down to 1-3 watts on sleep, the power savings really add up throughout the day. That's like turning off a half dozen ceiling lights, so it's worth doing to bring the power usage down.

It's an option to set an automatic Sleep with a short 5min or 10min fuse, but then it's more of a compromise that doesn't save power for every single AFK period.

Hi,
Yeah really win+x+u+r = restart
Win+x+u+u = shutdown
I have hibernation off so no sleep functions I'm sure there is a shortcut key for sleep and hibernate.

I heard about those shortcuts but couldn't figure them out. They don't seem to work properly on Windows 10.
 
Joined
Jul 14, 2006
Messages
2,416 (0.37/day)
Location
People's Republic of America
System Name It's just a computer
Processor i9-14900K Direct Die
Motherboard MSI Z790 ACE MAX
Cooling Dual D5T Vario, XSPC BayRes, Nemesis GTR560, NF-A14-iPPC3000PWM, NF-A14-iPPC2000, HK IV Pro Nickel
Memory G.SKILL F5-7200J3646F24GX2-TZ5RK
Video Card(s) eVGA RTX2080 FTW3 Ultra
Storage Samsung 990 PRO 1TB M.2
Display(s) LG 32GK650F
Case Thermaltake Xaser VI
Audio Device(s) Auzentech X-Meridian 7.1 2G/Z-5500
Power Supply Seasonic Prime PX-1300
Mouse Logitech
Keyboard Logitech
Software Win11PRO
Joined
Feb 20, 2020
Messages
9,340 (6.12/day)
Location
Louisiana
System Name Ghetto Rigs z490|x99|Acer 17 Nitro 7840hs/ 5600c40-2x16/ 4060/ 1tb acer stock m.2/ 4tb sn850x
Processor 10900k w/Optimus Foundation | 5930k w/Black Noctua D15
Motherboard z490 Maximus XII Apex | x99 Sabertooth
Cooling oCool D5 res-combo/280 GTX/ Optimus Foundation/ gpu water block | Blk D15
Memory Trident-Z Royal 4000c16 2x16gb | Trident-Z 3200c14 4x8gb
Video Card(s) Titan Xp-water | evga 980ti gaming-w/ air
Storage 970evo+500gb & sn850x 4tb | 860 pro 256gb | Acer m.2 1tb/ sn850x 4tb| Many2.5" sata's ssd 3.5hdd's
Display(s) 1-AOC G2460PG 24"G-Sync 144Hz/ 2nd 1-ASUS VG248QE 24"/ 3rd LG 43" series
Case D450 | Cherry Entertainment center on Test bench
Audio Device(s) Built in Realtek x2 with 2-Insignia 2.0 sound bars & 1-LG sound bar
Power Supply EVGA 1000P2 with APC AX1500 | 850P2 with CyberPower-GX1325U
Mouse Redragon 901 Perdition x3
Keyboard G710+x3
Software Win-7 pro x3 and win-10 & 11pro x3
Benchmark Scores Are in the benchmark section
I got into the habit of using the Sleep function every time I go AFK for any period of time. When the whole computer goes from using 60-90 watts at idle down to 1-3 watts on sleep, the power savings really add up throughout the day. That's like turning off a half dozen ceiling lights, so it's worth doing to bring the power usage down.

It's an option to set an automatic Sleep with a short 5min or 10min fuse, but then it's more of a compromise that doesn't save power for every single AFK period.



I heard about those shortcuts but couldn't figure them out. They don't seem to work properly on Windows 10.
Hi,
More accurate description is win+x to open the list and type ur = restart or uu = shutdown
So sleep would be u and it's shortcut letter s maybe so us ?
 
Joined
Jul 25, 2006
Messages
12,145 (1.87/day)
Location
Nebraska, USA
System Name Brightworks Systems BWS-6 E-IV
Processor Intel Core i5-6600 @ 3.9GHz
Motherboard Gigabyte GA-Z170-HD3 Rev 1.0
Cooling Quality case, 2 x Fractal Design 140mm fans, stock CPU HSF
Memory 32GB (4 x 8GB) DDR4 3000 Corsair Vengeance
Video Card(s) EVGA GEForce GTX 1050Ti 4Gb GDDR5
Storage Samsung 850 Pro 256GB SSD, Samsung 860 Evo 500GB SSD
Display(s) Samsung S24E650BW LED x 2
Case Fractal Design Define R4
Power Supply EVGA Supernova 550W G2 Gold
Mouse Logitech M190
Keyboard Microsoft Wireless Comfort 5050
Software W10 Pro 64-bit
I got into the habit of using the Sleep function every time I go AFK for any period of time. When the whole computer goes from using 60-90 watts at idle down to 1-3 watts on sleep, the power savings really add up throughout the day. That's like turning off a half dozen ceiling lights, so it's worth doing to bring the power usage down.
Ummm, half dozen ceiling lights? Not really. Yes, if you have intentionally changed the Power Options defaults and have the computer and monitors to never turn off, it will add up. But if you have left the defaults alone, the computer will just go to sleep in 15 minutes or so anyway.
 
Joined
Apr 9, 2018
Messages
781 (0.35/day)
Ummm, half dozen ceiling lights? Not really. Yes, if you have intentionally changed the Power Options defaults and have the computer and monitors to never turn off, it will add up. But if you have left the defaults alone, the computer will just go to sleep in 15 minutes or so anyway.

Conservative values are 60 watts idle for a standard quad core system plus 20 watts for a 1080p monitor. Depending on what lightbulb is common, most these days are around 8W (LED) to 15W (flourescent) each. Half a dozen bulbs is definitely a reasonable figure in most situations. Then it comes down to whether it's "worth" the saving, and at least in my situation it's a no-brainer. Others can decide for themselves. Personally I'm so used to using Sleep all the time that it's not an inconvenience at all.....except for that 1-in-100 click that shuts down the computer. Fixed that now though!
 
Joined
Feb 20, 2020
Messages
9,340 (6.12/day)
Location
Louisiana
System Name Ghetto Rigs z490|x99|Acer 17 Nitro 7840hs/ 5600c40-2x16/ 4060/ 1tb acer stock m.2/ 4tb sn850x
Processor 10900k w/Optimus Foundation | 5930k w/Black Noctua D15
Motherboard z490 Maximus XII Apex | x99 Sabertooth
Cooling oCool D5 res-combo/280 GTX/ Optimus Foundation/ gpu water block | Blk D15
Memory Trident-Z Royal 4000c16 2x16gb | Trident-Z 3200c14 4x8gb
Video Card(s) Titan Xp-water | evga 980ti gaming-w/ air
Storage 970evo+500gb & sn850x 4tb | 860 pro 256gb | Acer m.2 1tb/ sn850x 4tb| Many2.5" sata's ssd 3.5hdd's
Display(s) 1-AOC G2460PG 24"G-Sync 144Hz/ 2nd 1-ASUS VG248QE 24"/ 3rd LG 43" series
Case D450 | Cherry Entertainment center on Test bench
Audio Device(s) Built in Realtek x2 with 2-Insignia 2.0 sound bars & 1-LG sound bar
Power Supply EVGA 1000P2 with APC AX1500 | 850P2 with CyberPower-GX1325U
Mouse Redragon 901 Perdition x3
Keyboard G710+x3
Software Win-7 pro x3 and win-10 & 11pro x3
Benchmark Scores Are in the benchmark section
Conservative values are 60 watts idle for a standard quad core system plus 20 watts for a 1080p monitor. Depending on what lightbulb is common, most these days are around 8W (LED) to 15W (flourescent) each. Half a dozen bulbs is definitely a reasonable figure in most situations. Then it comes down to whether it's "worth" the saving, and at least in my situation it's a no-brainer. Others can decide for themselves. Personally I'm so used to using Sleep all the time that it's not an inconvenience at all.....except for that 1-in-100 click that shuts down the computer. Fixed that now though!
Hi,
So what did you do.
 
Joined
Jul 25, 2006
Messages
12,145 (1.87/day)
Location
Nebraska, USA
System Name Brightworks Systems BWS-6 E-IV
Processor Intel Core i5-6600 @ 3.9GHz
Motherboard Gigabyte GA-Z170-HD3 Rev 1.0
Cooling Quality case, 2 x Fractal Design 140mm fans, stock CPU HSF
Memory 32GB (4 x 8GB) DDR4 3000 Corsair Vengeance
Video Card(s) EVGA GEForce GTX 1050Ti 4Gb GDDR5
Storage Samsung 850 Pro 256GB SSD, Samsung 860 Evo 500GB SSD
Display(s) Samsung S24E650BW LED x 2
Case Fractal Design Define R4
Power Supply EVGA Supernova 550W G2 Gold
Mouse Logitech M190
Keyboard Microsoft Wireless Comfort 5050
Software W10 Pro 64-bit
Conservative values are 60 watts idle for a standard quad core system plus 20 watts for a 1080p monitor.
I understand that. But my point is, ceiling lights tend to stay on continuously 8 - 10 - 12 hours per day, or even longer.

When you step away from your computer, it almost immediately goes idle. Then, if the defaults are left alone, the computers goes to sleep in 15 - 20 minutes and stays in that sleep mode until woken. That power consumption between the time it goes idle and goes to sleep is happening for just a few minutes, not hour after hour after hour, all day long.

Even at 60W, it would take whole lot of those 15-20 minute idle periods to consume 1KWh of energy. With the average price of 1KWh in the US being ~13.25 cents, I don't see this being an issue.

Extreme tree huggers might disagree, but then I doubt they would be leaving lights on all day either - or using computers that consume 60W when idle.
 
Top