Skip to content
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

Hardware acceleration on wayland #376

Closed
alandiwix opened this issue May 17, 2022 · 5 comments
Closed

Hardware acceleration on wayland #376

alandiwix opened this issue May 17, 2022 · 5 comments
Labels
question Further information is requested

Comments

@alandiwix
Copy link

Checklist

What needs to be solved
I've tried following flags to get hardware acceleration working:

--ignore-gpu-blocklist
--enable-gpu-rasterization
--enable-zero-copy

However, chrome://gpu still says:

Graphics Feature Status
Canvas: Software only, hardware acceleration unavailable
Canvas out-of-process rasterization: Disabled
Direct Rendering Display Compositor: Disabled
Compositing: Software only. Hardware acceleration disabled
Multiple Raster Threads: Enabled
OpenGL: Disabled
Rasterization: Software only. Hardware acceleration disabled
Raw Draw: Disabled
Skia Renderer: Enabled
Video Decode: Software only. Hardware acceleration disabled
Video Encode: Software only. Hardware acceleration disabled
Vulkan: Disabled
WebGL: Software only, hardware acceleration unavailable
WebGL2: Software only, hardware acceleration unavailable

Problems Detected
Accelerated video encode has been disabled, either via blocklist, about:flags or the command line.
Disabled Features: video_encode
Gpu compositing has been disabled, either via blocklist, about:flags or the command line. The browser will fall back to software compositing and hardware acceleration will be unavailable.
Disabled Features: gpu_compositing

Steps that have been attempted
There is another entry, below the first one, in chrome://gpu:

Graphics Feature Status for Hardware GPU
Canvas: Hardware accelerated
Canvas out-of-process rasterization: Disabled
Direct Rendering Display Compositor: Disabled
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
OpenGL: Enabled
Rasterization: Hardware accelerated on all pages
Raw Draw: Disabled
Skia Renderer: Enabled
Video Decode: Hardware accelerated
Video Encode: Software only. Hardware acceleration disabled
Vulkan: Disabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated

But I'm not sure which Graphics Feature Status is the right one, but considering 25% idle cpu usage on most pages (that goes up to 50% on scrolling) I believe that the acceleration is actually disabled.

I use Flatpak version of Vieb.
The first question is how to surely tell if the acceleration is disabled? To make sure that this is not #179 that causes that CPU usage.
And the second one, if it's disabled, how to enable it?

@alandiwix alandiwix added the question Further information is requested label May 17, 2022
@tinywrkb
Copy link

For enabling GPU acceleration in Wayland with the Flatpak app, you can try the following

flatpak run --socket=wayland dev.vieb.Vieb \
  --ozone-platform=wayland \
  --ignore-gpu-blocklist \
  --disable-gpu-driver-bug-workarounds \
  --enable-gpu-rasterization \
  --enable-oop-rasterization \
  --enable-zero-copy \
  --enable-native-gpu-memory-buffers \
  --enable-features=VaapiVideoDecoder

For me, these don't make much difference.

Without the GPU related flags
without

With the GPU related flags
with

@alandiwix
Copy link
Author

Thanks for the answer, but those flags didn't help either.

I've actually got GPU process crashing, so it's another chromium/ozone/wayland bug.

[196:0517/200119.600292:ERROR:gbm_pixmap_wayland.cc(76)] Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[196:0517/200119.600487:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(198)] Failed to create pixmap 1280x1024, RGBA_8888, usage GPU_READ
[196:0517/200119.600545:ERROR:shared_image_backing_factory_gl_image.cc(359)] CreateSharedImage: Failed to create bindable image
[196:0517/200119.600625:ERROR:shared_image_factory.cc(607)] CreateSharedImage: could not create backing.
[2:0517/200119.610169:ERROR:gpu_process_host.cc(975)] GPU process exited unexpectedly: exit_code=5

@tinywrkb
Copy link

I've actually got GPU process crashing, so it's another chromium/ozone/wayland bug.

You should try Chromium to confirm that this is a common issue and not specific Vieb or related to the Flatpak packaging.
BTW, what's your GPU? I hope that's not a virtualized GPU, if it is, and you have the option to choose, then try QEMU/libvirt with Virgl or Venus (Vulkan).

@alandiwix
Copy link
Author

alandiwix commented May 19, 2022

@tinywrkb
org.chromium.Chromium doesn't even start under the same circumstances:

[0519/053508.830024:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)
[6:6:0100/000000.848641:ERROR:zygote_main_linux.cc(218)] Failed sending zygote boot message: Broken pipe (32)

GPU is integrated one - AMD Vega 8
What works flawlessly is qutebrowser (that I believe you maintain for flathub), even though because of qt5 chromium there is quite old.

@tinywrkb
Copy link

You should try to confirm that this is not a Flatpak specific issue, nor a resolved mesa bug.
If your distro doesn't provide the latest mesa and Chromium releases, then try another one. Fedora is a good choice, and if you can only run in live usb mode, then look in its installation media creation guide how to enable persistent overlay.

What works flawlessly is qutebrowser (that I believe you maintain for flathub), even though because of qt5 chromium there is quite old.

The beta branch is already on Chromium 90, and soon will switch to 94. With the next major release of qutebrowser, we will likely have at least Chromium 98 in the Flatpak app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants