Can't run it on wayland #1
Labels
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Depends on
#2 Make it run on Wayland
PixelRidge-Softworks/glava-ridged
Reference: PixelRidge-Softworks/glava-ridged#1
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I know this is not supposed to work on wayland normally but I really want to use it on wayland (hyprland, specifically). There are some users who could run it on wayland.
For me this is the case:
If I run glava after compiling it, I get:
And if I set the following environment variables in my hyprland config:
Glava runs for a split second then it segfaults. I think it should be possible to set some environment variables and run it perfectly but I don't know what are they.
I can definitely take a look into making things work on Wayland.
Based on the error you're getting at runtime, it would appear that the issue is with some sort of missing environment variables. In order to figure this out, I'd need to get all the system variables on the system that's running it, and compare it to a working one.
At the moment, I am taking some time away from programming to spend time with my wife, but this should be a relatively simple fix, so I will hop on it and see if I can knock out some kind of solution today.
Please bare with me for a update!
I'm glad for your interest @VetheonGames , thanks!
I want to share some observations of mine in case it helps:
Few months ago, I was able to run glava on hyprland with a little inconvenience: I had to login to X11 session first. So my guess is some environment variables are set when I login to X11 session and they persist after I logout and login to hyprland.
Unfortunately, I switched to a new machine and I don't have any X11 session in this setup. I tried installing i3 (just to make glava work again) but somehow I couldn't login to i3. And then I gave up.
Then I found this repo and my hopes are up again :D Please let me know if I can help in any way. I would be more than happy to help fixing this.
Ok, @sahin I require some debugging to be done on your end to figure out what it is that is causing the issue.
My system doesn't behave with Wayland at all (like my desktop environment fails to load entirely), so I'm unable to do it myself.
Please attach the logs for XWayland for any time you run Glava on Wayland for each of the below steps:
sign into Wayland
recompile Glava with a fresh clone
follow the instructions here to build a standalone debug version (for a 100% fresh start, so we know it isn't some kind of external issue going on)
try to run Glava
then give me the results. Copied 1:1 from the terminal, including the command you ran. (you can use this pastebin if need be)
Next, run
printenv
and send the output to me. Be warned, this will print out all your system environment variables. So you might want to go through it before posting to ensure there's no sensitive data in there.log into a X11 session
try to run Glava again.
again, give me what the terminal outputs and what command you ran.
Next, run
printenv
once again, and send it to me (after sanitizing if needed), if Glava was able to start and run properly on X11 for you.log out of the X11 session
log back into the Wayland session
try to run Glava again using the same command you did the first time.
Let me know if it works the final time, and if it does, I should have all the information I need to resolve the issue.
Ah dang I just saw your comment there. That's unfortunate. Without the ability to debug on Wayland and X11 on the same machine, we are kinda stuck at an impasse.
Ok, so, there's one more hope to see if we can maybe figure out what's going on.
Give this command a run, and send me the file here:
Edit:
doing this will create a bunch of output, and write it a file. But you'll need to kill the application once it stops if it doesn't crash itself
Also I fixed the command to properly capture the stdout of Glava, since it's buffer for the terminal is never technically filled.
Oh! And if you could give me your XWayland logs just after the segfault, that'd be amazing
OK, here are the output of the same command one without any specific environment variables set and one with the env's I mentioned above:
Without any environment variables: (doesn't run at all) https://0x0.st/H021.txt
With 2 env variables I mentioned above: (runs for half a second then segfaults) https://0x0.st/H02j.txt
Actually, I compared both files with a diff tool but I couldn't find any important difference. Just that second one is a little bit longer as glava runs for a little bit.
where can i find the logs for Xwayland? I run
journalctl -b
and found this at the end:There were no entries related with Xwayland.
Looking at the logs above, I think it is a hopeless case. We need to have a working setup in order to find what is causing this problem. I will try installing an X11 environment once again. I hope this time I could login and provide more debug information.
OK, I installed i3 again and this time it worked (because I also installed Xorg myself. apparently, it wasn't automatically installed by i3 before)
After logging into i3, I tried running glava but it gave me the same segfault I posted above. I started thinking this problem might be related with my machine (I am on M2 Mac running Asahi Linux) I will try to find another machine and try the same thing. But it might take some time.
I wonder why wayland didn't run on your machine. Could the problem be similar to mine? (like i3 not working because Xorg wasn't present :D ?) If you can make wayland work on your machine, maybe we can fix this sooner.
Ironically, I actually had the same thought as you, and attempted installing and using Wayland again.
I actually managed to get it to work, and Glava worked with it flawlessly, no issues at all.
I've attached a video for proof.It does seem like there's some issue with my compositing maybe? Because it seems to not be properly capturing with OBS, Kazam, or Peek on Wayland, but that's probably a config issue, since this is just literally bare Wayland
That is good news. Does it run when you login to wayland session after a reboot? Or you have to login to X11 session first?
It just worked. Bare Wayland, right out the box. Didn't launch X11 first at all. Though it might be a DE thing... I'm using KDE-Plasma, what are you running?
I have a theory. If you have all the XOrg stuff installed, and you compile the binary from a session running in X11, will it work properly..?
I have two wayland environments: hyprland and kde-plasma and one X11 environment which is i3.
I will also try it with plasma but I don't think it would work because it won't even work on X11.
Oh, and I also applied this patch to my glava because it was giving me errors while compiling. So I disabled obs completely. I don't think it would make any difference.
let's see...
You don't need that patch to compile this. This should properly compile with or without OBS 😄
I would strongly suggest completely uninstalling/deleting anything to do with Glava (aside from your visualizers) and starting from scratch
Tried it with plasma and nothing changed: segfault.
Compiled from source inside X11 session, and again nothing changed: segfault.
There are 2 possibilities now:
To see if it is the second case, would you share the result of
printenv
here?Well, if I don't patch it:
And I also tried to disable obs with the flag but I don't know the syntax 🤦♂️
So I applied the patch to get rid of it :D
Are you following the compilation instructions here?
Also, what architecture does your processor run on?
If it's not x86_64 I don't know that we can make it work
Yes. Proof:
It is aarch64. As I said I run all this on M2 mac.
Is x86_64 strict requirement or this is just your guess? I am going to cry if it is because of my processor's architecture :(
In any case, I really want to thank you for helping me debugging this ❤️ At least now I know the problem is not specifically about wayland. There is this comment that you might have missed. You may or may not want to share that output. I will try this with another machine to see if the problem is really about my current machine (cpu architecture or some other thing)
You can close this if you want. It was really helpful for me. I will come again if it won't work on a x86_64 machine :D (you know, there is still a chance that some environment variable is set in your setup but not in mine. I am holding on to that possibility because I don't want to accept the fact that glava will never run on my machine because of its architecture or some other thing :D :D. )
As you can see, I really want to make this work so I hope you don't mind if I took too much time of yours. I was just a little bit excited to see some bars dancing with music on my desktop :D
Oh don't worry at all. This is my full time job making these softwares, so I really don't mind at all to help a user.
At any rate, the reason I wanted to see all your emv vars with
printenv
is because I'd be able to compare them to my working Wayland setup and see if anything is missing.OK, I tried this with a fresh wayland install on a x86_64 machine. It worked out of the box. I guess the problem is about my cpu architecture :( Thanks again for your time.
Edit: I can't close this issue because #2 is still open. So you might want to deal with the rest.