microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.19k stars 29.29k forks source link

Updating turns monitor to sleep #59079

Closed brawaru closed 6 years ago

brawaru commented 6 years ago

Issue Type: Bug

When you press “Restart to Update”, VS Code closes and Updater starts, right before the “Updating VS Code” window appears, your monitor goes to sleep.

It's more looks like Windows goes to sleep, but this one isn't ”Hibernated” (when your PC completely shuts down and leaving only Power indicator blinking), this one just disabling the monitor and once you click with mouse or press any key, everything restored.

This is the most weird bug I've ever seen and I don't know how to trace it, may it be related to Windows Insider build? This never occurred with any other application, but every time VS Code updating.

VS Code version: Code - Insiders 1.28.0-insider (af3614909b837c46a260666cb7baab7a8468a9c8, 2018-09-20T14:09:20.109Z) OS version: Windows_NT x64 10.0.17758

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-4440 CPU @ 3.10GHz (4 x 3093)| |GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled| |Memory (System)|11.95GB (2.06GB free)| |Process Argv|D:\Main\Programs\VSC_Insiders\Code - Insiders.exe| |Screen Reader|no| |VM|0%|
Extensions (19) Extension|Author (truncated)|Version ---|---|--- pomotimer|afr|0.3.1 Bookmarks|ale|9.1.0 markdown-preview-github-styles|bie|0.1.3 transformer|dak|1.6.0 vscode-markdownlint|Dav|0.20.0 gitlens|eam|8.5.6 EditorConfig|Edi|0.12.4 tslint|eg2|1.0.39 LogFileHighlighter|emi|2.4.1 vscode-highlight|fab|1.2.8 gitlab-workflow|fat|0.6.0 docs-yaml|Giz|0.1.10 todo-tree|Gru|0.0.86 vscode-icon-theme|jtl|1.6.3 template-string-expander|map|0.0.3 indent-rainbow|ode|7.2.4 vscode-sort-json|ric|1.13.0 datetime|rid|1.0.5 vscode-wakatime|Wak|1.2.3 (5 theme extensions excluded)
joaomoreno commented 6 years ago

Wow. Can you reproduce it on another machine with the same OS? This is pretty weird yeah.

brawaru commented 6 years ago

TL;DR; I tried to reproduce this on VM but it was already updated to the same Windows Insider version as I am now. With this Windows update of 10.0.17760 I wasn't able to reproduce the issue, same on the host machine. It appears to be Windows issue. No Event Log entries about the sleep, so I think it's system message to turn off display sent by who-knows-what at the time of installing the VSC update, affected versions of Windows are >= ?? < 10.0.17760.

Closing issue for now. If this happens again, I either reopen it or submit a new Issue, but will be now ensuring more that it is VS Code issue and not the Windows itself.

Sorry for all the confusion and that it took so much time to check this all after the submission.

I have written long post with complete details about my investigation, but apparently the tab crashed due to low-memory, so I lost everything (not blaming GitHub for not having drafts)

brawaru commented 6 years ago

I've got a new details on the repro steps. This happens when update is being downloaded and prepared when your monitor is turned off. Like, you went sleeping, monitor automatically turned off after 15 minutes and in hours VS Code discovers a new update, downloads and prepares it. Then, when you return, if you did not restart the VS Code, clicking “Restart to Update” will turn off your monitor before anything appears on the screen, and will skip a song in Spotify (ノಥ益ಥ)ノ彡┻━┻

Update 1: No Event Viewer logs entries to trace…