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
Enabling HW video acceleration under wayland #6
Comments
I must have been wrong and have to assume now that HW video acceleration never worked here because of Wayland, which means it's working in a GNOME X11 Session, but not ina GNOME Wayland session. :-( |
I have just posted some findings of my experiments from today in the Arch Linux Forum if you may want to take a closer look. |
Damned, this is driving me crazy! So Chromium doesn't render poorly after all, it's GNOME on Wayland with fractional scaling since I'm using a 4k screen and scaling set to 150% which pretty much breaks rendering of apps like Chromium that are running on Xwayland in such a setup. What I would need is an ungoogled-chromium with VAAPI and Wayland support, so an ungoogled-chromium-ozone with VAAPI patch. Right now this is not really working for me:
No idea what to do now. :( |
Sorry for the late reply, my mail server broke with the python 3.8 update, now. |
Thanks for your feedback, @jstkdng I am now working on GNOME in Xorg session with the combined gsettings + xrandr scaling (as per HiDPI Wiki Page) and that one seems to be generally working, so I can stick with ungoogled-chromium and VAAPI support as is. If only I had the time and knowledge to create an AUR package for Mutter with the [‘x11-randr-fractional-scaling’] patch that Ubuntu is using (I'm not done fighting with my setup yet). |
hmm, if it just one patch then it should simple to create an aur package, but taking into account that ubuntu and arch have different release schedules, it could break any time. |
I'm not qualified to create an AUR package (yet), but there is indeed a solution coming from a Manjaro user: I have just compiled and tried it, and although I could not see any errors and the fractional scaling showed up in GNOME Settings after enabling it, it didn't work as expected (the scaling of the interface seemed to work, but not the window scaling). Either I did something wrong or something is missing. But I'm really just stumbling around here, I'm clearly lacking the knowledge for this kind of manipulation. |
you have a really weird and complex setup m8. |
@jstkdng thanks a lot, any help from someone more seasoned than I am is highly appreciated. I don't really think I have a weird and complicated setup. It's rather really simple: The laptop has a 1920x1080 screen and I'm using a 4k monitor on my desk. The two screens are usually is only used alternately, so either on the move with the laptop screeen, or at my desk the 4k monitor with the laptop lid closed. The only real issue is HiDPI scaling, because 100% is way too small and 200% way too big. With fractional scaling it gets tricky, on Wayland it generally works but not for apps like ungoogled-chromium that run on Xwayland. In Xorg it would generally work by combining scaling by gsettings and xrandr as per Arch Linux Wiki, but that setup is cumbersome to use (doesn't even survive a suspend/resume cycle without having to reapply the xrandr scaling). The mutter-x11-scaling patch may be the proper solution for fractional scaling on Xorg, but I could not get it to work properly on my setup. OK, that sounds more complicated than it is. At least the usage case is simple to explain. All I want it so be able to use ungoogled-chromium either on Wayland or in the Xorg session with VAAPI and proper rendering with fractional scaling. Currently there are two more things to try:
The desired solution: ungoogled-chromium-ozone with VAAPI & proper fractional scaling on Wayland ;-) |
I'll compile ozone with vaapi and no vaapi support. Up to you to test it though, since I don't use wayland. Once it's done I'll let you know. You can check out the build here: https://build.opensuse.org/package/show/home:justkidding/ungoogled-chromium |
update comment, tried compiling with vaapi but it fails with a linking error: |
Update comment 2: |
I have just taken a look at your repo at openSUSE (Looks interesting, is that easy to use? Do use it just for building or for version control as well, so as a replacement for your GitHub repo?), I'll give it a try when I get home. Something that I was wondering about: The PKGBUILD shows Your ungoogled-chromium-ozone openSUSE repo says "succeeded" but no package was made ? Clicking on Download package gives "No data", but clicking on Arch in Repositories shows |
The obs is like a build server, and it was somewhat complex as I had to learn how it works and stuff. |
Well, on the build from your openSUSE repo (v78.0.3904.108) VAAPI still doesn't work. I have tested the following scenarios: Chromium on GNOME in Xorg Session with
Chromium on GNOME in Xorg Session with
BTW Any idea what's with that Fontconfig error? |
have you tested on chrome://media-internals that there is no hw accel? |
I'm using Chromium in GNOME on Wayland with intel-media-driver (= iHD) = no HW video acceleration and the following output:
Chromium in GNOME on Wayland with libva-intel-driver (= i965) = no HW video acceleration and the following output:
The tests were done with the COSTA RICA IN 4K 60fps HDR (ULTRA HD) on YouTube, media-internals showed For another video it was showing |
Damned, another line of tests with the following results: Chromium on GNOME in Xorg Session with
Chromium on GNOME in Xorg Session with
BTW Video doesn't run currently with |
ok, dav1d has no hwaccel, so now wonder it doesnt show up on intel_gpu_top. |
All these tests have been done with your ungoogled-chromium build. That one isn't compiled with the ozone flag. :-? You didn't comment on my previous statement:
I have just taken another look, and your ungoogled-chromium-ozone openSUSE repo is now showing the package ungoogled-chromium-ozone-78.0.3904.108-1-x86_64.pkg.tar.xz. I have to abort now, I'm going to test that one tomorrow. BTW I have updated the previous comments a few times because I was writing here from the same Chromium instance that I always killed from the console between each test. ;-) |
yes, it has ozone support, but I think it uses another platform by default, so maybe all your wayland tests were actually using the x11 platform, and not the wayland platform.
weird, I don't have that message. Probably just a temporary thing.
That one is the same, just with another name and the optional dependencies changed |
@jstkdng I just checked again, your openSUSE repo for
Since I have used your Next I will download your |
Unfortunately my tests of your GNOME on Wayland - YouTube video
The option This also confirms that your So, is there anything more that we can try about VAAPI on Wayland? Can you please add your If sticking to GNOME on Wayland, I don't want to miss |
What we are trying to achieve could be considered an unsupported use case, but it wouldnt hurt to report it. |
Found Akarshan Biswas on a Fedora mailing list, but no idea how to get in touch with him (email address isn't revealed of course, and I didn't want to sign up there). Google no-no for me as well. Getting in touch with the Intel driver team likely is a dead end as well if the problem is to be found upstream at Chromium. But I can't be the only one intending to use (ungoogled)-Chrom(ium) with HW video acceleration on Wayland, can I? I'm currently torn between GNOME on Wayland and in a Xorg Session, both have their ups and downs, but currently working in a Wayland session I think I'll go back to the Xorg Session, not only because of the missing VAAPI support, but because on Wayland there are really annoying clipboard issues (no idea if that is a GNOME or Wayland problem) that make work extremely cumbersome. On the other hand it's mainly the problems with fractional scaling in the Xorg session that make we want to go back to Wayland... Argh! |
Found the guy on github. He is interested as well to have hw accel on chromium, probably under wayland too, not sure about the ungoogled part though, send him an email. @akarshanbiswas |
Email to @akarshanbiswas sent. And yes, I'm in for more testing. ;-)
Unfortunately that's old new, I was able to replicate that (and which is why I have also tested with the But |
@Master0ne Hello. I got your mail. What issues you're having?
It will not work. Have you issued the use_vaapi=true flag? |
@akarshanbiswas --- a/media/gpu/vaapi/BUILD.gn
+++ b/media/gpu/vaapi/BUILD.gn
@@ -128,12 +128,12 @@ source_set("vaapi") {
]
}
- if (ozone_platform_gbm || use_egl) {
+ if (ozone_platform_wayland || ozone_platform_gbm || use_egl) {
sources += [
"vaapi_picture_native_pixmap.cc",
"vaapi_picture_native_pixmap.h",
]
- if (ozone_platform_gbm) {
+ if (ozone_platform_wayland || ozone_platform_gbm) {
sources += [
"vaapi_picture_native_pixmap_ozone.cc",
"vaapi_picture_native_pixmap_ozone.h", here are all the flags used for compiling:
|
@akarshanbiswas as seen from the test above, I can't get HW video acceleration to work on Wayland. The used VAAPI patch is working with both The Arch Linux Wiki says:
So we tried with the VAAPI patch added to What everybody is trying and finding is pretty scattered right now. Something I have commented on the ungoogled-chromium-archlinux repo:
EDIT: Well, a lot is happening here while I'm writing ;-) @akarshanbiswas so you have not seen a working solution for Chromium on Wayland either? On my search for more info I have seen a blog posting concerning chromium-ozone on Fedora (can't find the link right now), which also confirmed the problem but didn't mention a solution. |
huh, interesting link, at least we aren't getting segfaults right now, and it seems the chromium devs aren't interested on fixing it. |
@Master0ne Where? It's not ported yet. They are adding xdg-shell support and gtk file dialogs atm. Still I have asked Maxim. Let's see what he responds. I will try my best to make sure this remains the priority. |
Indeed, something must have changed since then that it doesn't segfault anymore. So known issue, but Chromium team not interested in fixing it because it's unsupported. @akarshanbiswas just found it again, wasn't in a blog but on Fedora Magazine and the other way around: Chromium on Fedora finally gets VAAPI support! It was in the comments below the article where it was mentioned that it doesn't work on Wayland. |
@Master0ne Indeed. I haven't checked the comments in a while. Also they are closed. ChromeOs needs vaapi on Ozone. So they have this on their priority list if I'm not wrong. Btw @jstkdng 私の名前はアカルシャンです。これからは私の名前を覚えてください。(笑) :P |
このようなメッセージの読み取り/書き込みを可能にするために、Googleサービスを使用する数少ないものの1つです。 ;-) |
@Master0ne Googleさんは彼の仕事に上手ではありません。 :P :P |
@akarshanbiswas
If you have asked him already then there is no point in me asking him. Hope he responds. |
I'm clearly the wrong person and should not open issues that require technical knowledge... ;-) |
See: intel/intel-vaapi-driver#369 Thing is I use amd GPUs across all my devices so I don't actually follow Intel media driver development. |
笑、私は常に逆翻訳とクロスチェックしますが、実際には良く見えません! :P |
あああ、そうか? 皆さんは日本人だと思った。 |
It was mentioned somewhere (but don't ask for for a reference, I have read a lot about all that stuff lately and can't recall where) that Intel has abandoned If still maintained and necessary for other hardware, of course a solution for both drivers is desirable. I have both drivers installed on my laptop with Intel HD620 graphics, and both are working, but if not specifying |
Now we just have to play the wait game. Thanks for helping @akarshanbiswas |
@jstkdng unrelated to the VAAPI problem, I'm still running your |
then that is probably just an ozone issue. Nothing I can do about it. |
Thought so. OK then, I'll go back to GNOME in Xorg Session now as I need to get some work done. ;) Hopefully all these issues get solved for the ozone build at some point, it really depend on the progress made with Wayland for making it fit for daily use. |
hmmm, nice. |
That bug doesn't tell me anything, but for me it's a none-issue right now. I think I will try to move over to KDE Plasma next and maybe bspwm as an alternative session. @jstkdng, clearly OT, but what DE/WM are you using ungoogled-chromium in? |
@Master0ne |
@Master0ne |
I'm not using GNOME on Wayland anymore and I'm currently considering the move to FreeBSD, so maybe someone else want to give it a try? |
welp, guess we are done here for the moment, unless someone is willing to test, then no point on keeping this open. |
Recently I had HW video acceleration confirmed working (as per my comment here) and now it does not work anymore although I haven't changed anything.
I just upgraded to the current version 78.0.3904.97-2 from your binary repo and whatever I try
chrome://media-internals/
always only saysvideo_decoder : VpxVideoDecoder
while playing a YouTube video.I don't know what could possibly be the reason, I perform
yay -Syu
daily and I can't tell if this is a recent change or not because I haven't been running ungoogled-chromium for a while (I'm still in the process of deciding if I should move from Firefox to ungoogled-chromium).I'm using GNOME on Wayland if that matters and I'm going to investigate further now.
@jstkdng Can you please check and confirm if it is working for you or not?
The text was updated successfully, but these errors were encountered: