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

[BUG]: Komorebi causes flickering in 2024 JetBrains IDEs #781

Closed
Insprill opened this issue Apr 22, 2024 · 16 comments
Closed

[BUG]: Komorebi causes flickering in 2024 JetBrains IDEs #781

Insprill opened this issue Apr 22, 2024 · 16 comments
Labels
bug Something isn't working

Comments

@Insprill
Copy link

Insprill commented Apr 22, 2024

Describe the bug
When Komorebi is running, it causes the 2024 edition JetBrains IDEs (reproducible with IntelliJ and Rider) to flicker whenever a window event happens, including to other windows.

To Reproduce
Steps to reproduce the behavior:

  1. Open a 2024.1 edition instance of IntelliJ/Rider/Other JetBrains IDE.
  2. Focus on/off of it, or between other applications never touching the IDE.
  3. Observe it flickering when doing so.
  4. It will also flicker whenever most popups are opened/closed during code editing.

Expected behavior
It should not flicker

Screenshots and Videos

komorebi-jetbrains-flicker.mp4

Operating System

OS Name:                   Microsoft Windows 11 Pro for Workstations
OS Version:                10.0.22631 N/A Build 22631

komorebic check Output

No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\Insprill

Looking for configuration files in C:\Users\Insprill

Found komorebi.json; this file can be passed to the start command with the --config flag

No ~/.config/whkdrc found; you may not be able to control komorebi with your keyboard

Aditional Context
I'm using Komorebi built from 740cb3c

@Insprill Insprill added the bug Something isn't working label Apr 22, 2024
@LGUG2Z
Copy link
Owner

LGUG2Z commented Apr 22, 2024

This is either Windows compositor bug or a JetBrains rendering bug; if you open tickets with either MS or JetBrains please link them here for tracking.

@Insprill
Copy link
Author

Insprill commented Apr 22, 2024

I don't know enough about the inner workings of these systems to make a proper report to either, so I'll leave that to someone else. Two other things to note are that 2023 and older IDEs are fine, and the flickering isn't as bad in person as they are in the recording (recorded with AMD Adrenalin), but it's still very much present and quite distracting.

@mmikeww
Copy link
Contributor

mmikeww commented Apr 23, 2024

do you get the flicker if you turn off the active window border?

@Insprill
Copy link
Author

I do, yes.

@azinsharaf
Copy link

i used to use pycharm and i remember it had flickering issue in some situations (without komorebi). Maybe it is worth it to ask in their community forum too.
https://intellij-support.jetbrains.com/hc/en-us/community/topics

@thomasroodnl
Copy link

thomasroodnl commented May 6, 2024

Hi @Insprill, I am sorry to hear that you are dealing with this issue too. My main issue was heavy flickering whenever I opened a context menu or used Ctrl + Tab to switch files.

I have been trying a lot of workarounds from other posts on Jetbrains flickering and none of them really worked. However, I found something that for me seems to solve the flickering, hopefully it works for you too. For your info, I am running the following setup:

komorebi v0.1.25
PyCharm 2024.1.1 Community, Build #PC-241.15989.155
Windows 10 2H22, Build 19045.4291

My solution involved switching to a different Java JDK to run PyCharm. By default, it was running on a bundled version (17). I installed the latest Java JDK from the official website (version 22.0.1) and selected it as follows:

Help -> Find Action... -> Choose Boot Java Runtime for the IDE...

In this window open drop-down Select Runtime and choose Add custom runtime. Then choose the path to the installed runtime and restart the IDE when prompted.

Hopefully this process works similarly in other JetBrains IDEs. Note that it is not a perfect fix, at least for me the 'active window border' still flickers whenever I open a context menu or switch files, but at least the main window stays stable (which makes it much less distracting).

Please let me know if this works for you.

@Insprill
Copy link
Author

Insprill commented May 7, 2024

Yup, this indeed worked for me! It appears to be an issue with their runtime. I tested with Adoptium and Graal 17 and 22, and it isn't present in either, but it's present in all versions of their runtime listed in the IDE (17 and 21). I created an issue on their runtime repo for it - hopefully, something will come of it. Thank you for the workaround in the meantime!

@LGUG2Z
Copy link
Owner

LGUG2Z commented May 7, 2024

Can you link the JetBrains ticket here as well please? 🙏

@Insprill
Copy link
Author

Insprill commented May 7, 2024

GitHub shows it in the history just above my comment, but here it is as well:
JetBrains/JetBrainsRuntime#379

@LGUG2Z
Copy link
Owner

LGUG2Z commented May 7, 2024

Ah thanks! I was looking on my phone and all the old comments were folded away 😅

@Insprill
Copy link
Author

Insprill commented May 7, 2024

Good to know this also causes the entire editor to get visually offset vertically by the size of the title bar when the border breaks 😅

image

@Insprill
Copy link
Author

Insprill commented May 8, 2024

I re-created the issue on YouTrack - I'm not sure why they have GitHub issues enabled as it looks like they don't check them.
https://youtrack.jetbrains.com/issue/JBR-7123/Flicker-when-changing-focused-window-with-Komorebi

@LGUG2Z
Copy link
Owner

LGUG2Z commented May 13, 2024

54c58be this should also improve the situation

@Insprill
Copy link
Author

I tested this all day (since it was committed), and I haven't noticed any flickering!

@LGUG2Z
Copy link
Owner

LGUG2Z commented May 13, 2024

Tentatively going to close this as the flickering is gone even without the use of a custom runtime 🤞

@LGUG2Z LGUG2Z closed this as completed May 13, 2024
@thomasroodnl
Copy link

Tested it too, works perfectly now with the default runtime. Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants