Bug 1759408 - Enable ozone (wayland/x11) in chromium to improve hardware acceleration
Summary: Enable ozone (wayland/x11) in chromium to improve hardware acceleration
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: chromium
Version: rawhide
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-08 05:13 UTC by Rajveer Malviya
Modified: 2023-01-12 13:39 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-12 13:39:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Rajveer Malviya 2019-10-08 05:13:38 UTC
Enable Ozone(wayland/x11) in chromium to improve hardware acceleration.
And maybe default to wayland.

Additional info:

Initial Disscurion - https://bugs.chromium.org/p/chromium/issues/detail?id=578890

Current Issues - https://bugs.chromium.org/p/chromium/issues/list?q=Proj%3DOzone-Wayland%20

Overview & compiling instructions - https://chromium.googlesource.com/chromium/src/+/master/docs/ozone_overview.md

Comment 1 Tomas Popela 2019-10-08 08:55:49 UTC
Looking at the current issues, it looks like it's still not ready. I think that even the official Chrome build doesn't have it enabled. We should switch once the upstream switches as we don't have the manpower to fix the issues.

Comment 2 Rajveer Malviya 2019-10-08 09:07:52 UTC
Yes, it is currently experimental but default in Official Chrome OS. I don't think Chrome will ever enable it in its official linux build. What do you think about providing a different package like 'chromium-ozone' for now?

Comment 3 Tomas Popela 2019-10-08 09:14:20 UTC
I don't like the idea of the chromium-ozone package, but if someone from the community would like to do it, then it's definitely possible (but outside of the chromium package in Fedora - as we are currently hitting over 2 days of build time on aarch64 and I don't want to prolong it even more).

Also in past we tried to enable the vaapi (through downstream patches), but it failed miserably.

Comment 4 Rajveer Malviya 2019-10-08 09:23:47 UTC
I am aware of what happened with the vaapi patches, would it be possible that vaapi only works with ozone? Because ozone is enabled by default in Chrome OS and vaapi patches are enabled too. Does vaapi library require wayland or something? Chrome OS uses wayland and wayland is only supported by Ozone GPU stack in Chrome.

Comment 5 Rajveer Malviya 2019-10-08 09:33:06 UTC
I am sorry, Chrome OS doesn't use wayland. What I meant is that would it be possible that vaapi only works under Ozone stack?

Comment 6 Akarshan Biswas 2019-10-09 07:28:56 UTC
I maintain a chromium ozone build on my copr: https://copr.fedorainfracloud.org/coprs/akarshanbiswas/chromium-ozone/

libgtkUI is not ported and many more things. But I have managed to add support for wl_drm for amdgpu to enable multiprocess hardware acceleration.

Comment 7 Akarshan Biswas 2019-10-09 07:32:22 UTC
*thanks to maxim of Igalia who helped me in adding the support of wl_drm.

Also vaapi isn't working but the VAProfiles are being detected correctly(Atleast on amdgpu).

Comment 8 Tomas Popela 2019-10-09 08:37:19 UTC
(In reply to Akarshan Biswas from comment #6)
> I maintain a chromium ozone build on my copr:
> https://copr.fedorainfracloud.org/coprs/akarshanbiswas/chromium-ozone/

Nice, then people could use your copr, until it's officially ready.
 
> libgtkUI is not ported and many more things.

Yes, as I already said, it's not ready at all. I think that the work if mostly for CEF or Chrome OS as already was mentioned.

Let me close this bug, as there is not anything what we can (or would like to) do currently.

Comment 9 Akarshan Biswas 2019-10-09 15:14:58 UTC
@Tomas I don't think this issue should be closed. There is a tracker bug upstream: https://bugs.chromium.org/p/chromium/issues/detail?id=578890&q=Proj%3DOzone-Wayland%20&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified

I think we should get serious about wayland port.

Comment 10 Rajveer Malviya 2019-10-09 15:29:15 UTC
@Akarshan, I have been your development of chromium-vaapi & chromium-ozone recently. I tried the ozone build too, just wanted to know if the copr build is from upstream or Igalia's fork (https://github.com/Igalia/chromium/tree/ozone-wayland-dev) ?

This issue was created only after I discovered your COPR build of ozone.

Comment 11 Akarshan Biswas 2019-10-09 15:34:19 UTC
(In reply to Rajveer Malviya from comment #10)
> @Akarshan, I have been your development of chromium-vaapi & chromium-ozone
> recently. I tried the ozone build too, just wanted to know if the copr build
> is from upstream or Igalia's fork
> (https://github.com/Igalia/chromium/tree/ozone-wayland-dev) ?
> 
> This issue was created only after I discovered your COPR build of ozone.

Just upstream chromium with few back-ported patches. Every work on ozone is done fully upstream now.

Comment 12 Rajveer Malviya 2020-09-09 14:28:05 UTC
@Tomas 

Google Chrome Dev (v87) started to build with ozone enabled by default.

 - https://twitter.com/maksim_sisov/status/1303677914836332545

Is it possible to enable ozone/wayland in chromium package now?

Comment 13 mershl 2020-09-14 18:25:00 UTC
Is it planned to support VA-API straight away after enabling ozone/wayland in the chromium(-vaapi) package?

Comment 14 Veit Wahlich 2022-02-07 11:36:56 UTC
In Fedora 35, --ozone-platform=wayland is now set by default by chromium-browser.sh if running on Wayland, unfortunately this breaks the Chromium's "Web Application" feature:

Chromium no longer sets the WM_CLASS property (or whatever the Wayland equivalent to that is) to the value of the --app-id parameter prepended by "crx_", so the desktop does no longer recognise that the window belongs to the .desktop file with the corresponding StartupWMClass property set.
The result is that Chromium Web Apps appear and are handled as regular Chromium windows instead of discrete applications.

The workaround is to start the Chromium with $XDG_SESSION_TYPE and $WAYLAND_DISPLAY unset to prevent chromium-browser.sh from adding --ozone-platform=wayland to $CHROMIUM_DISTRO_FLAGS.
But if this misbehaviour cannot timely be resolved in Chromium itself, it would be great to have a nicer way to prevent Chromium from using the Wayland backend by applying a per-user or system-wide override from e.g. /etc/sysconfig/chromium to disable adding --ozone-platform=wayland or to set --ozone-platform=x11 explicitly.

Comment 15 Than Ngo 2023-01-12 13:39:14 UTC
it should be fixed in chromium-109.0.5414.74-1.f38


Note You need to log in before you can comment on or make changes to this bug.