Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've been using swaywm on my laptop (XPS 13) with XWayland disabled for a few months now and have had very few problems with it. As far as I can tell Firefox works perfectly, except for some very strange behavior if I try to enable hardware acceleration.

I love how easy it is to configure via config files, external monitors work great, scaling on HiDPI displays has been totally painless. My days off fiddling with xorg config and xrandr are behind me.

I know the creator of sway hangs out here, so if you're reading this, thank you!



Without hardware acceleration doesn't watching video in the browser pretty much destroy your battery life and use most of your cpu time?


So I'm no expert but I believe there are actually two different notions of hardware acceleration at play here:

1) HW accelerated rendering in Firefox, which despite being unfortunately disabled by default on linux can in my experience be enabled (on about:config) without issues. This makes the experience of scrolling much smoother, so I usually do that. I don't think this has any observable effect on battery life for me. However, enabling this in Sway results in some very odd behavior that breaks certain things so I've had to disable it. I can go into more detail on that if you like.

2) Hardware accelerated video decoding. In contrast to the fist one, this makes a HUGE difference in CPU usage and battery life. However this unfortunately cannot be used in any browser AT ALL in Linux, regardless of setup or configuration. The way I watch youtube videos on my laptop is usually with mpv, which does use hw decoding if it is configured to do so.


I've used chromium-vaapi on Linux with some success. I don't think those patches have been accepted in upstream chromium though.


I may give that a shot, although I think chromium still requires XWayland, right?


> enabling this in Sway results in some very odd behavior that breaks certain things

I've been using Firefox Nightly in Wayfire (also wlroots based) with GL (and even WebRender) for quite a long time now, it works very well, about the only issue left is popover placement is odd occasionally. What issues do you have?


With hw rendering enabled, opening a single Firefox window and browsing works fine. However when I try to open a new window the browser and desktop immediately become incredibly laggy and eventually unresponsive. I think I was able to successfully open a different tty and kill Firefox, which then fixed the issue, but it repro'd every time. Open one Firefox window, everythings fine. Open two, things slow to a crawl.

I'm surprised you were able to get WebRender working as well, I think I recall Firefox instantly crashing when I tried that. This was a few weeks ago.


If I disable HW acceleration on the desktop it's horrible perf wise, like VSCode and all the electron app are slow, there is aliasing all over the place when moving windows, slowness ect ...

( Ubuntu 18.04 / Unity on a Dell XPS 13 from 2016 )


Note that on X11 hardware acceleration isn't enabled by default in Firefox.


That is encouraging. What distro are your swaywm and Firefox running on?


I'm running Arch, which I find to be the most frictionless when you're trying to do sort of "bleeding edge" stuff like this.


It is time for me to give desktop Linux another try (which will be my first serious try in 10 years).


Yes definitely! Things have come a long way in 10 years, in my opinion. If you are looking for something more "set up and forget about it" though I would definitely recommend Ubuntu over Arch. I use Arch because I (usually) enjoy tinkering and customizing and setting things up exactly how I want.

Edit for a little more detail: I used Ubuntu for a long time on my desktop and actually did quite a bit of gaming on it. Mostly stuck to games that have native Linux support but from what I hear the compatibility layer that Valve has released is actually really good. If gaming is your thing.

All this is to say, things that were once supposed to be impossible on Linux are now very much possible.


If I understand one of the comments here correctly, I would still need XWayland for vscode, which relies on Electron and consequently Chromium; is that not true?


I ran Arch for a few years before leaving Linux 10 years ago.


You'll feel right at home then.


Don't.... You will waste a big chunk of time on playing windows games on linux....




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: