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

can't use wayland flags anymore #849

Closed
Iss-in opened this issue Sep 19, 2021 · 21 comments
Closed

can't use wayland flags anymore #849

Iss-in opened this issue Sep 19, 2021 · 21 comments
Labels
bug Something isn't working

Comments

@Iss-in
Copy link

Iss-in commented Sep 19, 2021

On Arch/sway, Electron 14.0.1-1
Happening with both vscodium 1.60.1-2 and vscodium-bin-1.60.1-3

recently, everytime I launch codium --enable-features=UseOzonePlatform --ozone-platform=wayland app is crashing with

Warning: 'enable-features' is not in the list of known options, but still passed to Electron/Chromium
Warning: 'ozone-platform' is not in the list of known options, but still passed to Electron/Chromium

full log with codium --verbose --log=TRACE --enable-features=UseOzonePlatform --ozone-platform=wayland

https://gist.github.com/kushraj/b8793aee0881c078e5974cd81b253038

@Iss-in Iss-in added the bug Something isn't working label Sep 19, 2021
@Aradazer
Copy link

Aradazer commented Sep 24, 2021

I am getting the same error. Launches perfectly fine without those flags, though.
OS: Arch
WM: sway (Wayland)

Tested these flags with other electron apps and got the same crash. So maybe it's a bug in electron?

Full Log
$ codium --verbose --log=TRACE --enable-features=UseOzonePlatform --ozone-platform=wayland
Warning: 'enable-features' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'ozone-platform' is not in the list of known options, but still passed to Electron/Chromium.
[23813:0924/095109.548731:WARNING:wayland_drm.cc(68)] Failed to get drm magic
[23849:0924/095109.751629:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is egl
[23849:0924/095109.760371:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[main 2021-09-24T07:51:09.822Z] Starting VS Code
[main 2021-09-24T07:51:09.824Z] from: /usr/share/vscodium/resources/app
[main 2021-09-24T07:51:09.824Z] args: {
  _: [],
  diff: false,
  add: false,
  goto: false,
  'new-window': false,
  'reuse-window': false,
  wait: false,
  help: false,
  'list-extensions': false,
  'show-versions': false,
  version: false,
  verbose: true,
  log: 'TRACE',
  status: false,
  'prof-startup': false,
  'no-cached-data': false,
  'prof-v8-extensions': false,
  'disable-extensions': false,
  'disable-gpu': false,
  telemetry: false,
  debugRenderer: false,
  logExtensionHostCommunication: false,
  'skip-release-notes': false,
  'skip-welcome': false,
  'disable-telemetry': false,
  'disable-updates': false,
  'disable-keytar': false,
  'disable-workspace-trust': false,
  'disable-crash-reporter': false,
  'skip-add-to-recently-opened': false,
  'unity-launch': false,
  'open-url': false,
  'file-write': false,
  'file-chmod': false,
  'driver-verbose': false,
  force: false,
  'do-not-sync': false,
  trace: false,
  'force-user-env': false,
  'force-disable-user-env': false,
  'open-devtools': false,
  __sandbox: false,
  'no-proxy-server': false,
  'no-sandbox': false,
  nolazy: false,
  'force-renderer-accessibility': false,
  'ignore-certificate-errors': false,
  'allow-insecure-localhost': false,
  logsPath: '/home/daniel/.config/VSCodium/logs/20210924T095109'
}
[main 2021-09-24T07:51:09.825Z] Resolving machine identifier...
[main 2021-09-24T07:51:09.825Z] Resolved machine identifier: 1cfd3ef37564c24752387408d77cff8148a53d988038fcd059c33b676173d4e9
[main 2021-09-24T07:51:09.826Z] Main->SharedProcess#connect
[main 2021-09-24T07:51:09.843Z] StorageMainService: creating global storage
[main 2021-09-24T07:51:09.844Z] lifecycle (main): phase changed (value: 2)
[main 2021-09-24T07:51:09.844Z] windowsManager#open
[main 2021-09-24T07:51:09.845Z] windowsManager#open pathsToOpen [
  {
    workspace: { id: '4f08fe0a2720b07500c69b56a8024c5f', uri: [g] },
    exists: true
  }
]
[main 2021-09-24T07:51:09.846Z] IPC Object URL: Registered new channel vscode:81e41f5d-4517-43a1-905a-d079579f54d6.
[main 2021-09-24T07:51:09.846Z] window#validateWindowState: validating window state on 1 display(s) { mode: 0, x: 0, y: 0, width: 400, height: 245 }
[main 2021-09-24T07:51:09.846Z] window#validateWindowState: 1 monitor working area { x: 0, y: 0, width: 1500, height: 1000 }
[main 2021-09-24T07:51:09.847Z] window#ctor: using window state { mode: 0, x: 0, y: 0, width: 400, height: 245 }
[23813:0924/095109.849036:WARNING:wayland_surface.cc(63)] Server doesn't support zwp_linux_explicit_synchronization_v1.
[23813:0924/095109.851809:ERROR:cursor_loader.cc(107)] Failed to load a platform cursor of type kNull
[main 2021-09-24T07:51:09.888Z] StorageMainService: creating workspace storage (4f08fe0a2720b07500c69b56a8024c5f)
[main 2021-09-24T07:51:09.888Z] windowsManager#open used window count 1 (workspacesToOpen: 0, foldersToOpen: 1, emptyToRestore: 0, emptyToOpen: 0)
[main 2021-09-24T07:51:09.889Z] lifecycle (main): phase changed (value: 3)
[main 2021-09-24T07:51:09.890Z] update#setState idle
[main 2021-09-24T07:51:09.890Z] resolveShellEnv(): skipped (VSCODE_CLI is set)
[23813:0924/095109.910701:ERROR:platform_shared_memory_region_posix.cc(47)] Descriptor access mode (0) differs from expected (2)

@daiyam
Copy link
Member

daiyam commented Sep 24, 2021

Visual Studio Code seems to have the same issue: microsoft/vscode#129280

@Iss-in
Copy link
Author

Iss-in commented Sep 25, 2021

seems like it was due to a fork of freetype2 I was using, restored it to official package and its working.

@Iss-in Iss-in closed this as completed Sep 25, 2021
@Aradazer
Copy link

May also be caused by this Chromium bug. This issue is also found in this wlroots bug, which could explain, that the issue only seemed to be found on sway.

The crash is most likely caused by:

[23813:0924/095109.910701:ERROR:platform_shared_memory_region_posix.cc(47)] Descriptor access mode (0) differs from expected (2)

A quick fix in sway's wlroots may have fixed this.

@Iss-in
Copy link
Author

Iss-in commented Sep 25, 2021

yeah, its possible too. Tried updating my system before this as well.

@Aradazer
Copy link

Just tested both sway (1.6.1) and sway-borders-git (r6845.08df7f7a-1) on Arch and the issue only appears on sway-borders-git.

@Iss-in
Copy link
Author

Iss-in commented Sep 27, 2021

and it's here again, seems like a regression in latest wlroots master

@flipflop133
Copy link

Same here on sway-git under Arch, didn't find any workaround yet.

@daiyam daiyam reopened this Sep 29, 2021
@daiyam
Copy link
Member

daiyam commented Sep 29, 2021

Let's keep it opened since the issue haven't been really fixed. So other users can find it more easily.

@Iss-in
Copy link
Author

Iss-in commented Oct 5, 2021

@nickdiego
Copy link

FTR, the issue is now fixed in Chromium's trunk, and shipping in version 97.0.4682.3 (dev channel) and in the next 96 spin (beta channel) to be published this week.

Thanks for reporting.

@Iss-in Iss-in closed this as completed Nov 5, 2021
@ghost
Copy link

ghost commented Jan 30, 2022

This issue has returned as of version:

Version: 1.63.2
Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3
Date: 2021-12-17T00:20:01.675Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.16.3-arch1-1

No flags work, actually. They all report some variation of Warning: 'enable-features' is not in the list of known options, but still passed to Electron/Chromium.

EDIT: This Arch package bug report for Electron could be related.

@Spitfireap
Copy link

EDIT: This Arch package bug report for Electron could be related.

It seems it is not related to the Arch bug report (fix arrived yesterday). I still have the bug after updating electron13.

@jkbz64
Copy link

jkbz64 commented Mar 8, 2022

The issue was fixed in electron 13.6.9 but VSCode (as of 1.65) uses 13.5.2 for packaging. This can be resolved by bumping the electron target defined in .yarnrc and package.json. I have managed to run the wayland flags with custom prepare step of arch's vscodium 1.65.0-1 PKGBUILD, it's not perfect but it should work while waiting for migration to higher electron target.

prepare() {
    cd 'vscodium'
    rm -rf 'vscode'
    mv '../vscode' 'vscode'

    cd 'vscode'
    
    cat > .yarnrc << EOF
disturl "https://electronjs.org/headers"
target "13.6.9"
runtime "electron"
build_from_source "true"
EOF

    npx -y add-dependencies [email protected]
    npx -y add-dependencies --dev [email protected]

    # it will fail if your node version is NOT >=14.17.4 and <17
    # script later uses nvm, this is just workaround
    yarn install --mode update-lockfile
}

@Iss-in
Copy link
Author

Iss-in commented Mar 9, 2022

awesome, any clue on how long the adaptation of new version takes ?

@jkbz64
Copy link

jkbz64 commented Mar 9, 2022

awesome, any clue on how long the adaptation of new version takes ?

The migration was already done but it seems they reverted it.

The migration is planned in March 2022 iteration, basing by what they say it is expected to ship early april.

@bugrasan
Copy link

bugrasan commented Apr 1, 2022

i'm still getting this error with:
vscode / codium v1.66 (containing electron 17)
sway v1.7
wlroots v0.15.1
manjaro linux (using vscode-bin / codium-bin packages)

[ ~]$ codium --version
1.66.0
e18005f0f1b33c29e81d732535d8c0e47cafb0b5
x64
[ ~]$ codium --enable-features=UseOzonePlatform --ozone-platform=wayland
Warning: 'enable-features' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'ozone-platform' is not in the list of known options, but still passed to Electron/Chromium.
[ ~]$

@jkbz64
Copy link

jkbz64 commented Apr 1, 2022

@bugrasan
vscode migrated to 17.3.0 which does not cover the wayland fix, it was introduced in 17.3.1

You can workaround this issue with this until electron version gets bumped:
vscodium --enable-features=UseOzonePlatform --ozone-platform=wayland --log debug --log debug

@giovanniPepi
Copy link

vscodium --enable-features=UseOzonePlatform --ozone-platform=wayland --log debug --log debug

I got the same error as bugrasan, tried your command and got

Process 25817 (codium) of user 1000 dumped core.

only XWayland seems to be working

@daiyam
Copy link
Member

daiyam commented Apr 4, 2022

JFYI, v1.66.0 is using electron v17.2.0. The next release might use v17.3.0.

@satmandu
Copy link

satmandu commented Jun 8, 2022

The wayland flags still need to be used to enable wayland, but the error still comes up:

code --ozone-platform=wayland --enable-features=WaylandWindowDecorations
Warning: 'ozone-platform' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'enable-features' is not in the list of known options, but still passed to Electron/Chromium.
Version: 1.67.2
Commit: c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5
Date: 2022-05-17T18:23:40.286Z
Electron: 17.4.1
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Linux x64 5.18.2

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants