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

Brave won't start with "Preferred Ozone platform" flag set to "Wayland" on snap package (Ubuntu) #25074

Open
AdnanHodzic opened this issue Aug 30, 2022 · 5 comments

Comments

@AdnanHodzic
Copy link

AdnanHodzic commented Aug 30, 2022

Description

If I set "Preferred Ozone platform" to "Wayland" in brave://flags, Brave won't be able to start anymore.

Brave (1.42.97) was installed as a snap package on Ubuntu 22.04 (wayland is set as default). On same version of Brave installed using apt package manager from Brave apt repository I can enable this flag without any problems.

Reason why I want this flag enabled is so I can get gestures (Wayland) working (pinch too zoom) and being able use Brave rewards on Wayland (related: #13833, #9592).

Steps to Reproduce

  1. brave --enable-features=UseOzonePlatform -ozone-platform=wayland

or

  1. Go to brave://flags
  2. Set "Preferred Ozone platform" flag to "Wayland" and restart Brave
  3. Try to start brave

Actual result:

Running brave in terminal will return following error:

[369020:369020:0830/173559.626648:ERROR:wayland_connection.cc(214)] Failed to connect to Wayland display
[369020:369020:0830/173559.626716:ERROR:ozone_platform_wayland.cc(227)] Failed to initialize Wayland platform
[369020:369020:0830/173559.626729:ERROR:env.cc(226)] The platform failed to initialize.  Exiting.
[0830/173559.629908:ERROR:ptracer.cc(567)] ptrace: Input/output error (5)
[0830/173559.630099:ERROR:ptracer.cc(567)] ptrace: Input/output error (5)
[0830/173559.666067:ERROR:elf_dynamic_array_reader.h(64)] tag not found
/snap/brave/174/opt/brave.com/brave/brave-browser: line 48: 369020 Trace/breakpoint trap   (core dumped) "$HERE/brave" "$@"

Expected result:

Brave will start.

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Brave	1.42.97 Chromium: 104.0.5112.102 (Official Build) (64-bit) 
Revision	8e5396254975ef939f2ef7d0bd334e48a052b536-refs/branch-heads/5112@{#1478}
OS	Linux
JavaScript	V8 10.4.132.22
User Agent	Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36
Command Line	/snap/brave/174/opt/brave.com/brave/brave --enable-crashpad --disable-domain-reliability --enable-dom-distiller --component-updater=url-source=https://go-updater.brave.com/extensions --origin-trial-public-key=bYUKPJoPnCxeNvu72j4EmPuK7tr1PAC7SHh8ld9Mw3E=,fMS4mpO6buLQ/QMd+zJmxzty/VQ6B1EUZqoCU04zoRU= --sync-url=https://sync-v2.brave.com/v2 --lso-url=https://no-thanks.invalid --variations-server-url=https://variations.brave.com/seed --variations-insecure-server-url=https://variations.brave.com/seed --enable-features --disable-features --flag-switches-begin --flag-switches-end --desktop-startup-id=gnome-shell/Brave Web Browser/3009-40-carbon7_TIME44741826
Executable Path	/snap/brave/174/opt/brave.com/brave/brave
Profile Path	/home/ahodzic/snap/brave/174/.config/BraveSoftware/Brave-Browser/Default
Active Variations	ExtendedVariationsSafeMode5:SignalAndWriteViaFileUtil5

Version/Channel Information:

As mentioned above, this problem doesn't exist when Brave is installed using apt package manager.

@acheong08
Copy link

This is due to snap security profiles. Firefox doesn't work either

@AdnanHodzic
Copy link
Author

AdnanHodzic commented Sep 4, 2022

This is due to snap security profiles. Firefox doesn't work either

Actually on Firefox Snap beta channel (v105) on Ubuntu 22.04 absolutely everything works out of the box, including Wayland gestures pinch to zoom, swipe left/right for back/forward.

@dbrll
Copy link

dbrll commented Oct 25, 2022

This also works with the snapped Chromium, including gestures.

Workarounds are either to install Brave through a PPA, but this messes with the system and offsets the security and isolation benefits of the snap version, or to use the snap version with Xwayland, which results in a blurry mess for those who require fractional scaling.

I hope this will be fixed.

@clemans
Copy link

clemans commented Nov 16, 2022

Checking in to +1 this issue.

cat /etc/os-release
PRETTY_NAME="Ubuntu 22.10"
NAME="Ubuntu"
VERSION_ID="22.10"
VERSION="22.10 (Kinetic Kudu)"
VERSION_CODENAME=kinetic
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=kinetic
LOGO=ubuntu-logo
env | grep -E "XDG|WAYLAND"
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
XDG_MENU_PREFIX=gnome-
XDG_SESSION_DESKTOP=ubuntu
XDG_SESSION_TYPE=x11
XDG_CURRENT_DESKTOP=ubuntu:GNOME
XDG_SESSION_CLASS=user
XDG_RUNTIME_DIR=/run/user/1001
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
brave --enable-features=UseOzonePlatform -ozone-platform=wayland
[160935:160935:1115/204520.995265:ERROR:wayland_connection.cc(224)] Failed to connect to Wayland display: No such file or directory (2)
[160935:160935:1115/204520.995297:ERROR:ozone_platform_wayland.cc(220)] Failed to initialize Wayland platform
[160935:160935:1115/204520.995299:ERROR:env.cc(255)] The platform failed to initialize.  Exiting.
[1115/204520.997186:ERROR:ptracer.cc(567)] ptrace: Input/output error (5)
[1115/204520.997261:ERROR:ptracer.cc(567)] ptrace: Input/output error (5)
[1115/204521.015611:ERROR:elf_dynamic_array_reader.h(64)] tag not found
/snap/brave/187/opt/brave.com/brave/brave-browser: line 48: 160935 Trace/breakpoint trap   (core dumped) "$HERE/brave" "$@"

@grigio
Copy link

grigio commented May 31, 2023

This issue seems fixed on archlinux

[Version 1.51.118 Chromium: 113.0.5672.126 (Official Build) (64-bit)](https://brave.com/latest/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants