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

No Wayland Support - OpenBLCMM Crashes on Startup #75

Open
nfox18212 opened this issue Jun 5, 2024 · 7 comments
Open

No Wayland Support - OpenBLCMM Crashes on Startup #75

nfox18212 opened this issue Jun 5, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@nfox18212
Copy link

System Info
https://bpa.st/UU3A
Java version: openjdk 21.0.3 2024-04-16
OpenJDK Runtime Environment (Red_Hat-21.0.3.0.9-1) (build 21.0.3+9)
OpenJDK 64-Bit Server VM (Red_Hat-21.0.3.0.9-1) (build 21.0.3+9, mixed mode, sharing
I do have xwayland installed on my system.

Describe the bug
Open BLCMM crashes on startup on my Wayland Desktop (Fedora 40). Message log here: https://bpa.st/23FQ. What caught my eye was on line 14:

No X11 DISPLAY variable was set,
or no headful library support was found,
but this program performed an operation which requires it,

To Reproduce
Steps to reproduce the behavior:
Run either the launch script or the jar file on a system running Wayland.

@nfox18212 nfox18212 added the bug Something isn't working label Jun 5, 2024
@apocalyptech
Copy link
Contributor

Hmm, interesting. I've actually not used Wayland myself yet, so I'm not super familiar, but my impression was that XWayland was supposed to "pretend" to be Xorg for native Xorg apps -- part of that would definitely mean that apps would need a DISPLAY variable set, though I'm not sure about the particulars that'd be involved w/ XWayland.

Could you try running it with something like export DISPLAY=:0.0 and see if that happens to do the trick?

I'll have to look to see if there's something that could be done on the Java side to just support talking Wayland directly; I'm honestly not sure what's available in that space...

@nfox18212
Copy link
Author

I ran DISPLAY=:0.0 java -jar OpenBLCMM.jar and DISPLAY=:0.0 ./launch_openblcmm.sh and it just gives the same output. I've also tried looking into other environment variables like this arch forum post and it still gives the same crash message.

What's weird is that to my understanding, XWayland is supposed to launch and run automatically when an application tries to run an X-specific application. So why its not running now I don't know.

@apocalyptech
Copy link
Contributor

Hmm, had you tried launching w/ GDK_BACKEND=x11 as that thread suggests? (Again just grasping at straws here 'cause I don't have any Wayland experience myself...)

@nfox18212
Copy link
Author

Yeah that's what I did. No change. Same error message as before. I can do some digging on that error message but I have no java experience unfortunately, so I won't be able to help much.

@apocalyptech
Copy link
Contributor

Okay, sounds good. I'll see if I can get a Wayland compositor up on my desktop this weekend so I can try it out myself, too. I know I've been dragging my feet on checking it out, especially since it's starting to become the default on some distros.

@apocalyptech
Copy link
Contributor

apocalyptech commented Jun 7, 2024

Okay, well, getting Wayland up and running was quite simple actually. So I was running into the same error that you were, but in my case it turned out that I simply hadn't told my compositor to start up xwayland. I'd tried weston at first, and enabling it for weston involved editing ~/.config/weston.ini. Once I'd done that (and restarted weston, just in case), OpenBLCMM launched just fine without needing any extra environment vars or the like:

wayland-screenshot-2024-06-07_10-25-15

So I'm wondering if Xwayland wasn't actually enabled properly on your compositor? Merely having it installed might not be enough.

@nfox18212
Copy link
Author

I'm pretty baffled at this point because as far as I can tell using xlsclients, I have xwayland configured and running for several applications at this point like Steam. I've also attempted to force the Kwin compositor to run OpenBLCMM in a rootful xserver with xwayland-run and it does more things but still crashes. Here's the output: https://bpa.st/E2TA. This time, it does spawn a window before crashing.

Additionally, after an extensive round of googling I cannot find any information for manually forcing an application to run with xwayland on Plasma 6. From what I can tell, Plasma runs the xwayland server for me whenever an application needs it. So why on earth is it not for openblcmm?

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

2 participants