flathub / com.brave.Browser

https://flathub.org/apps/details/com.brave.Browser
Mozilla Public License 2.0
41 stars 17 forks source link

Brave stopped working with OzonePlatform Wayland since 1.65.114 #576

Closed Malom-ctrl closed 4 months ago

Malom-ctrl commented 4 months ago

For those who had previously set the chrome/brave OzonePlatform flag to Wayland, Brave is likely refusing to launch since the last update. Here is how to fix it :

Hope this helps.

zeroskyx commented 4 months ago

Works like a charm -- thanks mate!

Note: if you're using a non-Flatpak version, the respective file will be ~/.config/brave-flags.conf

mak448a commented 4 months ago

You mean ~/.config/BraveSoftware/Brave-Browser/brave-flags.conf? I tried that and it didn't work.

zeroskyx commented 4 months ago

You mean ~/.config/BraveSoftware/Brave-Browser/brave-flags.conf? I tried that and it didn't work.

It's directly in ~/config/ without any additional sub-directories. If the file does not exist, simply create it and you should be good to go 🙂

mak448a commented 4 months ago

Oh ok! 👍🏻

mak448a commented 4 months ago

@zeroskyx It's still running on xwayland even though I did that :thinking:

zeroskyx commented 4 months ago

Check if you still have experimental flags (brave://flags) enabled (mainly the ozone platform override), and also double-check that Brave is actually consuming ~/.config/brave-flags.conf.

Do do the latter:

  1. Remove the file, start Brave and ensure that brave://gpu/ lists Ozone platform = x11
  2. Close Brave and create ~/.config/brave-flags.conf again with only the content --ozone-platform=wayland
  3. Re-start Brave and ensure that brave://gpu/ lists Ozone platform = wayland and also has --ozone-platform=wayland in the Command Line field
  4. If the last step did not work, try to put something else into ~/.config/brave-flags.conf like --incognito and check if re-starting the browser opens it incognito
  5. If that still does not work, Brave somehow does not respect the file :disappointed:

Note: ensure that all Brave instances are terminated (killall brave) to ensure that it takes the new configuration.

mak448a commented 4 months ago

I added --incognito to brave-flags.conf and it still doesn't respect it. However, now brave-browser --ozone-platform=wayland works for me.

bbb651 commented 4 months ago

PWAs are also completely broken unless an existing instance of brave that isn't broken is already open, and they do not pick up brave-flags.conf, they can be fixed by manually editing the brave-*.desktop entries

refi64 commented 4 months ago

https://github.com/flathub/org.chromium.Chromium/issues/385

This is an upstream bug and specifically applies if you set the "Preferred Ozone platform" / ozone-platform-hint option. You should be able to run Chromium with --ozone-platform=wayland to work around it.

cyangalaxy commented 4 months ago

Hm...I did this workaround 1-2 days ago (thank you for it!), and while it does work, now my Brave seems to freeze occassionally... :S

I would have a couple tabs open, scroll & interact with a webpage, and then Brave is frozen all of a sudden. I close & re-open Brave, and I'm met with "Brave crashed. Restore windows?"

I've switched to Firefox as my main now (I like it equally as much), and keep Brave as backup. Since it appears to be a general Chromium bug, I'll keep an eye if the Chromium team fixes this.

mihaiplesa commented 4 months ago

https://github.com/brave/brave-browser/issues/37498

mihaiplesa commented 4 months ago

Shipped in https://github.com/brave/brave-browser/releases/tag/v1.65.122

sojusnik commented 4 months ago

Shipped in https://github.com/brave/brave-browser/releases/tag/v1.65.122

I'm currently using Version 1.65.122 (Chromium: 124.0.6367.82) on Ubuntu with Wayland, but even with ozone platform = wayland it's still on X11, although in the versions before this issue Wayland worked fine:

grafik

grafik

grafik

mihaiplesa commented 4 months ago

@sojusnik that sounds like a different issue, have you looked through https://github.com/brave/brave-browser/issues?

wknapik commented 4 months ago

https://github.com/brave/brave-browser/issues/37860

loeeeee commented 4 months ago

I was using fedora and running Brave-nightly, and I met the same problem. To disable the ozone flag, I ran

brave-browser-nightly --no-experiments

It opens the browsers with all the flag disabled. And then I went to brave://flags to disable the ozone flag.

Malom-ctrl commented 4 months ago

I was using fedora and running Brave-nightly, and I met the same problem. To disable the ozone flag, I ran

brave-browser-nightly --no-experiments

It opens the browsers with all the flag disabled. And then I went to brave://flags to disable the ozone flag.

By doing so you no longer run your browser with Wayland but with X11 instead, which is probably not what you want if you changed your ozone flag to use Wayland in the first place.