You are not logged in.

#1 2022-04-13 18:17:42

Yoppez
Member
Registered: 2021-09-10
Posts: 11

[SOLVED] Firefox slow first startup on Wayland

I tried to switch from Xorg to Wayland, and aside from some minor visual glitches that i managed to resolve, it seems to work well overall.

The problem is, when I reboot the machine and open Firefox for the first time during the session it takes about 25 - 30 second to open, which is kind of a nuisance, but if I close and re-run it it opens almost immediately.
When I switch back to Xorg, Firefox opens immediately even first time.

I already followed some suggestions from the Arch Wiki, including checking the configuration in /etc/host, open it in safe mode and refreshing it, but the problem remains.

Changing the environment variable to enable the Wayland mode doesn't solve either.


I use KDE Plasma as DE and proprietary NVIDIA drivers.

Last edited by Yoppez (2022-04-13 19:34:30)

Offline

#2 2022-04-13 18:31:52

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [SOLVED] Firefox slow first startup on Wayland

Yoppez wrote:

Changing the environment variable to enable the Wayland mode doesn't solve either.

How exactly did you do this?  And did you check the "Window protocol" listed in about:support before and after the change in the variable to confirm that firefox changed the protocol?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2022-04-13 18:36:08

Yoppez
Member
Registered: 2021-09-10
Posts: 11

Re: [SOLVED] Firefox slow first startup on Wayland

How exactly did you do this?

In the zprofile I export MOZ_ENABLE_WAYLAND=1

And did you check the "Window protocol" listed in about:support before and after the change in the variable to confirm that firefox changed the protocol?

Yes, when I change the variable and reboot, it says wayland instead of xwayland.

Offline

#4 2022-04-13 18:37:25

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: [SOLVED] Firefox slow first startup on Wayland

it takes about 25 - 30 second to open

Ie. the dbus tiemout - that's probably no conincident. Run FF from an interactive shell and dbus-monitor in another one - should get you an idea which service times out (I'll just bet it's either pulseaudio or portal…)

Offline

#5 2022-04-13 18:55:30

Yoppez
Member
Registered: 2021-09-10
Posts: 11

Re: [SOLVED] Firefox slow first startup on Wayland

@seth
Done, I don't understand very well how dbus-monitor works, but it doesn't seem that there is anything odd (like timeouts).

Here it is what dbus-monitor printed before and after opening Firefox:
https://pastebin.com/ZtbmS6qQ

Offline

#6 2022-04-13 19:09:02

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: [SOLVED] Firefox slow first startup on Wayland

signal time=1649875612.204344 sender=org.freedesktop.DBus -> destination=:1.69 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.69"
method call time=1649875612.206574 sender=:1.69 -> destination=org.mozilla.firefox.ZGVmYXVsdC1yZWxlYXNl serial=2 path=/org/mozilla/firefox/Remote; interface=org.mozilla.firefox; member=OpenURL
   array of bytes [
      01 00 00 00 15 00 00 00 2f 68 6f 6d 65 2f 79 6f 70 70 65 7a 00 2f 75 73
      72 2f 6c 69 62 2f 66 69 72 65 66 6f 78 2f 66 69 72 65 66 6f 78 00
   ]
error time=1649875612.206605 sender=org.freedesktop.DBus -> destination=:1.69 error_name=org.freedesktop.DBus.Error.ServiceUnknown reply_serial=2
   string "The name org.mozilla.firefox.ZGVmYXVsdC1yZWxlYXNl was not provided by any .service files"
method call time=1649875612.379792 sender=:1.68 -> destination=org.freedesktop.DBus serial=14 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal',sender='org.freedesktop.portal.Desktop',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path='/org/freedesktop/portal/desktop',arg0='org.freedesktop.portal.Settings'"
method return time=1649875612.379816 sender=org.freedesktop.DBus -> destination=:1.68 serial=14 reply_serial=14
method call time=1649875612.379818 sender=:1.68 -> destination=org.freedesktop.DBus serial=15 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal',sender='org.freedesktop.portal.Desktop',interface='org.freedesktop.portal.Settings',path='/org/freedesktop/portal/desktop'"
method return time=1649875612.379820 sender=org.freedesktop.DBus -> destination=:1.68 serial=15 reply_serial=15

Then portal does it's thing.
Plot thickens.
Remove flatpak/xdg-portal* and see whether the problem remains.

Offline

#7 2022-04-13 19:31:49

Yoppez
Member
Registered: 2021-09-10
Posts: 11

Re: [SOLVED] Firefox slow first startup on Wayland

@seth
I did some tests and I found the culprit, and it is xdg-desktop-portal-gnome indeed, which it is an optional dependence and pretty useless for me so I just removed it.

Thanks a lot!

Offline

#8 2023-07-10 05:23:15

MikeZ
Member
Registered: 2017-10-28
Posts: 2

Re: [SOLVED] Firefox slow first startup on Wayland

Yoppez wrote:

@seth
I did some tests and I found the culprit, and it is xdg-desktop-portal-gnome indeed, which it is an optional dependence and pretty useless for me so I just removed it.

Thanks a lot!

resolved!

Offline

Board footer

Powered by FluxBB