-
Notifications
You must be signed in to change notification settings - Fork 891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update hardware acceleration flag for Linux #6274
Update hardware acceleration flag for Linux #6274
Conversation
If you meant to implement |
@Revival8697 |
It turns out this flag must be used together with This improvement is too significant not to implement. One issue: FreeTube has to run as a native Wayland application for it to work. It doesn't. |
@Revival8697 You can try using |
i would consider it mature enough, i use brave in native wayland as my main browser. but if wayland auto switching isn't implemented, i won't implement ZeroCopy. the performance loss though... |
Difficult to pin down exactly why it isn't working, as you deleted the relevant section of the pull request template instead of filling it in. According to the Arch Linux wiki, auto-detection is known to be broken with Weston, if you are using flatpak you need to enable the wayland socket and there is also an open PR there to enhance the launch script. There is also a question if these flags should be in FreeTube by default at all, as they seem to be the cause of the video player crashes, because all of the Linux users that are experiencing it are able to stop it happening by passing an empty enable features flags which overwrites the defaults. The current issue that people have mentioned experiencing with FreeTube when using wayland is not being able to resize the window, which yes is an improvement over the app crashing when you maximise the window but it does still prove that it is still work in progress. |
You just pinned it down. FreeTube doesn't have access to the Wayland socket by default.
If you meant #4890, I think it is a driver issue, but seems like affected users are happy with just passing the flag.
I will check on related issues then. |
The flatpak not having access to to the wayland socket is intentional due to the problems with wayland and the fact that even Chromium themselves doesn't consider it ready which is why they still use X11 by default instead of auto-detecting wayland, please check the pull requests on the flatpak repo for the exact history. With the video player issues I was actually talking about #5975 where the GPU process terminates itself because of fatal errors while talking to the GPU driver, which go away when removing the VA-API flag (I guess that is why just like wayland support, Chromium still has it behind a flag). |
If we have to choose between a bunch of people not being able to watch videos at all by default and having to pass flags to make it possible or everyone being able to watch videos but that hardware acceleration is disabled by default and people that have a setup where it actually works can opt-in via flags, I would definitely chose the latter. |
That is true. I will look into the issue, but please remove this if it is deemed too buggy and breaks for too many users. I would love to have this implemented in the GUI as a drop-down menu with "Disabled" as an option, but I have no idea how to pass the value from I honestly don't understand why there are so many issue on certain hardware as it works fine OoTB on my hardware. And in testing, even if I force it to fail, it would just fallback to software rendering instead of breaking like that. |
As the flag has to be added before the app is ready, we couldn't do it like a normal setting as those are loaded asynchronously in-parallel whereas this setting would have to be loaded synchronously and blocking to prevent the app/electron getting ready while it is happening. What we could so is do it like the experimental disable HTTP cache setting, which creates/deletes an empty file in the user data directory and FreeTube checks if the file exists at start up. So as VA-API is so buggy I definitely think it qualifies as an experimental setting and should be disabled by default, then we could have a toggle in the experimental settings page to turn it on for people like you who mysteriously don't have the problems that everyone else has. Or we could just remove it and then people can manually pass the flag if they are lucky enough to have drivers that it actually works with. |
Update hardware acceleration flag for Linux
Pull Request Type
Description
Chromium changed the flag in v131.
Please merge this after updating Electron to v34, which is scheduled for release on January 14, 2025.