Weird appearance of IntelliJ IDEA on macOS with HDR activated
I have a Monitor that is HDR10-capable. I am using this monitor with my Mac computers (MacBook and Mac mini).
Now, if I have HDR enabled on macOS in the system preferences, Intellij's appearence becomes weird: colored text (in all parts of Intellij, e.g project view, source code view) shows artifacts like varying color intensity for letters, and sometimes anti-aliasing artifacts. And in general all colors are too bright. What is even more strange: this happens only when Intellij IDEA is the active window - if a modal dialog of Intellij is opened, the text coloring of the main window returns to normal appearence (like without HDR), same with any other application having the active window. And: if I make a screenshot of Intellj showing the bugged text coloring, the screenshot shows Intellij IDEA as in non-HDR mode, all colors fine.
This applies to Android Studio as well.
Intellij IDEA Ultimate Version 2023.3.2
Android Studio Hedgehog 2023.1.1 Patch 1
macOS Sonoma 14.2.1
请先登录再写评论。
Hello, sadly so far I cannot reproduce the issue in my environment using a built-in display supporting HDR. To help us to investigate this further please provide the following details:
1. Screenshot of the Mac OS Settings | Displays with the Preset list expanded for the display where you observe the issue.
2. Screenshot or extracted text from Mac OS System report | Hardware | Graphics/Displays.
3. If possible please attach photos or video made using an external device (e.g. mobile phone) that show the IDEA main window with and without the modal dialog shown.
4. Please try adding -Dsun.java2d.metal=false to Help | Edit custom VM options… and restart the IDE. Will the issue persist after that?
It might help us a lot if you share complete IDEA logs captured via Help | Collect logs and diagnostic data. You can use our upload service, just let us know the upload ID. Thank you!
-Dsun.java2d.metal=false did not help. I collected und uploaded the requested photos/screenshots. Upload id: 2024_01_10_A5xP5kzHK2q46Vjk7UPXkn (files: Intellij HDR issue.pdf and 4 more)
Could you please additionally clarify how exactly the display is connected to your Mac - via HDMI, thunderbolt or docking station?
And do I understand right the issue goes away after you disable the Hochkontrastbild for the BenQ display?
Does anything change for the better if you choose another color profile (Farbprofil)?
Connection of my Mac(s) is via a KVM and HDMI. However, the same issue is there with a Mac connected to my display by DisplayPort/Thunderbolt without the KVM.
The issue disappears by disabling HDR. Rellably. Has been my workaround since (I do not have so much applications that can take advantage of HDR, but my monitor has automatic brightness adjustment, which I find very convenient, in HDR-mode only.
But this weekend I found that with the most recent versions of IDEA Intellij Ultimate installed, the issue is no longer there. It is still recognizable in Android Studio. I tried to “reset” Android Studio by resetting it to default config, as I suspected that the different behaviour of AS and Intellij is due to config-file differences, but the issue remains in AS.
However, as Intellij eventually fixed the not working Device Explorer for Android devices as well in one of the recent updates, I have no need any longer to use Android Studio. So, for me, the issue is resolved. Thank you for your support.
Android studio release schedule is not currently synchronized with IDEA, that's why you might see some issues in Android studio which have already been fixed on the platform side and thus do not appear in IDEA.
Wish you a nice day.
I'm seeing exactly this issue as well with IntelliJ 2023.3.4 (233.14475.28) on my external (HDR) screen, connected via Thunderbolt (DisplayPort Version 1.4). Interestingly it happens on my M2 Pro-based MBP, but not an older Intel-based MBP running the same IDE version and connected via the same path.
Some quirks that make it hard to track down: it doesn't show up on screenshots. It's some combination of software rendering and hardware pipeline: other applications showing the same font/size/color combinations do not exhibit the problem.
Olaf Schlueter: In which version of IntelliJ did the problem resolve itself for you?
The most recent one 2023.3.4 did not show that behaviour any more. However, I recently ditched HDMI in favour for DP, as my HDMI KVM gave me trouble, unreliably providing a signal to my monitor this was able to understand after switching.
I never had that issue when connecting to the Monitor via DP. Either by KVM or directly.
Recently I learned that HDMI on Apple Silicon Macs is really DP turned into HDMI by an auxiliary chip. DP is the “native” output mode for Apple Silicon GPUs so to speak. So flaws in the HDMI output may be related to different versions (and different quality) of this chip in different Macs. As I had a situation where my mac mini M1 was fine, but a MBP with M2 Pro showed the issue in HDMI/HDR with the same software.
Maybe it also worth noting that I never had an issue with any other application but java-based one's. E.g. I tried Apache Directory Studio, which is a Java application, and it also showed issues with HDMI/HDR, but due to the nature and appearance of that app less noticable. There must be something weird going on with Java and Apple Silicon GPUs.
All that sounds like Jetbrains cannot do anything about it. It's likely a hardware issue.
Thanks for the followup. Interestingly I see it on an external monitor connected via DisplayPort (1.4, over Thunderbolt). To me it looks like a problem in the interpolation for HiDPI screens, in particular when in HDR mode. Although hardware is a factor, I think there's also something at play on the software side. To summarise:
Also kind of weird: if IntelliJ is not the foreground app, I notice that sometimes the layout geometry sometimes wiggles back and forth a bit… as if things are not being rendered on pixel boundaries and it can't decide which way to round things. The problem also comes and goes with that wiggling.
As such I think the problem is most likely related to the scaling/subpixel interpolation path in HDR mode.