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

testing wayland #242

Open
257 opened this issue Aug 16, 2023 · 150 comments
Open

testing wayland #242

257 opened this issue Aug 16, 2023 · 150 comments

Comments

@257
Copy link

257 commented Aug 16, 2023

hi @mkartashev,

i have managed to run android-studio on top of jbr21 branch (by editing ~/.config/Google/AndroidStudioPreview2023.1/options/other.xml and pointing installDir of installed-jdk to jbr21).

i did that in hopes being able to run android-studio purely under wayland but it still take the xwayland route; passing -Dawt.toolkit.name=WLToolkit to /opt/android-studio/jbr/bin/java doesn't seem to have any effect.

any idea?

@mkartashev
Copy link
Collaborator

The Wayland toolkit is not really ready for this kind of testing. When it is, we will certainly make an announcement here: https://youtrack.jetbrains.com/issue/JBR-3206

If you would like to join the effort of supporting Wayland in Java, please check the work breakdown at the Wakefield project wiki, join the mailing list, and we can discuss things further there.

@257
Copy link
Author

257 commented Aug 17, 2023

sure. FYI i got it working by passing this (not the path to java):

Environment=JAVA_HOME=%h/src/java/JetBrainsRuntime/build/linux-x86_64-server-release/jdk/bin
Environment=CLASSPATH=/opt/android-studio/lib/app.jar:/opt/android-studio/lib/3rd-party-rt.jar:/opt/android-studio/lib/util.jar:/opt/android-studio/lib/util_rt.jar:/opt/android-studio/lib/util-8.jar:/opt/android-studio/lib/jps-model.jar:/opt/android-studio/lib/stats.jar:/opt/android-studio/lib/protobuf.jar:/opt/android-studio/lib/external-system-rt.jar:/opt/android-studio/lib/intellij-test-discovery.jar:/opt/android-studio/lib/forms_rt.jar:/opt/android-studio/lib/rd.jar:/opt/android-studio/lib/externalProcess-rt.jar:/opt/android-studio/lib/3rd-party-native.jar:/opt/android-studio/lib/annotations-java5.jar:/opt/android-studio/lib/annotations.jar:/opt/android-studio/lib/byte-buddy-agent.jar:/opt/android-studio/lib/error-prone-annotations.jar:/opt/android-studio/lib/groovy.jar:/opt/android-studio/lib/idea_rt.jar:/opt/android-studio/lib/intellij-coverage-agent-1.0.706.jar:/opt/android-studio/lib/junit.jar:/opt/android-studio/lib/junit4.jar:/opt/android-studio/lib/resources.jar:/opt/android-studio/lib/ant/lib/ant.jar
ExecStart=%h/src/java/JetBrainsRuntime/build/linux-x86_64-server-release/jdk/bin/java \
	-XX:ErrorFile=/tmp/java_error_in_studio_%p.log \
	-XX:HeapDumpPath=/tmp/java_error_in_studio_.hprof \
	-Xms256m \
	-Xmx2048m \
	-XX:ReservedCodeCacheSize=512m \
	-XX:+UseG1GC \
	-XX:SoftRefLRUPolicyMSPerMB=50 \
	-XX:CICompilerCount=2 \
	-XX:+HeapDumpOnOutOfMemoryError \
	-XX:-OmitStackTraceInFastThrow \
	-XX:+IgnoreUnrecognizedVMOptions \
	-XX:CompileCommand=exclude,com/intellij/openapi/vfs/impl/FilePartNodeRoot,trieDescend \
	-XX:MaxJavaStackTraceDepth=10000 \
	-ea \
	-Dawt.toolkit.name=WLToolkit \
	-Dsun.io.useCanonCaches=false \
	-Dsun.java2d.metal=true \
	-Djbr.catch.SIGABRT=true \
	-Djdk.http.auth.tunneling.disabledSchemes="" \
	-Djdk.attach.allowAttachSelf=true \
	-Djdk.module.illegalAccess.silent=true \
	-Dkotlinx.coroutines.debug=off \
	-Dsun.tools.attach.tmp.only=true \
	-Djb.vmOptionsFile=/opt/android-studio/bin/studio64.vmoptions \
	-Djava.system.class.loader=com.intellij.util.lang.PathClassLoader \
	-Didea.vendor.name=Google \
	-Didea.paths.selector=AndroidStudioPreview2023.1 \
	-Djna.boot.library.path=/opt/android-studio/lib/jna/amd64 \
	-Dpty4j.preferred.native.folder=/opt/android-studio/lib/pty4j \
	-Djna.nosys=true \
	-Djna.noclasspath=true \
	-Didea.platform.prefix=AndroidStudio \
	-XX:FlightRecorderOptions=stackdepth=256 \
	-Dsplash=true \
	--add-opens=java.base/java.io=ALL-UNNAMED \
	--add-opens=java.base/java.lang=ALL-UNNAMED \
	--add-opens=java.base/java.lang.ref=ALL-UNNAMED \
	--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
	--add-opens=java.base/java.net=ALL-UNNAMED \
	--add-opens=java.base/java.nio=ALL-UNNAMED \
	--add-opens=java.base/java.nio.charset=ALL-UNNAMED \
	--add-opens=java.base/java.text=ALL-UNNAMED \
	--add-opens=java.base/java.time=ALL-UNNAMED \
	--add-opens=java.base/java.util=ALL-UNNAMED \
	--add-opens=java.base/java.util.concurrent=ALL-UNNAMED \
	--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED \
	--add-opens=java.base/jdk.internal.vm=ALL-UNNAMED \
	--add-opens=java.base/sun.nio.ch=ALL-UNNAMED \
	--add-opens=java.base/sun.nio.fs=ALL-UNNAMED \
	--add-opens=java.base/sun.security.ssl=ALL-UNNAMED \
	--add-opens=java.base/sun.security.util=ALL-UNNAMED \
	--add-opens=java.base/sun.net.dns=ALL-UNNAMED \
	--add-opens=java.desktop/com.sun.java.swing.plaf.gtk=ALL-UNNAMED \
	--add-opens=java.desktop/java.awt=ALL-UNNAMED \
	--add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED \
	--add-opens=java.desktop/java.awt.event=ALL-UNNAMED \
	--add-opens=java.desktop/java.awt.image=ALL-UNNAMED \
	--add-opens=java.desktop/java.awt.peer=ALL-UNNAMED \
	--add-opens=java.desktop/java.awt.font=ALL-UNNAMED \
	--add-opens=java.desktop/javax.swing=ALL-UNNAMED \
	--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED \
	--add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED \
	--add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED \
	--add-opens=java.desktop/sun.awt.wl=ALL-UNNAMED \
	--add-opens=java.desktop/sun.awt.datatransfer=ALL-UNNAMED \
	--add-opens=java.desktop/sun.awt.image=ALL-UNNAMED \
	--add-opens=java.desktop/sun.awt=ALL-UNNAMED \
	--add-opens=java.desktop/sun.font=ALL-UNNAMED \
	--add-opens=java.desktop/sun.java2d=ALL-UNNAMED \
	--add-opens=java.desktop/sun.swing=ALL-UNNAMED \
	--add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED \
	--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
	--add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
	--add-opens=jdk.jdi/com.sun.tools.jdi=ALL-UNNAMED com.intellij.idea.Main

@257
Copy link
Author

257 commented Aug 18, 2023

looks great and runs smooth, most of the time :)

for any one daring to try out, making a list of things that don't work, and things that cause crashes.
. intercting with the window before Gradle is finished at the startup crashes android-studio, so be patient :) [make sure project gradle is also poiting jbr21]
. 'CTRL+Shift+f' (Search in Files), libinput?
. clipboard, wl-{copy,paste}, yes i have set clipboard=unnamedplus in ~/.ideavimrc
. oversized cursor (known issue? i'm using hyprland, wlroot-based with latest Intel driver, no nvidia here)
. popup menus are not in focus

@cies
Copy link

cies commented Aug 18, 2023

Thanks! No time for me to test this this weekend, but IntelliJ is the only app that hold me from going Wayland. It kinda works in XWayland but there is some serious annoyances with that (flickering borders, copy-paste, ...).

@257
Copy link
Author

257 commented Aug 19, 2023

UPDATE: Environment=JAVA_HOME=%h/src/java/JetBrainsRuntime/build/linux-x86_64-server-release/images/jdk/bin

@igor-ramazanov
Copy link

Thanks! No time for me to test this this weekend, but IntelliJ is the only app that hold me from going Wayland. It kinda works in XWayland but there is some serious annoyances with that (flickering borders, copy-paste, ...).

Yeah, absolutely the same. I dream the day where I could finally move on to Wayland completely and ditch out XWayland to make life simpler. The IntelliJ is the only program that holds me from the migration.

@mkurz
Copy link

mkurz commented Aug 20, 2023

I am using IntelliJ since month on Wayland, daily, many hours, I don't really have problems, sometimes a popup windows is misplaced and sometimes I see some magenta artifacts, but I think that is because of the experimental GPU driver I am using (I am on Asahi Linux on a MacBook Pro M1 and things are still under development there).

@Kakadus
Copy link

Kakadus commented Aug 25, 2023

I just added -Dawt.toolkit.name=WLToolkit to the vmoptions (located at $XDG_CONFIG_HOME/{{PRODUCT}}/{{PRODUCT}}.vmoptions) and switched via the Chosse Boot Runtime for the IDE to the manually build Runtime of branch jbr21.

I'm using this for pycharm and it is usable in general under wayland:

  • no splash popup is shown
  • pycharm and some popups such as the settings got a rather ugly menu-bar
  • Ctrl+Shift+F does not work at all, no popup is opening
  • the Find popup (double Shift) is opened but does not gain keyboard focus
  • other popups (such as context menu) work (keyboard navigation possible)
  • when switching between UI Elements, I see several
    SEVERE - sun.awt.wl.focus.WLKeyboardFocusManagerPeer - Unexpected focus owner set in a Window: null
    in the logs, but cannot map it to a specific bug
  • Clipboard works without any problems

I'm on arch linux with sway (wlroots-based). Adding some start options from @257's comment above showed no effects

@mkartashev
Copy link
Collaborator

Clipboard works without any problems

Try pasting something you copied in PyCharm in another app. At this point, the clipboard is confined to just its own Java process.

@gilvbp
Copy link

gilvbp commented Aug 31, 2023

Thanks! No time for me to test this this weekend, but IntelliJ is the only app that hold me from going Wayland. It kinda works in XWayland but there is some serious annoyances with that (flickering borders, copy-paste, ...).

Yeah, absolutely the same. I dream the day where I could finally move on to Wayland completely and ditch out XWayland to make life simpler. The IntelliJ is the only program that holds me from the migration.

+2 Me too!

@gilvbp
Copy link

gilvbp commented Aug 31, 2023

image
Nice!! @mkartashev awesome work!

@offeex
Copy link

offeex commented Nov 2, 2023

how did you guys managed to achieve this?

  1. i built binary jbr
  2. Set these props to idea64.vmoptions:
-Xmx2048m
--add-opens=java.base/java.io=ALL-UNNAMED \
-ea \
-Dawt.toolkit.name=WLToolkit \
--add-opens=java.base/java.lang=ALL-UNNAMED \
--add-opens=java.base/java.lang.ref=ALL-UNNAMED \
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
--add-opens=java.base/java.net=ALL-UNNAMED \
--add-opens=java.base/java.nio=ALL-UNNAMED \
--add-opens=java.base/java.nio.charset=ALL-UNNAMED \
--add-opens=java.base/java.text=ALL-UNNAMED \
--add-opens=java.base/java.time=ALL-UNNAMED \
--add-opens=java.base/java.util=ALL-UNNAMED \
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED \
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED \
--add-opens=java.base/jdk.internal.vm=ALL-UNNAMED \
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED \
--add-opens=java.base/sun.nio.fs=ALL-UNNAMED \
--add-opens=java.base/sun.security.ssl=ALL-UNNAMED \
--add-opens=java.base/sun.security.util=ALL-UNNAMED \
--add-opens=java.base/sun.net.dns=ALL-UNNAMED \
--add-opens=java.desktop/com.sun.java.swing.plaf.gtk=ALL-UNNAMED \
--add-opens=java.desktop/java.awt=ALL-UNNAMED \
--add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED \
--add-opens=java.desktop/java.awt.event=ALL-UNNAMED \
--add-opens=java.desktop/java.awt.image=ALL-UNNAMED \
--add-opens=java.desktop/java.awt.peer=ALL-UNNAMED \
--add-opens=java.desktop/java.awt.font=ALL-UNNAMED \
--add-opens=java.desktop/javax.swing=ALL-UNNAMED \
--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED \
--add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED \
--add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED \
--add-opens=java.desktop/sun.awt.wl=ALL-UNNAMED \
--add-opens=java.desktop/sun.awt.datatransfer=ALL-UNNAMED \
--add-opens=java.desktop/sun.awt.image=ALL-UNNAMED \
--add-opens=java.desktop/sun.awt=ALL-UNNAMED \
--add-opens=java.desktop/sun.font=ALL-UNNAMED \
--add-opens=java.desktop/sun.java2d=ALL-UNNAMED \
--add-opens=java.desktop/sun.swing=ALL-UNNAMED \
--add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
--add-opens=jdk.jdi/com.sun.tools.jdi=ALL-UNNAMED com.intellij.idea.Main
  1. restarted idea and checked with xlsclients, idea still runs under xwayland (alongside with spotify)

@offeex
Copy link

offeex commented Nov 2, 2023

oh, nevermind. running it from console with Environnment set to $JAVA_HOME helped

@Lucaber
Copy link

Lucaber commented Nov 13, 2023

Im currently testing goland with wayland. My first issue was the not working forward and back buttons on a mouse. Here is a quick fix, i have no idea what im doing: Lucaber@9766bd1

@hughesjs
Copy link

I just added -Dawt.toolkit.name=WLToolkit to the vmoptions (located at $XDG_CONFIG_HOME/{{PRODUCT}}/{{PRODUCT}}.vmoptions) and switched via the Chosse Boot Runtime for the IDE to the manually build Runtime of branch jbr21.

I'm using this for pycharm and it is usable in general under wayland:

* no splash popup is shown

* pycharm and some popups such as the settings got a rather ugly menu-bar

* `Ctrl+Shift+F` does not work at all, no popup is opening

* the Find popup (double `Shift`) is opened but does not gain keyboard focus

* other popups (such as context menu) work (keyboard navigation possible)

* when switching between UI Elements, I see several
  ` SEVERE - sun.awt.wl.focus.WLKeyboardFocusManagerPeer - Unexpected focus owner set in a Window: null`
  in the logs, but cannot map it to a specific bug

* Clipboard works without any problems

I'm on arch linux with sway (wlroots-based). Adding some start options from @257's comment above showed no effects

Did you do anything else at all? I've built the latest jbr, set it as the runtime, confirmed that it's the runtime, and added the -Dawt.toolkit.name=WLToolkit to the bottom of ~/.config/Jetbrains/Rider2023.2/rider64.vmoptions. However, it still launches under xwayland for some reason, have I missed something?

My about page:

JetBrains Rider 2023.2.3
Build #RD-232.10203.29, built on November 1, 2023
xxx
xxx
xxx
Runtime version: 22-internal-adhoc.james.JetBrainsRuntime amd64
VM: OpenJDK 64-Bit Server VM by N/A
Linux 6.6.1-arch1-1
.NET Core v7.0.7 x64
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 4096M
Cores: 32
Registry:
    ide.experimental.ui=true
    vcs.empty.toolwindow.show=false
    http.client.file.variables.available=true
    ide.new.project.model.index.case.sensitivity=true
    database.show.search.tab=false

Non-Bundled Plugins:
    com.intellij.resharper.HeapAllocationsViewer (2023.2.0)

Current Desktop: Hyprland

My vmoptions:

-Xmx4096m
-Dide.managed.by.toolbox=/home/james/.local/share/JetBrains/Toolbox/bin/jetbrains-toolbox
-Dtoolbox.notification.token=xxx
-Dtoolbox.notification.portFile=/home/james/.local/share/JetBrains/Toolbox/cache/ports/2059400218.port
-Dawt.toolkit.name=WLToolkit

@257
Copy link
Author

257 commented Nov 20, 2023

pass -D* args in commandline; see my ExecStart=. ignore options/other.xml, apparently just a cached state.

for best experiece move to nightly builds i.e. 2023.3. things run are smooth there :)

@257
Copy link
Author

257 commented Nov 20, 2023

UPDATE2: Environment=JAVA_HOME=path/to/JetBrainsRuntime/build/linux-x86_64-server-release/images/jdk/bin

@hughesjs
Copy link

UPDATE2: Environment=JAVA_HOME=path/to/JetBrainsRuntime/build/linux-x86_64-server-release/images/jdk/bin

So to be clear (since I can't test right now), if I run: Environment=JAVA_HOME=$JBRPATH rider.sh -Dawt.toolkit.name=WLToolkit that should do the job?

@wilecoyote2015
Copy link

wilecoyote2015 commented Dec 8, 2023

It runs surprisingly well for me!
One Problem: I am using a tiling compositor (Hyprland).
Here, PyCharm always shows a titlebar/window decoration. However, with a tiling compositor, window decorations are not desired and consume space.
Using XWayland, no window decoration is visible.
There doesn't seem to be a way to disable the window decoration? (At least with the new UI)

@257
Copy link
Author

257 commented Dec 8, 2023 via email

@romanstingler
Copy link

romanstingler commented Dec 10, 2023

for me the latest 2023.3 (haven't tested any older version)
the suggestion pop-up is way off (dual monitor configuration)

there is no menu where I can click on the File, ...., About

The top bar is white and not according to the theme.
2023-12-10-17:59:04

21b316.4 is way better, I hope 316 jcef will be the next official build
2023-12-22-09:20:04

@izeroo
Copy link

izeroo commented Jan 18, 2024

how did you guys managed to achieve this?

  1. i built binary jbr
  2. Set these props to idea64.vmoptions:
-Xmx2048m
--add-opens=java.base/java.io=ALL-UNNAMED \
-ea \
-Dawt.toolkit.name=WLToolkit \
--add-opens=java.base/java.lang=ALL-UNNAMED \
--add-opens=java.base/java.lang.ref=ALL-UNNAMED \
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
--add-opens=java.base/java.net=ALL-UNNAMED \
--add-opens=java.base/java.nio=ALL-UNNAMED \
--add-opens=java.base/java.nio.charset=ALL-UNNAMED \
--add-opens=java.base/java.text=ALL-UNNAMED \
--add-opens=java.base/java.time=ALL-UNNAMED \
--add-opens=java.base/java.util=ALL-UNNAMED \
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED \
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED \
--add-opens=java.base/jdk.internal.vm=ALL-UNNAMED \
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED \
--add-opens=java.base/sun.nio.fs=ALL-UNNAMED \
--add-opens=java.base/sun.security.ssl=ALL-UNNAMED \
--add-opens=java.base/sun.security.util=ALL-UNNAMED \
--add-opens=java.base/sun.net.dns=ALL-UNNAMED \
--add-opens=java.desktop/com.sun.java.swing.plaf.gtk=ALL-UNNAMED \
--add-opens=java.desktop/java.awt=ALL-UNNAMED \
--add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED \
--add-opens=java.desktop/java.awt.event=ALL-UNNAMED \
--add-opens=java.desktop/java.awt.image=ALL-UNNAMED \
--add-opens=java.desktop/java.awt.peer=ALL-UNNAMED \
--add-opens=java.desktop/java.awt.font=ALL-UNNAMED \
--add-opens=java.desktop/javax.swing=ALL-UNNAMED \
--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED \
--add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED \
--add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED \
--add-opens=java.desktop/sun.awt.wl=ALL-UNNAMED \
--add-opens=java.desktop/sun.awt.datatransfer=ALL-UNNAMED \
--add-opens=java.desktop/sun.awt.image=ALL-UNNAMED \
--add-opens=java.desktop/sun.awt=ALL-UNNAMED \
--add-opens=java.desktop/sun.font=ALL-UNNAMED \
--add-opens=java.desktop/sun.java2d=ALL-UNNAMED \
--add-opens=java.desktop/sun.swing=ALL-UNNAMED \
--add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
--add-opens=jdk.jdi/com.sun.tools.jdi=ALL-UNNAMED com.intellij.idea.Main
  1. restarted idea and checked with xlsclients, idea still runs under xwayland (alongside with spotify)

Added your vmoptions and switched to the manually build Runtime of branch jbr21 via IDE settings(search for vmoptions and runtime option). Seems to be working fine. xlsclinets did not show Android Studio. Ctrl+Shift+F works fine too.

I'm using this for Android Studio and it seems pretty usable in general under wayland:

Splash popup is shown, but at the left-top corner.
Ctrl+Shift+F works, popup is normal
the Find popup (double Shift) is opened and does gain keyboard focus
Clipboard works without any problems
Input-Method not working(fcitx5)

Ubuntu 22.04.3 LTS and jbr21 commit 25d6e5c.
Great work for JetBrains!

@jcdickinson
Copy link

jcdickinson commented Jan 24, 2024

Everything seems to work, same as the above comment, with some minor issues:

  • New UI: interacts very poorly with pop-shell:
    • window size easily desyncs from what the WM believes it to be.
    • window can't be resized with Super+Mouse Right.
  • Quick action appears at top left of screen and is very small. Behaves erratically when being moved. Cannot be resized.
    • Edit for Build #RD-241.8102.132. Still always opens at the top left, but can be moved and resized. Size information is lost across restarts of Rider.
  • main menu never renders "merge main menu with window title" is enabled
  • No splash.

@romanstingler
Copy link

PhpStorm 2024.1EAP with runtime 21.336
https://www.youtube.com/watch?v=Wub2XwGqUkc

@mimi89999
Copy link

It works great mostly, but I can't stop a process running in the terminal by sending Ctrl+C and that's very annoying.

@Memoraike
Copy link

@romanstingler , what kind of environment do you have?

@romanstingler
Copy link

romanstingler commented Jan 29, 2024

@Memoraike
It is Hyprland https://hyprland.org/ (Wayland)

If you want to use it I have to tell you that you have to keep some things in mind.

  • It is no install and use WM(Window manager)
  • you have to go through its wiki https://wiki.hyprland.org/Getting-Started/Master-Tutorial/
  • there is active development (multiple commits daily), but there is a stable version as well
  • there are some login managers that don't play well (I don't use login managers, just boot and execute hyprland)

If you want to give it a try you can use my config (you have to carefully go through the config),
or there are a lot of configs around
https://github.com/romanstingler/dotfiles/tree/main/.config
You will need to install
Hyprland(or hyprland-git), xdg-desktop-portal-hyprland, waybar, wlogout, foot (as terminal, but you can change that in the config)

The IDE has Nord Theme installed

@hughesjs
Copy link

@Memoraike It is Hyprland https://hyprland.org/ (Wayland)

If you want to use it I have to tell you that you have to keep some things in mind.

* It is no install and use WM(Window manager)

* you have to go through its wiki https://wiki.hyprland.org/Getting-Started/Master-Tutorial/

* there is active development (multiple commits daily), but there is a stable version as well

* there are some login managers that don't play well (I don't use login managers, just boot and execute hyprland)

If you want to give it a try you can use my config (you have to carefully go through the config), or there are a lot of configs around https://github.com/romanstingler/dotfiles/tree/main/.config You will need to install Hyprland(or hyprland-git), xdg-desktop-portal-hyprland, waybar, wlogout, foot (as terminal, but you can change that in the config)

The IDE has Nord Theme installed

Can we keep this discussion on-topic please?

@igorrizhyi
Copy link

pycharm running basically fine except some minor things:

  • title bar is always shown regardless of settings and always white (tested on sway, the same goes for a fullscreen mode)
  • popups appear without focus (especially small ones with input element inside, like branch switching, etc)
  • crashes regularly with 'new ui' enabled

@romanstingler
Copy link

@igorrizhyi have you tried 2024.1 EAP and Java 21.336 ? There have been a few improvements

@mkartashev
Copy link
Collaborator

@jordan-josephs This is a bug in JBR (JBR-7198 ) that was recently fixed. You need to use the very latest version of JBR built from source.

@teohhanhui
Copy link

teohhanhui commented Jun 3, 2024

It says:

Fixed in JBR builds: jbr21.458.1

Doesn't that mean the latest release already contains the fix?

https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-21.0.3b465.3

@BananchickPasha
Copy link

I might be rare user who has dark system theme and light IDE theme, but can we do so window decorations color would be based on IDE theme, not system one?

Having black decorations on light theme looks broken IMO:
Screenshot from 2024-06-03 22-04-57

@andreaippo
Copy link

I might be rare user who has dark system theme and light IDE theme, but can we do so window decorations color would be based on IDE theme, not system one?

Having black decorations on light theme looks broken IMO: Screenshot from 2024-06-03 22-04-57

TBF, this looks acceptable to me.

I wouldn't want app developers to have to spend so much effort theming even UI components that are provided by the OS.

I have checked another app I use routinely at work (Postman) and guess what, if I disable OS theme syncing and pick a light theme while the OS is using a dark one, this is the result:

image

I rather hope that native window decorations are implemented, that's something worth doing as it gives a sense of cohesion and that the IDE fits nicely in the DE.

@elisman
Copy link

elisman commented Jun 7, 2024

I am running IntelliJ IDEA with the WLToolkit under WSL unsing WSLg. To be honest, it works pretty well and with every new release it seems to become more stable. Thanks to all that contributed to this!

One bug that I haven't found anywhere here or on YouTrack is the following error: the context menu (right click somewhere) always runs out of the visible area - when I click on the right side or the bottom of the screen, you cannot read or select any entries that run out of the monitors area. This is not the case when I start IntelliJ IDEA without the WLToolkit.

image

Am I missing some configuration? Or is this an unreported bug?

  • IntelliJ IDEA 2024.1.2 (Ultimate Edition)
  • Build #IU-241.17011.79, built on May 22, 2024
  • Runtime version: 21.0.3+13-b465.3 amd64
  • VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
  • Linux 5.15.146.1-microsoft-standard-wsl2
  • Current Desktop: Undefined

@mkartashev
Copy link
Collaborator

@elisman This looks like an unreported bug; the Wayland server itself is responsible for making sure popups do not cross monitor boundaries and the only job of JetBrains Runtime (and IDEA) is to mark the popup as such.

Please, file a ticket in youtrack against JetBrains Runtime. Make sure you include all relevant info including your Linux flavor and version and monitor configurations; also, the steps to reproduce the problem. The issue could be specific to your concrete set up.

@andreaippo
Copy link

andreaippo commented Jun 7, 2024

I am running IntelliJ IDEA with the WLToolkit under WSL unsing WSLg. To be honest, it works pretty well and with every new release it seems to become more stable. Thanks to all that contributed to this!

One bug that I haven't found anywhere here or on YouTrack is the following error: the context menu (right click somewhere) always runs out of the visible area - when I click on the right side or the bottom of the screen, you cannot read or select any entries that run out of the monitors area. This is not the case when I start IntelliJ IDEA without the WLToolkit.

image

Am I missing some configuration? Or is this an unreported bug?

* IntelliJ IDEA 2024.1.2 (Ultimate Edition)

* Build #IU-241.17011.79, built on May 22, 2024

* Runtime version: 21.0.3+13-b465.3 amd64

* VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

* Linux 5.15.146.1-microsoft-standard-wsl2

* Current Desktop: Undefined

Works well for me (right edge of the screenshot corresponds to right edge of the physical monitor too)

image

I'm using KDE Plasma 6.0.5 - which DE are you using? Maybe it's an issue with the window manager?

@mkartashev
Copy link
Collaborator

WSL2 uses a variant of Weston under the hood AFAIK. I'm sure it's capable of placing popups correctly in general, so this must be some corner case that had gone unnoticed, which is why I suggested filing an issue in youtrack. Could be a problem on the IDEA side or in JetBrains Runtime.

@sarim
Copy link

sarim commented Jun 7, 2024

It seems like a shortcoming of wslg. Here's a screenshot with github desktop (read electron), being run in wayland mode (--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WaylandWindowDecorations).
IMG_20240608_021326

Ah, google-chrome itself also shows this problem. Right edge or bottom edge, right click context menu runs off the screen.

Also note: Both electron and chrome doesn't suffer from this when run in X mode. menu opens in left side-top side and don't clip into the edge.

Also also note: I'm running two monitors with left one being vertically positioned. I vaguely remember WSLg having trouble with multi-monitors.

@huyz-git
Copy link

huyz-git commented Jun 9, 2024

I rather hope that native window decorations are implemented

For server side decoration, you can manually merge openjdk/wakefield#7 and build it yourself.

@andreaippo
Copy link

andreaippo commented Jun 25, 2024

Some dark themes, including the embedded Dark theme, leave the editor background white:

image

Can also reproduce with GitHub Dark Experimental, but not with GitHub Dark Dimmed

Both from here:

https://plugins.jetbrains.com/plugin/15418-github-theme

@danroxha
Copy link

danroxha commented Jul 5, 2024

Horizontal scrolling doesn't work without pressing SHIFT via touchpad gestures.

sample.mp4

@mkartashev
Copy link
Collaborator

Horizontal scrolling doesn't work without pressing SHIFT via touchpad gestures.

This is actually work-in-progress and not available just yet: JBR-5673 Wayland: support touch scrolling

@andreaippo
Copy link

andreaippo commented Jul 8, 2024

Using middle-click to close tabs will ALSO paste into that file whatever content is in the Linux "middle-click paste buffer" (I don't know the exact name)

I ended up with quite a few unexpected changes in my files that broke my project's CI/CD and upon closer inspection there was all type of weird content pasted here and there

2024-07-08 14-49-29.tar.gz

At ~0:10/0:11 I middle click the tab I want to close, the file contents are empty at that moment as you can see.
Come back later to it, there's the content of the middle-click buffer in it

IntelliJ IDEA 2024.2 EAP (Ultimate Edition)
Build #IU-242.19890.14, built on July 3, 2024
Licensed to IntelliJ IDEA EAP user: Andrea Ippolito
Expiration date: August 2, 2024
Runtime version: 21.0.3-internal-adhoc.andrea.jetbrainsruntime amd64
VM: OpenJDK 64-Bit Server VM by N/A
Toolkit: sun.awt.wl.WLToolkit
Linux 6.9.7-1-default
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 3924M
Cores: 16
Registry:
debugger.new.tool.window.layout=true
ide.experimental.ui=true
terminal.new.ui=false
credentialStore.linux.prefer.kwallet=true
Non-Bundled Plugins:
club.nutsoft.Github3Theme (1.2.0)
com.codigrate.roraima.theme (1.0.10)
com.codigrate.aurora-borealis.theme (1.0.20)
com.codigrate.everest.theme (1.0.19)
com.codigrate.sequoia.theme (1.0.10)
Kotlin: 242.19890.14-IJ
Current Desktop: KDE

Thanks

Using middle-click to close tabs will ALSO paste into that file whatever content is in the Linux "middle-click paste buffer"

@andreaippo as a workaround, you can disable the middle-click paste behaviour desktop-wide by adding wl-paste -p --watch wl-copy -pc to your autostart. You probably don't use this feature anyway, right? (feel free to edit your comment going forward to avoid spamming the issue and the notifications of subscribers)

Thanks, but I DO use that buffer quite a lot for quick pasting, so this is not a viable solution for me

I'll just be wary of using middle click to close IDEA tabs until this is fixed :)

@SIMULATAN
Copy link

SIMULATAN commented Jul 8, 2024

Using middle-click to close tabs will ALSO paste into that file whatever content is in the Linux "middle-click paste buffer"

@andreaippo as a workaround, you can disable the middle-click paste behaviour desktop-wide by adding wl-paste -p --watch wl-copy -pc to your autostart. You probably don't use this feature anyway, right?
(feel free to edit your comment going forward to avoid spamming the issue and the notifications of subscribers)

@mkartashev
Copy link
Collaborator

FYI: https://blog.jetbrains.com/platform/2024/07/wayland-support-preview-in-2024-2/

@neckbosov
Copy link

@andreaippo I faced same problem, get rid of it by removing Middle click from Paste from X clipboard action in Keymap settings.

@andreaippo
Copy link

@andreaippo I faced same problem, get rid of it by removing Middle click from Paste from X clipboard action in Keymap settings.

Hi, it seems that I'm no longer facing this issue, I dunno if it was fixed via a runtime or an app (IDEA) update, but it's gone.

IntelliJ IDEA 2024.2 Beta (Ultimate Edition)
Build #IU-242.20224.91, built on July 18, 2024
Licensed to IntelliJ IDEA EAP user: Andrea Ippolito
Expiration date: August 17, 2024
Runtime version: 21.0.4-internal-adhoc.andrea.jetbrainsruntime amd64
VM: OpenJDK 64-Bit Server VM by N/A
Toolkit: sun.awt.wl.WLToolkit
Linux 6.9.9-1-default
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 3924M
Cores: 16
Registry:
debugger.new.tool.window.layout=true
ide.experimental.ui=true
credentialStore.linux.prefer.kwallet=true
Non-Bundled Plugins:
club.nutsoft.Github3Theme (1.2.0)
com.codigrate.roraima.theme (1.0.10)
com.codigrate.aurora-borealis.theme (1.0.20)
com.codigrate.everest.theme (1.0.19)
com.codigrate.sequoia.theme (1.0.10)
org.jetbrains.plugins.gitlab (242.20224.99)
org.jetbrains.plugins.github (242.20224.99)
Kotlin: 242.20224.91-IJ
Current Desktop: KDE

@Zesko
Copy link

Zesko commented Aug 15, 2024

KDE Plasma 6 Wayland:

Intellij Idea shows a default Wayland icon instead of the IDE icon.

Screenshot_20240815_124324

IntelliJ IDEA 2024.2.0.1 (Community Edition)
Build #IC-242.20224.387, built on August 13, 2024
Runtime version: 21.0.3+13-b509.4 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.wl.WLToolkit
Linux 6.10.5-273-tkg-eevdf
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 16
Registry:
  debugger.new.tool.window.layout=true
  ide.experimental.ui=true
Non-Bundled Plugins:
  com.intellij.properties.bundle.editor (242.20224.155)
  com.intellij.plugins.vscodekeymap (242.20224.385)
  com.jetbrains.space (242.20224.155)
  Docker (242.20224.385)
  com.jetbrains.packagesearch.intellij-plugin (242.0.12)
Kotlin: 242.20224.387-IJ
Current Desktop: KDE

Just info for you:

https://community.kde.org/Guidelines_and_HOWTOs/Wayland_Porting_Notes#Application_Icon

Does anyone have any idea to fix the icon on QT Wayland environment?

@mkartashev
Copy link
Collaborator

Does anyone have any idea to fix the icon on QT Wayland environment?

Yes. Make sure jetbrains-idea.desktop is in ~/.local/share/applications or other directory where your desktop reads .desktop files from. The icon is referenced from that file.

@Zesko
Copy link

Zesko commented Aug 15, 2024

Yes. Make sure jetbrains-idea.desktop is in ~/.local/share/applications or other directory where your desktop reads .desktop files from. The icon is referenced from that file.

That does not help me on KDE Wayland. But I know IDEA with toolkit X11 has no issue. Which desktop environment do you use?

[Desktop Entry]
Categories=Development
Exec=/opt/intellij-idea/bin/idea  %U
Icon=/opt/intellij-idea/bin/idea.svg
Name=Intellij Idea
NoDisplay=false
Path=
StartupNotify=false
Terminal=false
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=

@Zesko
Copy link

Zesko commented Aug 15, 2024

Does anyone have any idea to fix the icon on QT Wayland environment?

I finally managed a solution to configure a custom Window Rule.

Screenshot_20240815_132836

That works
Screenshot_20240815_133036

@mkartashev
Copy link
Collaborator

That does not help me on KDE Wayland.

The name of the file has to match exactly the "app id" reported by the application. If you are using the community edition, it is jetbrains-idea-ce rather than jetbrains-idea. Append .desktop to that name and welcome to Wayland.

@Zesko
Copy link

Zesko commented Aug 15, 2024

The name of the file has to match exactly the "app id" reported by the application. If you are using the community edition, it is jetbrains-idea-ce rather than jetbrains-idea. Append .desktop to that name and welcome to Wayland.

Ah, I see. I learned it for the first time. Thank you!

@Zesko
Copy link

Zesko commented Aug 15, 2024

The name of the file has to match exactly the "app id" reported by the application. If you are using the community edition, it is jetbrains-idea-ce rather than jetbrains-idea. Append .desktop to that name and welcome to Wayland.

FYI

Or edit the Desktop file to add StartupWMClass=jetbrains-idea-ce, that works too.

@huyz-git
Copy link

Does anyone have any idea to fix the icon on QT Wayland environment?

Yes. Make sure jetbrains-idea.desktop is in ~/.local/share/applications or other directory where your desktop reads .desktop files from. The icon is referenced from that file.

Wayland now has a staging protocol xdg-toplevel-icon-v1, if both jbr and the compositor implements it, then no .desktop file is needed.

But until now, no compositor has implemented it yet.

@wjdp
Copy link

wjdp commented Sep 19, 2024

I'm trialling the wayland implementation via -Dawt.toolkit.name=WLToolkit. Has anyone found an option to disable the window decorations entirely? I'm on a tiling window manager so don't need them at all.

@mahkoh
Copy link

mahkoh commented Sep 19, 2024

See openjdk/wakefield#7

@romanstingler
Copy link

romanstingler commented Sep 20, 2024

one more issue that I still see with 21.0.4.+8-598.4-jcef is that copy & paste text into Codeium or Tabnine doesn't work.

OffTopic: I use EAP and get like at least 500-1k errors every version during the EAP release cycle.
Wouldn't it be better to store which error has already been sent during this version and only ping for the new ones and only send the ones which have not yet been reported?

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

No branches or pull requests