Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hwaccel on firefox still relevant?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2561

PostPosted: Fri Jan 03, 2025 12:33 pm    Post subject: hwaccel on firefox still relevant? Reply with quote

Today I finally ditched firefox:rapid in favor of the version from the binhost. However it prompted me I had to disable hwaccel use flag to make it compatible with the binhost. I opened the ebuild and saw that the only thing that hwaccel pulls in are two packages libva-utils and pciutils none of which seems to be a library, which I conclude means firefox does not link against anything in addition to what it already links to. The rest related to hwaccel are settings, which I think one can set manually if they want. Also the referenced Mozilla bug 594876 is closed in favor of webrenderer.

So, does hwaccel make any difference aside from the settings it imports into the browser? If not, does it make sense to file a bug prompting developers dropping that flag might actually be a good idea?

EDIT: Maybe I should clarify that I'm considering this from the perspective of binary packages. Hwaccel adds those as runtime dependencies, yet a binary package will refuse to install if it is enabled. Also it only imports settings so I guess it doesn't matter if this use flag matches the binary package's one.

Best Regards,
Georgi


Last edited by logrusx on Fri Jan 03, 2025 6:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3935

PostPosted: Fri Jan 03, 2025 5:37 pm    Post subject: Reply with quote

Yes but libva-utils pulls libva if it is not already pulled by USE="vaapi".
And hardwareaccel seems to work fine in firefox.
_________________
:)
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2561

PostPosted: Fri Jan 03, 2025 6:09 pm    Post subject: Reply with quote

alamahant wrote:
Yes but libva-utils pulls libva if it is not already pulled by USE="vaapi".


All dependencies should be listed in an ebuild, regardless of something else pulling them in. Maybe only the things in @system do not need to be listed.

alamahant wrote:
And hardwareaccel seems to work fine in firefox.


How do you know? But most importantly, what do you mean by that? How does it relate to my question?

Best Regards,
Georgi
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1820
Location: Germany

PostPosted: Fri Jan 03, 2025 7:57 pm    Post subject: Reply with quote

well you can try it with a youtube 4k-8k video and compare the CPU usage while playing.

And If I read https://wiki.gentoo.org/wiki/Firefox#Hardware_acceleration correctly the useflag trigges the need of vaapi but can be disabled. If those helpers are installed it should work, too.
hmm...
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2561

PostPosted: Fri Jan 03, 2025 8:13 pm    Post subject: Reply with quote

Whether it works or not is not relevant to the question.
Back to top
View user's profile Send private message
Juippisi
Developer
Developer


Joined: 30 Sep 2005
Posts: 758
Location: /home

PostPosted: Sat Jan 04, 2025 7:11 am    Post subject: Reply with quote

Yes, the use flag will install vaapitest/v4l2test binaries which firefox uses to self-test hardware acceleration and provide debug help in case it doesn't work. These were originally installed unconditionally, but some people without (working) hardware acceleration had problems launching firefox due to that. Although I don't remember the specifics, it could be they had something else weird going on, but the problem was immediately fixed by rm'ing the vaapitest binary.

1: IIRC the binhost builds multiple variants of firefox, so you could request +hwaccel to be one of them. Luckily firefox isn't that heavy, even with +pgo so I believe the request is fair. Although don't do this yet, read further...
2: I'd be curious to know if hwaccel works without the binary? Are you certain it's working simply by changing settings and emerging the missing deps?
3: maybe you can try to grab the vaapitest binary from firefox-bin and drop it as /usr/lib64/firefox/vaapitest :)
4: 134.0 is out next week, maybe vaapitest binary can be installed unconditionally again and we investigate a bit better with people having problems with that. Since firefox-bin shouldn't then work either, although that's also not unheard of when/if using older hardware.

hwaccel in firefox is a bit unfair as a use flag, especially if the binary can be solved. As suggested by sam, we should implement a package called "firefox-gentoo-configuration" that does all about:config changes so none of those need to be in the main firefox ebuild. Then that config package can have 'hwaccel' use flag.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2561

PostPosted: Sat Jan 04, 2025 4:43 pm    Post subject: Reply with quote

Juippisi wrote:
Yes, the use flag will install vaapitest/v4l2test binaries


I don't see this anywhere in the ebuild.

Juippisi wrote:

1: IIRC the binhost builds multiple variants of firefox, so you could request +hwaccel to be one of them.


Actually I was talking influenced by the assumption that since it looks like hwaccel only affects runtime, it shouldn't matter for portage and install the binary package either way, but now I've realized portage can't know which flag only affects runtime. This might be material for further development, but it might be too much to want that from the developers.

Juippisi wrote:
2: I'd be curious to know if hwaccel works without the binary? Are you certain it's working simply by changing settings and emerging the missing deps?


Can you figure that out from https://bpa.st/5MZA? I'm not that familiar with diagnostic output of Firefox, I was a Chromium user almost since the beginning. Settings should be those from when I had 133.

Juippisi wrote:
3: maybe you can try to grab the vaapitest binary from firefox-bin and drop it as /usr/lib64/firefox/vaapitest :)


I will test that for you, but maybe tomorrow when I'm rested and able to comprehend what you're asking for.

Juippisi wrote:
4: 134.0 is out next week, maybe vaapitest binary can be installed unconditionally again and we investigate a bit better with people having problems with that. Since firefox-bin shouldn't then work either, although that's also not unheard of when/if using older hardware.


My idea was to move to :esr and not bother with building it, but if you need some tests, I'll do them.

Juippisi wrote:
hwaccel in firefox is a bit unfair as a use flag, especially if the binary can be solved. As suggested by sam, we should implement a package called "firefox-gentoo-configuration" that does all about:config changes so none of those need to be in the main firefox ebuild. Then that config package can have 'hwaccel' use flag.


Although good, that sounds a little workaroundy for me. I may propose extension of the API to allow some flags to be independent of the binary package. However I don't know how to do it properly and what effort it may cost.

Best Regards,
Georgi
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2561

PostPosted: Sun Jan 05, 2025 4:58 pm    Post subject: Reply with quote

Juippisi wrote:

3: maybe you can try to grab the vaapitest binary from firefox-bin and drop it as /usr/lib64/firefox/vaapitest :)


It turns out I already have it there. It's dated Dec 16th, so I don't think it came with the binary package. How should I verify if video acceleration is present?

EDIT:

Actually it did come with the binary package:

Code:
$ equery b /usr/lib64/firefox/vaapitest
 * Searching for /usr/lib64/firefox/vaapitest ...
www-client/firefox-128.5.0 (/usr/lib64/firefox/vaapitest)


p.s. I'm experiencing video stutter in YT ever since I upgraded to Gnome 46, both with FF 133 and 128.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum