Screen flickering, display quality degrading, and remaining IJ window image on M1 Macbook with external display
I'm using the latest stable release of IJ Ultimate (2020.3.1) on an M1 Macbook Air with the latest macOS release (11.1). I was using an external display (HP z27) when the issue happened.
At some point after IJ launches, my display started high-frequency flickering which is obvious to human eyes but not easily captured by camera. In the meantime, I can see that on the left side of the screen, the screen image quality has become much worse. Also I can see remaining semi-transparent IJ windows on the screen, even after completely exiting IJ. Note that the Macbook's internal display worked fine.
To resolve this issue, I had to (1) disconnect my laptop, (2) reset the monitor settings and re-plug the monitor power cord, and (3) restart my laptop. Otherwise flickering will continue.
The reason I'm posting here is that such issue had never happened to other software I have used on this new Macbook for the past month. It did not even happen to the beta release of IJ on Apple Silicon.
There's some more context over actions that I took before the issue happened, although I'm not sure whether they are relevant: (1) I was opening an Android project (working on a pure Java project seemed fine), and (2) the issue happened when I opened up new windows (it can be any kind of window).
Thanks!
Please sign in to leave a comment.
I am not sure the issue is related to IntelliJ IDEA. Feel free to reply back in case you are sure it is caused by IDE providing logs/steps to reproduce
I'd rather check Apple forums, such as
https://discussions.apple.com/thread/252130766
https://discussions.apple.com/thread/252171250
It's the packaged JDK actually.
It doesn't happen with other JDKs but then you loose some other functionality / get ugly fonts.
Hello,
If you face it with the latest version please try workaround from the related case: https://youtrack.jetbrains.com/issue/JBR-4680/idea-window-flickers-while-changing-the-screen-brightness
I have the same problem.
Same here.
Liam Seamus Coughlin Donascor Mirek this should have been fixed in 2022.2.3.
If you face the issue in this version, please indicate what triggers this, describe your displays' arrangement / connection type (HDMI, USB-C or laptop's built-in) and specify which of them hosts the IDE when the issue occurs. And please let us know whether the workaround with disabling the auto-adjust screen brightness helped in your case. Thank you!
Ekaterina Valeeva I am experiencing it on IntelliJ CE 2022.2.3.
My configuration is:
MacBook Pro 14" M1 Pro, plugged to power and closed, so to only use the external monitor, via usb-c.
If I use it open, the flickering doesn't seem to occur.
Also, it does seem to happen only when the IDE window is maximized to fit the screen.
Matteo Battaglio sorry for getting back with more questions.
Is this triggered by certain actions or happens randomly? Do you maybe have any utilities (e.g. f.lux) installed that change the display color profile?
Are there any other applications opened at the same time?
Does this mean the IDE is full screen or it's still in window mode (that is, colored mac window controls are visible)?
Ekaterina Valeeva no worries!
happens randomly; and it got worse (i.e. more frequent) in the last few days
no
still in window mode; I've actually just noticed that it flickered for a moment also when the window was slightly shorter than the screen space, but it only lasted a few seconds, while for the last few days it was almost constantly flickering when I was trying to use the ide fitting the screen space.
Yeah: usually Slack, Firefox, Spotify, Whatsapp, Calendar...
Ekaterina Valeeva I've been experiencing the same problem in PhpStorm for the last few months but it got really frequent just recently (after I updated to 2022.2.3). It happens when I have PhpStorm opened in full screen mode on an external monitor connected via HDMI to my 13'' Macbook Pro M1 and on my primary notebook screen I have Chrome opened also in full screen. Before the update it was the screen with PhpStorm that was flickering, now it still flickers from time to time as well but the main issue is an extensive flickering on the screen with Chrome opened. Moving from PhpStorm to another desktop immediately stops it but it's back right when I get back.
Tom Korec
What's your Mac OS version? Does the issue persist if you open the IDE (and maybe Chrome too) in the windowed mode?
Do things change for the better if you add -Dsun.java2d.metal=false to the file opened with IDE main menu Help | Edit custom VM options... and restart the IDE?
Ekaterina Valeeva adding the -Dsun.java2d.metal=false option seems to have fixed things for me!
Matteo Battaglio thanks for letting us know. Could you please also specify your Mac OS version (the one shown in Apple menu > About this Mac)?
macOS Monterey 12.6
Ekaterina Valeeva I am using macOS Ventura 13.0. The problem occurs only when both apps are opened in full screen mode on different screens at the same time. However, the VM option seems to do the trick since the flickering rapidly decreased (although didn't disappear completely). Anyway, thanks for your help
Tom Korec thank you for checking. Apparently you're facing JBR-4959, please upvote and follow for updates.
Matteo Battaglio what you're facing looks similar to IDEA-300331, I've added the details of your report there (in a private comment), please upvote.
Ekaterina Valeeva its working for me. Im using PyCharm and MBA m1 Ventura 13.0.1
I can confirm that adding the -Dsun.java2d.metal=false to the VM options for IntelliJ stopped the flickering.
Got this issue on an M2 Mac using 4k display connected using HDMI.
hadn't previously happened.
adding java2d.metal option to VM options stopped the flickering.
other apps don't flicker. IDE in the background does not flicker, unless moving the mouse over a visible part of the window, then it flickers again. the flickering effect appears to be like constantly switching the gamma applied to the window.
Gmarinov what you describe looks similar to IDEA-326495, please upvote that issue and follow it for updates. If possible please share a screen recording demonstrating how exactly the IDE flickers in your case. Thank you!
I have the same issue in IntelliJ IDEA 2023.3.3 (Ultimate Edition) and Intel Mac
Ivaleev does disabling metal (-Dsun.java2d.metal=false added to Help | Edit custom VM options) help in your case as well?
It would help us a lot if you could add a screen recording demonstrating the flickering to the IDEA-326495.
I added this param. If the screen will flicker again, I will record it. It was flickering periodically. Maybe one day in a week
Ivaleev if you see the issue again, kindly specify what actions exactly triggered it in your case. Thank you!