Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mitigated] HDR Screen Dim #88491

Open
AzureWolf opened this issue Jan 11, 2020 · 27 comments
Open

[mitigated] HDR Screen Dim #88491

AzureWolf opened this issue Jan 11, 2020 · 27 comments

Comments

@AzureWolf
Copy link

@AzureWolf AzureWolf commented Jan 11, 2020

  • VSCode Version: 1.42.0-insider (user setup)
  • OS Version: Windows_NT x64 10.0.19041

Steps to Reproduce:

  1. Open VSCode on Win 10 with an HDR screen

Does this issue occur when all extensions are disabled?: Yes

I know this issue was resolved previously (#68069 and #72373). The --force srgb trick still works, but for the past few weeks it was not necessary.

@connor4312

This comment has been minimized.

Copy link
Member

@connor4312 connor4312 commented Jan 13, 2020

@deepak1556 looks like this was fixed originally by an electron update, something regress here?

@AzureWolf

This comment has been minimized.

Copy link
Author

@AzureWolf AzureWolf commented Jan 17, 2020

Just wanted to update that the latest update still has this issue. --force srgb still works but had to reimplement it.

@deepak1556

This comment has been minimized.

Copy link
Contributor

@deepak1556 deepak1556 commented Jan 17, 2020

Seems like a regression from upstream chromium, will have to wait for a fix from them. https://bugs.chromium.org/p/chromium/issues/detail?id=1038770

@bpasero

This comment has been minimized.

Copy link
Member

@bpasero bpasero commented Jan 21, 2020

If we cannot get a fix, we should make sure force-color-profile is a supported option for argv.json (https://github.com/microsoft/vscode/blob/3aa5383/src/main.js#L128)

@AzureWolf

This comment has been minimized.

Copy link
Author

@AzureWolf AzureWolf commented Jan 22, 2020

If we cannot get a fix, we should make sure force-color-profile is a supported option for argv.json (https://github.com/microsoft/vscode/blob/3aa5383/src/main.js#L128)

I second this. I love that you guys are updating and working on this amazing free software, but it's admittedly annoying and inconvenient to have to keep putting this in. At the very least, stop re-creating the shortcut after updates?

@bpasero bpasero self-assigned this Jan 24, 2020
@bpasero bpasero modified the milestones: January 2020, February 2020 Jan 24, 2020
@bpasero

This comment has been minimized.

Copy link
Member

@bpasero bpasero commented Jan 25, 2020

@AzureWolf can we try out something:

I am trying to figure out if the --force-color-profile srgb works when passed in programmatically so that you do not have to specify it each time from the command line.

[1]

{
	"disable-color-correct-rendering": true,
	"force-color-profile": "srgb"
}
@AzureWolf

This comment has been minimized.

Copy link
Author

@AzureWolf AzureWolf commented Jan 27, 2020

Hey sorry I just saw this. The issue seems to have been resolved. I also tested what you asked @bpasero and it doesn't appear to work (tested by following your instructions, that version is still dark, and running and re-running does not resolve it).

So it seems like it's resolved and hopefully won't be an issue? I don't know what changed.

@deepak1556

This comment has been minimized.

Copy link
Contributor

@deepak1556 deepak1556 commented Jan 27, 2020

@AzureWolf we reverted to electron 6 in master, so its temporarily fixed in the insiders, but based on the original issue it should reappear once we get electron 7 update again. The chromium issue is still open but I will backport a potential fix the chromium authors mentioned. I can get a custom build some time today or tomorrow, would be great if you can test that.

@AzureWolf

This comment has been minimized.

Copy link
Author

@AzureWolf AzureWolf commented Jan 27, 2020

Sure happy to help!

@bpasero bpasero removed their assignment Jan 28, 2020
@bpasero

This comment has been minimized.

Copy link
Member

@bpasero bpasero commented Feb 12, 2020

@AzureWolf ok let's try that experiment again if you can. There is a newer build available [1]

  • close any running instance of VSCode
  • download [1]
  • quick open command palette and pick "Configure Runtime Arguments"
  • replace the file with the contents below [2]
  • close
  • start same version again

=> are the colors better?

[1] https://az764295.vo.msecnd.net/insider/a1f569c66f67287c525ee50b5f46ced8a50b4551/VSCode-darwin-insider.zip

[2]

{
	"disable-color-correct-rendering": true,
	"force-color-profile": "srgb"
}
@bpasero

This comment has been minimized.

Copy link
Member

@bpasero bpasero commented Feb 17, 2020

@AzureWolf ping

@bpasero bpasero mentioned this issue Feb 17, 2020
bpasero added a commit that referenced this issue Feb 21, 2020
@bpasero bpasero changed the title HDR Screen Dim [mitigated] HDR Screen Dim Feb 21, 2020
@bpasero

This comment has been minimized.

Copy link
Member

@bpasero bpasero commented Feb 21, 2020

I pushed support for configuring the color profile via our runtime arguments file. Steps to enable this:

  • use command palette to find runtime arguments command [1]
  • add "force-color-profile": "srgb" to the end of the file
  • restart

[1]
image

@AzureWolf

This comment has been minimized.

Copy link
Author

@AzureWolf AzureWolf commented Feb 22, 2020

Hey super sorry. I'll check it out when I get a chance. For now I just removed HDR from my monitor settings so I have to set that up again when I'm not busy. It was a real pain to see a daily loss of brightness at the start of the day and it's been busy. I'll let you know.

Very sorry about that

@AzureWolf

This comment has been minimized.

Copy link
Author

@AzureWolf AzureWolf commented Feb 23, 2020

Hey just tested this out and it does and doesn't work. So putting "disable-color-correct-rendering" to false fixes the issue. Setting it to true does not resolve the issue. Setting it to true and adding the color profile (as the screenshot you see here) does not fix the issue.

Annotation 2020-02-23 135848

Thank you so much for this! I can finally go back to using HDR on my monitor! I don't know what it is, but it doesn't really make a big difference but all the colors are "softer" or less intense except where appropriate. It's hard to describe, but it makes it easier to work longer, so I'm super grateful. I'll be sure to thank you guys wherever possible. You guys are an amazing team making an exceptional and free product.

EDIT: may be a stupid question, but the other application I'm experiencing this issue on was mpv (the video player). Any chance you know what would be the equivalent setting there?

@bpasero

This comment has been minimized.

Copy link
Member

@bpasero bpasero commented Feb 25, 2020

@AzureWolf thanks for giving this a try. Since you see yellow squigglies in the editor I wonder if you maybe tried with VSCode stable and not insiders? Can you recheck this with our insiders build?

You can give our preview releases a try from: https://code.visualstudio.com/insiders/

You should not see a yellow warning like that which indicates that this property is not being applied.

@AzureWolf

This comment has been minimized.

Copy link
Author

@AzureWolf AzureWolf commented Feb 25, 2020

I'm using Insiders:
Version: 1.43.0-insider (user setup)
Commit: 07c3397
Date: 2020-02-24T05:33:18.353Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19041

@deepak1556 deepak1556 modified the milestones: February 2020, March 2020 Feb 26, 2020
@seanthegeek

This comment has been minimized.

Copy link

@seanthegeek seanthegeek commented Mar 10, 2020

This regression is still present in the 1.43 final release and 1.44 insiders. It looks like the upstream Chromeium bug mentioned by @deepak1556 has been fixed upstream just 16 days ago. @bpasero can you integrate that fix? I'm not even sure if it has made it's way into a stable release of Chromium or Electron yet though.

@SidShetye

This comment has been minimized.

Copy link

@SidShetye SidShetye commented Mar 10, 2020

Can VSCode have a unit test around HDR to prevent these regressions? This isn't the first time this issue has been reported. This is happening again on 1.43

Version: 1.43.0 (user setup)
Commit: 78a4c91400152c0f27ba4d363eb56d2835f9903a
Date: 2020-03-09T19:47:57.235Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18363
@michaeljota

This comment has been minimized.

Copy link

@michaeljota michaeljota commented Mar 10, 2020

@Varstahl

This comment has been minimized.

Copy link

@Varstahl Varstahl commented Mar 12, 2020

I can confirm this issue reappearing today for me with 1.43, and that the workaround in the release note works. What I don't understand is why 1.43 was fine up to some hours ago, then stopped working properly as soon as I moved from Edge 44 to Edge 80. How is the installation of Edge even connected to VSCode in the first place… Oh, well…

@seanthegeek

This comment has been minimized.

Copy link

@seanthegeek seanthegeek commented Mar 12, 2020

@Varstahl It shouldn't be related to Edge at all. Maybe the Edge install turned on HDR in Windows? Or maybe you turned on HDR and forgot?

@Varstahl

This comment has been minimized.

Copy link

@Varstahl Varstahl commented Mar 12, 2020

I always have HDR active having an HDR monitor, and the original problem followed #68069 (bright and washed out colors) and was fixed up to today. Then, today, after moving from legacy to recent Edge, the issue appeared in a different form: now it's like there's a black overlay plus some artifacts in the text editor. It's fixed as per the other issue with --force-color-profile srgb, just as with the disable-color-correct-rendering option.

I've tried re-installing the latest version of Code as well as trying the insider, but still the same issue, after updating to Edge 80 the issue started in Code (and in Code alone). Weird.

Edit: realistically shopped screenshot for reference

image

@seanthegeek

This comment has been minimized.

Copy link

@seanthegeek seanthegeek commented Mar 12, 2020

@varanshukla I had the same problem. The new workaround for VSCode 1.43 is different than the past ones you are talking about.

image

From the release notes section @michaelchiche linked to:

In the meantime, we have a temporary workaround for this issue:

1.Open the Command Palette (Ctrl+Shift+P).
2. Run the Preferences: Configure Runtime Arguments command.
3. This command will open a argv.json file to configure runtime arguments. There might be some default arguments there already.
4. Edit "disable-color-correct-rendering": true to "disable-color-correct-rendering": false.
5. Restart VS Code.

@Varstahl

This comment has been minimized.

Copy link

@Varstahl Varstahl commented Mar 13, 2020

@seanthegeek assuming you were replying to me, yeah, I know. As I said both the runtime option and the force srgb command parameter fix that issue, I've already applied the change to argv.json myself. I was merely reporting the issue because I never saw screens like it and because it happened after installing Edge, which is something I still can't wrap my head around.

@Jaegermeiste

This comment has been minimized.

Copy link

@Jaegermeiste Jaegermeiste commented Mar 14, 2020

I'm on 1.43 with HDR enabled and FreeSync. Issue cropped up after update, but @bpasero's force-color-profile : srgb DID work for me and resolve the issue without changing disable-color-correct-rendering, which remains true.

@Kissaki

This comment has been minimized.

Copy link

@Kissaki Kissaki commented Mar 17, 2020

Resurfaced after updating to 1.43.

To clarify what the workaround is, that works for me as well:

Open the "Preferences: Configure Runtime Arguments" action which opens the argv.json file and add the setting "force-color-profile": "srgb".

Disabling disable-color-correct-rendering did improve/change the rendering but did not really fix the contrast issue. With the above workaround this setting can be left at true.

@seanthegeek

This comment has been minimized.

Copy link

@seanthegeek seanthegeek commented Mar 18, 2020

@Kissaki "force-color-profile": "srgb" is the best fix, instead of disable-color-correct-rendering. It also fixed the screenshot problem I reported in issue #92365. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
10 participants
You can’t perform that action at this time.