0

As pointed out in a comment to the question this was about gfx.xrender.enabled. The answer can be found in the marked dupe, but it is easy to miss in all the noise talking about ssh and the X11 protocol.

Direct link to answer: https://unix.stackexchange.com/a/557920/66307

My problem started happening about a month ago. I'm currently on Firefox 89.0.1.

Up until this point, Firefox ran just fine over ssh -X. I'm running it from an Ubuntu machine (server) to an Ubuntu VM (client) and a different Ubuntu machine (server) to Windows 10 (client), both showing the same symptoms. It's not my hardware setup or -X as all machines are wired to a local gigabit switch and other applications (including Thunderbird) run just fine. They are a little slower than if I was running them on their own desktop, but perfectly usable.

After it happened, Firefox is just .... slow. I'm using it with --no-remote and the actual window for Firefox appears in under a second. It then hangs there for about 2 minutes until the tabs become usable. The output in my ssh shell reads:

$ firefox --no-remote &
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

(firefox:757486): GLib-GIO-CRITICAL **: 10:39:54.241: g_dbus_proxy_new: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(firefox:757486): GLib-GIO-CRITICAL **: 10:39:54.241: g_dbus_proxy_new: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(firefox:757486): GLib-GIO-CRITICAL **: 10:39:54.241: g_dbus_proxy_new: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
[GFX1-]: Failed GL context creation for WebRender: 0
[GFX1-]: FEATURE_FAILURE_WEBRENDER_INITIALIZE_UNSPECIFIED
[GFX1-]: Failed to connect WebRenderBridgeChild.
[GFX1-]: Fallback WR to SW-WR
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

but that doesn't look too different to what I had before.

Can anyone please suggest anything that might speed it up? I'm not really looking for answers telling me that ssh -X is slow (it is, but it's acceptable to me on all other applications) or things to do with compression or cypher suites. My link is fine, except for Firefox.

3
  • 2
    Have you tried to turn of all proton in about:config ? Doubt it will have anything to say. But setting gfx.xrender.enabled to true might. Restart between changes.
    – ibuprofen
    Jun 24, 2021 at 14:28
  • @ibuprofen yes, that did it. Thank you so much. I wish I could give you the green tick and upvote for this.
    – Skrrp
    Jun 24, 2021 at 14:31
  • Good :D, It deserves a good answer on the topic. I'm not one who can give one as the whole rendering block in FF is not the area where I have dug my energy into as of late.
    – ibuprofen
    Jun 24, 2021 at 18:46

1 Answer 1

0

It's not my hardware setup or -X as all machines are wired to a local gigabit switch and other applications (including Thunderbird) run just fine.

It really is the fact that X over network of course doesn't support things like applications directly drawing into memory buffers from the GPU driver on the server machine.

However, such acceleration methods are how you achieve an even acceptable frame rate for things like scrolling web sites or showing videos. Therefore, browser rely heavily on this. Everything else would be kind of 1990s! In the nineties, a browser playing video on X11 was impossible.

Gigabit Ethernet is not that thick (a HDMI connection does dozens of Gbit/s), and you're mostly limited by round-trip time, because every "draw this" command has to return data; X11 isn't asynchronous.

So, all in all, X over SSH: never was great, won't be sufficient for browsing, predictably. It's thoroughly possible having gigantic drawing latency wasn't something that the firefox developers could support well without making something else incredibly slow.

Solution: Don't use X over SSH! Thin clients typically render into a framebuffer on the remote machine, and you only get a (well-compressible) image of that sent to your local (displaying) machine. That's what behind things like VNC or NX. (NX is a fine technology, you should try it.)

To be honest, running firefox remotely makes little sense: you can run it locally, just the same, and just pipe the network traffic through SSH. You can share your firefox profile as files using rsync or even sshfs (be careful to not compete for access from multiple machines).

2
  • I get what you're saying and admit that my applications over -X are slower than native, but my complaint is that Firefox has suddenly and drastically changed in the last month. I need the different browsers as I already have Windows FF running locally and I have my work FF running from my work laptop.
    – Skrrp
    Jun 24, 2021 at 10:06
  • yes, might just have been a design choice lately made that "kicked" your use case, because the things necessary to support it acceptably might hurt performance on the majority of other use cases. Jun 24, 2021 at 10:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .