-
Notifications
You must be signed in to change notification settings - Fork 93
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
Doesn't work properly under Wayland #159
Comments
Not related to #89, but could be duplicate of #115. However, I switched to Gnome on Xorg and it worked fine. Switched back to Gnome on Wayland and didn't work. I'm not using that system right now, but IIRC after login one of the services was running but the other one was not. Note: it has never failed when using Xorg, so there is at least something related to either Wayland itself or how things are started under it. |
Seems to be really duplicate of #115, except that I've not been able to get it running right after login even with logging in using Xorg before that. |
I think I know why this happens: AFAIK, in Fedora 25, when you log out, all your user processes are terminated including hamster services. |
More info: the login process is not important. If I disable this plugin, log in to the system, and then try enabling Hamster extension, it takes long and doesn't start with the same error. Apparently, there is a difference between how /usr/bin/hamster-service is activated and how /usr/bin/hamster-windows-service is activated; and the latter doesn't work under Wayland. |
I think it's already been said that this is a Fedora specific problem, but just to be clear .... The extension works fine in Wayland under Arch Linux. However, there are no fancy services (??) and I start the main hamster app via Startup Applications, in Gnome Tweak. |
Maybe this is why you don't see the problem (because running main hamster app will start both services). If you are using Gnome 3.22 under Wayland, I'd expect to be able to see the same problem. I highly doubt that this is a Fedora only problem. |
I am sorry if i do not contribute to this discussion. I personally lack experience with wayland and as this seems related to legacy hamsters services I can not help much with this. I do however wonder if this isn't a packaging issue, as the way services are handled is ultimately up to distributions maintainer isn't it? |
If you see anything which might show it can be a packaging bug, please let me know. But the package itself is working properly. The services are also started automatically when the application is started. The only problem is when the extension is started first. (There is even no problems if I start the services using the dbus-send commands which are given in comments in extension.js). |
I have some changes which partially address this, though they do not fix the problem entirely. They at least make the plugin not explode for the duration of your shell session after failing to get a proxy for the Hamster services on D-Bus. I haven’t had time to clean them up properly for submission (and won’t have time to do so, especially if contributing to Hamster requires signing a CLA), but they might inspire a proper fix from someone else: https://github.com/pwithnall/hamster-shell-extension/tree/gnome-3-22-fixes |
The following is being prompted on fedora 25 (Wayland):
Nevertheless, it is sometimes showed on topbar: |
FWIW, I've applied commit jasuarez@61286f0 And ensured hamster-windows-service is automatically run (details on commit message). |
Just to be sure, Does it solved the issue for you @jasuarez ? |
Yes, it works for me. Now I can use Hamster in my Wayland desktop |
But normally, the hamster-windows-service should be run automatically when requested by DBus. You should not need to manually add it to be auto-started. |
@hedayat yes, it should. And it does on Xorg, but for some reason not in Wayland (at least on my Fedora 26). So if it runs for you, just skip the step of launching it. |
No! I wanted to say that a proper fix should probably fix that too. I don't know why it doesn't work, but I think it should! |
@hedayat Oh, sorry. I agree. But it should start the daemon before the extension is run, which happens when the shell is started. |
Thanks @jasuarez, finally this extension works on my Fedora again! |
This is a general problem with all extensions which depend on DBus: benzea/gnome-shell-extension-redshift#19 It seems that it is related to how/when DBus is launched in a wayland session. |
Additionally, I think this bug is only seen in Fedora because probably others are NOT using the same method as Fedora to launch DBus user session. Fedora uses systemd user sessions to start user's dbus session. |
So, am I correct to assume that:
|
About the first point: it might be Fedora specific right now, but I guess it'll start to happen on others as they start to move to Wayland too. I'm not sure about the second. While it seems to related to dbus-service startup, there might be something that can be done in |
Debian Unstable switched to wayland a while ago too and I have never had this problem here. |
AFAICT, the Wayland problem was only ever that the Hamster background process wasn't being started the same way. I'm still using the extension every day, still using it with Arch, and still launching the daemon via Startup Applications. However, I do get Gnome Shell crashes that sometimes coincide with my using this extension. In Wayland those crashes are catastrophic, so I tend to use Xorg most of the time. |
Thanks @a-m-s . Do you have time to take the current dev branch for a spin and see if those crashes are still an issue? |
Is it compatible with the old, stable hamster daemon, or would I need to upgrade that to the development version too? |
It is targeted towards old hamster and does not support the new hamster-gtk yet. |
This fixes gnome-shell freezes under Wayland (at least in Fedora), as it seems that it stalls gnome-shells main loop. fixes projecthamster#159
As it is fixed, I still really doubt that it was Fedora specific. @a-m-s is actually manually starting services, so apparently he also had problems without them. And about @rhertzog, are you sure that you are on Wayland? e.g. on hybrid GPU systems gnome always falls back to Xorg, unlelss you force with with an environment variable. Anyway, the fix should work for everyone, and I've even seen that others also have done this too in other projects (e.g. webmastak/gnome-shell-extensions-mediaplayer@5417b8e) so this should be the correct way to do that. |
@hedayat Yes, I'm sure that I am on wayland. And I believe that I also use systemd user sessions. It's possible that I'm affected by the deadlock you are referring to but that I only rarely trigger it... but the dbus activation is working fine with systemd and I believe that was the main point of this ticket. For some persons the dbus user session was not yet available at the time of the startup of the extension. And this specific problem I have never seen. |
Thanks for your response.
It always happen for me, so if you are not affected, you probably will never see it. So, there is either something special in either of Debian or Fedora, or ... ? (Can't say anything about Arch, because he was manually starting hamster services using autostart feature of the desktop). Anyway, the fix seems to work for everyone, so it shouldn't matter if the issue was distro specific or not. |
This commit establishes *async* set up of the api and window proxy instances. In order to prevent blocking calls the actual ``enable``ing now happens in a new ``deferred_enable`` method that is called as a collback. Some extra provisions have been added to make sure that ``deferred_enable`` is executed only once even if 'called' multiple times. Ref.: projecthamster#159
I merged hedayat's patch and await your feedback :) |
@elbenfreund I tried the develpment version and Wayland. It appears to work the same in Wayland as in X: everything looks fine, but the list doesn't update right away when I add a new activity (although the activity shows in the overview fine), and the extension (apparently) crashed my session randomly. I'll be switching back to the stable version and X. I added the app to Startup Applications because I want the window to open when I log in. I've been doing that since before I had the extension. It's possible that I accidentally hid the problem for myself? |
@a-m-s So, things have not improved (under Wayland) for you, right?
To be honest, at this stage it is too long that I last dwelt into Note: |
I found the extension fully functional (meaning everything I tried worked), but I had the gnome session crash as I was adding a new activity via the extension. It could be a coincidence, but that seems unlikely. It was not the first time I had added an activity that session. I've also experienced shell crashes in X, but those are typically not fatal. Anyway, I believe that's probably bug #212, not any kind of Wayland related communication issue. |
I would like to streamline our remaing "crash related" issue a bit. As far as I can tell, #159 and #198 have been addressed to the extend that was/is specific to wayland/fedora. The extension should be handling missing services better and a bunch of unrelated issues brought up in those issues has been cleared to. In order to deal with the remaining crashes, I suggest moving the conversation to #212, with regards to the delay in visual updates on the panel: #205 Does this work for you? Are there any open questinons that are specific to this particular issue title? |
Yes, I agree. No, I think it this one is resolved. Thanks. |
👍 |
I've tried this extension under Wayland (Fedora 25), but it doesn't work on login. It reports a timeout error connecting to hamster DBus service (don't have the exact error message right now, can report later).
Surprisingly, sometimes it suddenly starts to work (probably after locking/unlocking the screen or some other events, but have not found the exact procedure to make it appear). But it doesn't work right after login anyway.
Update: error message:
Gio.IOErrorEnum: Error calling StartServiceByName for org.gnome.Hamster: Timeout was reached
And current running services:
% pgrep -af hamster
10067 python2 /usr/bin/hamster-service
hamster-windows-service seems to be unable to run automatically when using Wayland, but works fine under X.
The text was updated successfully, but these errors were encountered: