-
-
Notifications
You must be signed in to change notification settings - Fork 707
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
Xwayland apps on wayland #5101
Comments
@tych0 I think this is caused by removing the double fork. I get the following error |
Ah man, that is... unfortunate. I don't think it's double fork, but our SIGCHLD handler, based on: https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/871646d22522141c45db2c0bfa1528d595bb69df the wlroots library wants to fork (which seems slightly impolite) an X server. When its waitpid() races with our SIGCHLD handler, it fails. I think if wlroots really wants to do this, they should mask off the SIGCHLD handler while they're doing their own thing. Probably we should send them a patch, but in the meantime, we can manage it ourselves. Does: tych0@dbe76e9 work? If not, we'll have to do something like what the patch you linked did (or maybe pywlroots should, like I mention flacjacket/pywlroots#207 ?). But really wlroots proper should do that. I don't have enough wayland-fu to be building my own wayland stuff to test patches, though. |
Your patch works for me. Would be good to get @jwijenbergh thoughts here too as he's more familiar with the wlroots stuff. |
the wayland backend via wlroots wants to double fork an X server for XWayland, and expects to waitpid() on the middle fork to make sure things were successful. our SIGCHLD handler races with this process and interferes, causing things like: waitpid for Xwayland fork failed: No child processes let's delay installing our SIGCHLD handler until after XWayland is initialized to hopefully dodge this error. Fixes qtile#5101 Signed-off-by: Tycho Andersen <tycho@tycho.pizza>
Ok, thanks for confirming. Happy to wait for @jwijenbergh's review, although I am reasonably confident that's the right fix given the implementations you linked to. I will have a think about how wlroots can really handle this. it feels like double |
the wayland backend via wlroots wants to double fork an X server for XWayland, and expects to waitpid() on the middle fork to make sure things were successful. our SIGCHLD handler races with this process and interferes, causing things like: waitpid for Xwayland fork failed: No child processes let's delay installing our SIGCHLD handler until after XWayland is initialized to hopefully dodge this error. Fixes qtile#5101 Signed-off-by: Tycho Andersen <tycho@tycho.pizza>
It turns out they already do some pipe-notify thing for xwayland, and so this waitpid() is just about zombie prevention, so I think we can safely ignore it. I sent them a patch: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4926 If they merge it, then once we move to that wlroots version, we can revert my fix. |
I've merged your fix for now as it solves a real issue for some users. We can revert and implement a different fix if necessary later. |
Hi, I started having this problem when I updated to the latest dev. Do you know how to go back to a previous version? Thanks |
Can you say exactly which commit you're on ( |
Of course |
I don't know if it's relevant, but if I run an Xwayland Window and then run steam inside it, it works. |
I dont really understand how that works but steam isnt native to wayland so it runs xwayland |
I'm confused. I thought the issue was fixed? |
Maybe it's a problem with my system so I don't want to bother you, I use debian sid. Have you been able to reproduce it again? |
I am on nixos, and after the patch didnt encounter any problems, this is my version
if it still occurs than its something devs have to dig in |
I believe the patch fixes the issue, so it's likely yours is something different. I don't use wayland myself, so I was never able to reproduce it. |
I have 2 erros in my log file
|
In hyprland work this is qtile
|
This one should be fixed in the current git master. You're saying you get it still? Can you confirm which qtile version you're on? |
Assuming it's the one you posted here: #5101 (comment) I wouldn't expect you to see it. Can you add some logging around the areas in e73ea6e to see what exactly happens when if so? I wonder if we are racing and installing the signal handler still before xwayland starts up somehow. |
I'm still have it |
Is it for me? Or maybe you forgot to tag someone? I don't understand how to do it. |
Yes, I'd like to fix this if you are still experiencing the problem, but I don't run wayland and therefore can't reproduce, so I need some information to debug it. In particular, I'd like to know the order of:
|
Sorry, I have no idea how to do what you're asking, I'm just an end user. If you could be more specific I would appreciate it. |
You can just edit the file and install it as you would a normal development version of qtile. |
Which file do I have to edit? In commit e73ea6e there are 3 files: core.py, manage.py and utils.py |
Ideally all three, I'd like to know when the events from each happen. |
SIGCHLD here isn't fatal: we have other means of notifying that things were successful or failure, and it causes many compositors to have to do a bunch of extra work: qtile/qtile#5101 flacjacket/pywlroots#207 (comment) djpohly/dwl#212 Signed-off-by: Tycho Andersen <tycho@tycho.pizza>
I put what you told me but in qtile.log no error appears, only this |
I suspect the qtile you are installing and the qtile you are actually running are different versions. I would double check that you're running the custom installed qtile instead of one from distro packaging or whatever else. |
I discovered something that happens to me in Qtile. I use Waypaper as wallpaper manager, for some reason when I start Qtile, the wallpaper doesn't appear. |
I was looking and it's like when there is no wallpaper, Xwayland can't start, since I put a wallpaper with the Qtile manager and an Xwayland process was formed and when I closed that process it gave the child process error, and it only works again if I start Xwayland manually. |
I am not really a wayland person, but it could be that someone else is starting xwayland in that case, so wlroots doesn't have to? Not sure. Either way, I really do think the patch I have landed fixes the bug, so I would try to confirm which version of qtile you are actually running, since I believe the bug is fixed. |
Yesterday I updated from the Git repository using git pull, the version I have is |
Can you confirm that the version that you get from your shell is the same as the version that your xsession starts? |
If you mean that Xsession and Wayland-session are the same version, I confirm |
Ok. Can you add the log messages so we can figure out what order things are happening in that causes the issue? |
|
I'm actually still hitting this bug too but it's intermittent. |
Hm, made the change to wayland? |
If it is intermittent, in my case more than less xD |
Tbh I haven't faced that issue in a while, got to check latest commits |
It seems that some apps trigger a crash and others don't. |
Yeah I can reproduce this, sometimes NO xwayland apps start. The only way to fix it is to restart qtile |
I myself haven't faced this issue in a while, weird |
I'm encountering this issue as well. It's a regression in 0.30.0 and is what is keeping NixOS/nixpkgs#371737 from being merged. What I see happening as a user is the following:
When I start an Xorg application within 10 seconds after login, it uses the initial Xwayland process and it all works fine. Except when I quit it, then the Xwayland process quits after 10 seconds and I'm back to not having a working Xwayland. Simply reverting #5102 doesn't solve the issue, so I'm not sure where else to search. |
@tych0 I was scrolling through qtile wayland core code, and found this comment: qtile/libqtile/backend/wayland/core.py Line 375 in d57ddbe
then I checked your free desktop merge request to wlroots, which has been merged 1 month ago: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4926 so I think reverting the code might fix everything related to this topic, mind checking? |
we would first have to move to a new wlroots |
Only thing I can say is release 0.30.0 is buggy on wayland and we need new release that fixes this |
wlroots .018 does not allow compiling pywlroots flacjacket/pywlroots#228 |
and Flacjacket doesn't seem to be very active lately |
Issue description
First I discovered this issue when turning on Steam, later discovered that none Xwayland app works, even after running in terminal I get no output about error. This is all I got:
Version
0.29.0+1dacffb.flake
Backend
Wayland (experimental)
Config
Logs
qtile.log
Required
The text was updated successfully, but these errors were encountered: