You are not logged in.

#1 2019-01-27 13:30:14

slarti
Member
Registered: 2019-01-24
Posts: 6

[SOLVED] Firefox scaling / performance issues on Wayland (Sway)

I'm just setting up my fresh Wayland based installation using Sway as WM. I have a WQHD display and use a scaling factor of 2 in my Sway config. Most of the applications I tried are working fine and the fonts are rendered crisp and clear.

However I really have issues running a browser without issues. My main browser is usually Firefox so I would like to get it to run in the first place. My first approach was just installing the firefox package using pacman. And the applications starts fine but with font rendering issues. The font is very blurry (I tried several ttf fonts) and sizes but it seems to be a general rendering problem. My first thought was that it has something to do with Wayland/X11 compability.

After some research I found the AUR package firefox-wayland and installed that instead. I took a very long time to compile (almost 1.5 hours) but it started after all and the font was crystal clear! However now the performace is really really bad! Scrolling is very slow and stuttery, mouseover effects of hyperlinks have a delay of 1-2 seconds and so on. Practically it's unuseable.

I tried setting several environtment variables I found during my research. This is what I have set right now:

export GDK_BACKEND=wayland
export CLUTTER_BACKEND=wayland
export SDL_VIDEODRIVER=wayland

After all I tried using chromium instead which does not start at all: "Gtk-Warning: cannot open display: :1". But I guess that's a different story..

I also tried the qutebrowser. Which is running but also with font rendering issues (blurry).

I would be very glad about some hints how to fix at least my Firefox issues. This is bugging me for hours now.

Last edited by slarti (2019-01-30 22:13:51)

Offline

#2 2019-01-27 23:52:28

circleface
Member
Registered: 2012-05-26
Posts: 635

Re: [SOLVED] Firefox scaling / performance issues on Wayland (Sway)

Which version of sway are you using?  The version in the repos is old and no longer supported.  Instead, you should install the betas from the AUR (sway-git, wlroots-git).  For what it's worth, I'm running the beta version and the regular firefox works fine for me.

Offline

#3 2019-01-28 09:00:28

slarti
Member
Registered: 2019-01-24
Posts: 6

Re: [SOLVED] Firefox scaling / performance issues on Wayland (Sway)

Hi circleface,

I forgot to mention it but I'm using sway-git and wlroots-git. Do you have some Wayland specific environment variables set? And do you use HiDPI scaling? Maybe I then should give the regular Firefox another shot and experiment with the settings.

Offline

#4 2019-01-29 00:06:24

circleface
Member
Registered: 2012-05-26
Posts: 635

Re: [SOLVED] Firefox scaling / performance issues on Wayland (Sway)

I have no Wayland environment variables set.  I do use a HiDPI monitor, but I do not use scaling, so that could easily be the difference.  All I did was set the zoom in firefox to 133% and everything is readable for me.  Even though the buttons and whatnot are very small, the text is nice and clear on my monitor, and firefox actually works better under sway than it does under X.  I'd say to try the regular firefox without the environment variables and see if you can just adjust the text zoom to get something working.  Unfortunately even though Sway allows you to set a scaling factor, I have seen some issues on their bugtracker saying that the scaling doesn't always work properly with all programs.

Offline

#5 2019-01-30 22:13:10

slarti
Member
Registered: 2019-01-24
Posts: 6

Re: [SOLVED] Firefox scaling / performance issues on Wayland (Sway)

Thanks for your suggestions. I now removed the firefox-wayland package and reinstalled firefox. And actually now firefox 65 is available which runs (so far) perfectly on sway even with scaling applied!

Offline

#6 2019-02-02 09:56:09

Troels
Member
From: Denmark
Registered: 2009-03-01
Posts: 13

Re: [SOLVED] Firefox scaling / performance issues on Wayland (Sway)

The issues you experienced is  because when you run Firefox via Xwayland scaling is broken and everything becomes blurry. The firefox-wayland package does indeed run Wayland but included some rather serious performance degradations. 

It's cool to hear that Firefox 65 works alright for you, but may I suggest you update to firefox-nightly on the AUR? It has more bugfixes for Wayland, and though it supposedly is unstable, I'd say it runs better than the 'stable', version (65).

Offline

#7 2019-02-08 17:04:10

slarti
Member
Registered: 2019-01-24
Posts: 6

Re: [SOLVED] Firefox scaling / performance issues on Wayland (Sway)

Thanks for your advice. FF 65 runs quite good so far but from time to time there are some rendering issues when scrolling. I'll definitely try firefox-nightly out.

Offline

Board footer

Powered by FluxBB