[BUG] Brave won't show window after setting ozone flag to Wayland

Description of the issue:
Ever since I updated to the latest version of brave browser on the dnf repo, it stopped launching. To get it to launch, I had to delete ~/.config/BraveSoftware.

Steps to Reproduce (add as many as necessary): 1. 2. 3.
Visit brave://flags and set Preferred Ozone Platform to Wayland or Auto on a Wayland session (Fedora KDE Wayland). Relaunch to apply, as the notification prompts you to do.

Actual Result (gifs and screenshots are welcome!):
Nothing shows up except an empty window.

Expected result:
Being able to see the browser window.

Reproduces how often:
Every. Single. Time. I. Try.

Operating System and Brave Version(See the About Brave page in the main menu):
Fedora KDE Spin, Plasma Wayland Session
Version 1.65.114 Chromium: 124.0.6367.60 (Official Build) (64-bit)

Additional Information:
Please fix this quickly, since if I don’t set the ozone platform to Wayland, I can’t use touchpad gestures. Thanks!

I encountered the same issue on the Flatpak version of Brave and found a fix :

Just replace ~/.var/app/com.brave.Browser/config by ~/.config/ if you are running the non-flatpak version.

This doesn’t seem to fix it on the unsandboxed version. Any ideas? I put the line into ~/.config/BraveSoftware/Brave-Browser/brave-flags.conf.

Try to put it at
~/.config/brave-flags.conf
directly.

Didn’t work. Still running on xwayland.

@real_username,
This appears to be an upstream issue related to the Ozone platform flag. While waiting for the fix, you can work around this in one of two ways:

  1. You can launch Brave from the Terminal using the --disable-experiments flag which should launch the browser successfully, then you can go to brave://flags and disable the Ozone platform flag from there (then Brave will launch normally).
  2. Alternatively, if you want to continue using the experimental wayland, can you please try launching Brave from the terminal and appending the --ozone-platform=wayland flag?

Let me know if either of the above works for you.

Thank you

2 Likes

I just deleted the whole config dir. This would have saved me some reconfiguration time. Thanks if I ever have to do this again.

Yes, I would like to continue using Wayland, since it allows touchpad gestures. Adding --ozone-platform=wayland allows it to run. Thank you! It works.

4 Likes

Thank you, I am having this same issue and launching from the terminal with --ozone-platform=wayland is a great workaround. Meanwhile, I also set the config at brave://flags to “Default” so that when I launch Brave from the shortcut instead of the terminal that it launches okay.

2 Likes

Of course, if you set your config directory aside in order to get back to the default OzonePlatform setting, you do get brave back, but you lose all of your other settings, tabs, etc. as well. For a non-destructive targeted fix, log out of your wayland session and log in to the same user with some non-wayland environment (I used i3wm), launch brave with your user’s settings under xorg, and set the OzonePlatform flag back to ‘default.’ Lag back in to your wayland environment and you’re good to go.