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

Unable to launch on latest wl_roots due to Chromium bug #141964

Closed
akselaase opened this issue Feb 1, 2022 · 29 comments
Closed

Unable to launch on latest wl_roots due to Chromium bug #141964

akselaase opened this issue Feb 1, 2022 · 29 comments
Assignees
Labels
chromium Issues and items related to Chromium electron-17-update Issues related to electron 17 update insiders-released Patch has been released in VS Code Insiders linux Issues with VS Code on Linux upstream-issue-fixed The underlying upstream issue has been fixed wayland Issue related to wayland display server
Milestone

Comments

@akselaase
Copy link

akselaase commented Feb 1, 2022

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: visual-studio-code-bin 1.63.2-1 (899d46d)
  • OS Version: Arch Linux per February 1st 2022 with sway 1:1.7-1 and wlroots 0.15.0-4

Also happens on 1.64.0-insider (7b9e5c3)

Steps to Reproduce:

  1. Start VS Code with code --enable-features=UseOzonePlatform --ozone-platform=wayland --verbose
  2. Observe output:
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.
[2358162:0201/181136.563772:WARNING:wayland_drm.cc(68)] Failed to get drm magic
interface 'wl_output' has no event 4
tcmalloc: large alloc 1073741824 bytes == 0x1fe4e4cf4000 @  0x56537807d735 0x7fdda29e7047
/dev/fd/3: No such file or directory
Server response:
/dev/fd/3: No such file or directory
Server response:
/usr/bin/code --enable-features=UseOzonePlatform --ozone-platform=wayland    27.83s user 1.06s system 99% cpu 29.026 total

(last line printed by shell)

The issue is caused by this Chromium issue and is also reported to Electron and wlroots. The fix is backported to Electron 13 (electron/electron#32652).

This issue makes vscode unable to launch on Wayland. A workaround is running through XWayland, but that is blurry on hidpi-displays.

I can send a crash-dump on email if you wish.

@IllusionMH
Copy link
Contributor

/assign deepak1556 -meganrogge

@ozls
Copy link

ozls commented Feb 1, 2022

I have the exact same environment and observe the exact same issue. Very interested in a fix!

@deepak1556 deepak1556 added chromium Issues and items related to Chromium linux Issues with VS Code on Linux upstream-issue-linked This is an upstream issue that has been reported upstream wayland Issue related to wayland display server and removed triage-needed labels Feb 2, 2022
@heppu
Copy link

heppu commented Feb 3, 2022

Any news or work arounds one might be able apply to get this working?

@elipp
Copy link

elipp commented Feb 8, 2022

Still present in Arch Linux/sway-1.7/wlroots-0.15.0 + VSCode-1.64

@glanch
Copy link

glanch commented Feb 8, 2022

On Arch you can use this workaround @heppu @elipp @ozls @akselaase

@elipp
Copy link

elipp commented Feb 8, 2022

@glanch yeah, did that for a while... While it pains me, I opted to just enable xwayland in sway for the time being, since I don't have any HiDPI screens in use...

@SpencerSharkey
Copy link

bumping electron to the latest 13.x release with the backport'd fix got stuff working again...

but with vscode moving to electron v16 looks like we're now waiting for electron/electron#32603 to ship in a later release

@heppu
Copy link

heppu commented Feb 9, 2022

@glanch Thank you! I've been looking this blurry mess on xwayland and almost forgot how good the text actually looks.

@emvidi
Copy link

emvidi commented Feb 12, 2022

On arch using aur electron13-bin code-oss works.

@major-mayer
Copy link

@emvidi At least on my end, using electron13-bin instead of the normal electron13 did not fix the issue. I am using Manjaro tho, but the packages should be mostly the same.

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.
[7135:0302/094630.073260:WARNING:wayland_drm.cc(68)] Failed to get drm magic
[7175:0302/094630.210055:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is egl
[7175:0302/094630.213028:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[main 2022-03-02T08:46:30.232Z] [File Watcher (node.js)] Request to start watching: /home/laurenz/.config/Code - OSS/User (excludes: <none>),/home/laurenz/.config/Code - OSS/User/settings.json (excludes: <none>)
[main 2022-03-02T08:46:30.244Z] Starting VS Code
[main 2022-03-02T08:46:30.244Z] from: /usr/lib/code
[main 2022-03-02T08:46:30.244Z] args: {
  _: [],
  diff: false,
  add: false,
  goto: false,
  'new-window': false,
  'reuse-window': false,
  wait: false,
  help: false,
  'list-extensions': false,
  'show-versions': false,
  'pre-release': false,
  version: false,
  verbose: true,
  status: false,
  'prof-startup': false,
  'no-cached-data': false,
  'prof-v8-extensions': false,
  'disable-extensions': false,
  'disable-gpu': false,
  'ms-enable-electron-run-as-node': 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/laurenz/.config/Code - OSS/logs/20220302T094630'
}
[main 2022-03-02T08:46:30.245Z] Resolving machine identifier...
[main 2022-03-02T08:46:30.245Z] Resolved machine identifier: 29c51514d3a0a5552f023a82523f9418f1dc5a81c1749799445e64dd31b6192b
[main 2022-03-02T08:46:30.246Z] Main->SharedProcess#connect
[main 2022-03-02T08:46:30.248Z] [File Watcher (node.js)] Started watching: '/home/laurenz/.config/Code - OSS/User'
[main 2022-03-02T08:46:30.249Z] [File Watcher (node.js)] Started watching: '/home/laurenz/.config/Code - OSS/User/settings.json'
[main 2022-03-02T08:46:30.251Z] StorageMainService: creating global storage
[main 2022-03-02T08:46:30.254Z] lifecycle (main): phase changed (value: 2)
[main 2022-03-02T08:46:30.255Z] windowsManager#open
[main 2022-03-02T08:46:30.255Z] windowsManager#open pathsToOpen [
  {
    workspace: { id: '34cf9b2d1e40af1b1c338c28d9c971ff', uri: [d] },
    type: 2,
    exists: true
  }
]
[main 2022-03-02T08:46:30.256Z] windowsManager#doOpenFolderOrWorkspace {
  folderOrWorkspace: {
    workspace: { id: '34cf9b2d1e40af1b1c338c28d9c971ff', uri: [d] },
    type: 2,
    exists: true
  },
  filesToOpen: undefined
}
[main 2022-03-02T08:46:30.256Z] IPC Object URL: Registered new channel vscode:93dfb98d-8801-4197-9d04-9d5b7dc4ee4b.
[main 2022-03-02T08:46:30.256Z] window#validateWindowState: validating window state on 3 display(s) { mode: 0, x: 93, y: 32, width: 1024, height: 768 }
[main 2022-03-02T08:46:30.256Z] window#validateWindowState: multi-monitor working area { x: 0, y: 0, width: 1920, height: 1080 }
[main 2022-03-02T08:46:30.256Z] window#ctor: using window state { mode: 0, x: 93, y: 32, width: 1024, height: 768 }
[7135:0302/094630.257065:WARNING:wayland_surface.cc(63)] Server doesn't support zwp_linux_explicit_synchronization_v1.
[7135:0302/094630.257261:ERROR:cursor_loader.cc(107)] Failed to load a platform cursor of type kNull
[main 2022-03-02T08:46:30.269Z] StorageMainService: creating workspace storage (34cf9b2d1e40af1b1c338c28d9c971ff)
[main 2022-03-02T08:46:30.269Z] windowsManager#open used window count 1 (workspacesToOpen: 0, foldersToOpen: 1, emptyToRestore: 0, emptyToOpen: 0)
[main 2022-03-02T08:46:30.270Z] lifecycle (main): phase changed (value: 3)
[main 2022-03-02T08:46:30.270Z] update#ctor - updates are disabled as there is no update URL
[main 2022-03-02T08:46:30.270Z] resolveShellEnv(): skipped (VSCODE_CLI is set)
[7135:0302/094630.277492:ERROR:platform_shared_memory_region_posix.cc(47)] Descriptor access mode (2) differs from expected (0)
[7135:0302/094630.344641:WARNING:backend_impl.cc(1840)] Destroying invalid entry.
Failed to generate minidump.

@emvidi
Copy link

emvidi commented Mar 2, 2022

@major-mayer you don't need anymore the aur package, the arch electron13 package has been already updated.

@major-mayer
Copy link

You are right, the version number is the same now.
However i still get the same error even with the newer arch package.

@akselaase
Copy link
Author

akselaase commented Mar 2, 2022

@major-mayer Which vscode package are you using? The aur/visual-studio-code-bin package is vendoring it's electron version, which means changing your system electron won't change anything.

@major-mayer
Copy link

I am using the regular Code - OSS package from the community repository (the one that you can call by executing code).

@isti115
Copy link

isti115 commented Mar 4, 2022

Can confirm, latest package from the repo (as of 2022-03-03, code-1.64.2-1) doesn't work for me either under Wayland.
It is currently flagged out of date though: https://archlinux.org/packages/community/x86_64/code/

@major-mayer
Copy link

major-mayer commented Mar 4, 2022

Interestingly on my notebook (Manjaro - KDE) I still had Electron 13.6.8 installed and code-oss (1.64.2) worked fine in native Wayland mode.

Edit: and after the upgrade of Electron13 and code it didn't work anymore.

@Maskedman99
Copy link

Maskedman99 commented Mar 6, 2022

The current version of VSCode is based on electron 13.5.x, which doesn't include the patch for this issue. There's work going on to upgrade electron to 17.1.x ( #143223 ), after which the issue will hopefully be fixed.

@major-mayer
Copy link

Then I guess the arch issue is that Vscode is packaged with an unsupported version of electron.

@emvidi
Copy link

emvidi commented Mar 6, 2022

On arch code-oss has been updated to 1.65 and still depends on electron13. It does not come packaged with its own electron version. Also the electron13 package has been updated to 13.6.9 which includes the patch for wayland.

swappy-06-03-2022_18:27:47

@taaem
Copy link

taaem commented Mar 11, 2022

On Fedora 34 the stable VSCode version launches fine with the Wayland flags but the latest insider version on Electron 17 is still broken.

/usr/share/code-insiders/code-insiders --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland --verbose
[34361:0311/101739.989925:ERROR:gpu_init.cc(454)] Passthrough is not supported, GL is egl, ANGLE is 
[34361:0311/101739.994136:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
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.
[main 2022-03-11T09:17:40.064Z] [File Watcher (node.js)] Request to start watching: /home/tim/.config/Code - Insiders/User (excludes: <none>),/home/tim/.config/Code - Insiders/User/settings.json (excludes: <none>)
[main 2022-03-11T09:17:40.085Z] Starting VS Code
[main 2022-03-11T09:17:40.085Z] from: /usr/share/code-insiders/resources/app
[main 2022-03-11T09:17:40.085Z] args: {
  _: [],
  diff: false,
  add: false,
  goto: false,
  'new-window': false,
  'reuse-window': false,
  wait: false,
  help: false,
  'list-extensions': false,
  'show-versions': false,
  'pre-release': false,
  version: false,
  verbose: true,
  status: false,
  'prof-startup': false,
  'no-cached-data': false,
  'prof-v8-extensions': false,
  'disable-extensions': false,
  'disable-gpu': false,
  'ms-enable-electron-run-as-node': 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,
  'crash-reporter-id': '3511cf87-8c3e-4b95-ab73-d683ffaa7383',
  '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,
  'disable-dev-shm-usage': false,
  logsPath: '/home/tim/.config/Code - Insiders/logs/20220311T101740'
}
[main 2022-03-11T09:17:40.088Z] Resolving machine identifier...
[main 2022-03-11T09:17:40.089Z] Resolved machine identifier: 6d2546bf2b07ccd4257f1f46389f17d48e952d03ad7dab8e50a0ec4476d20c56
[main 2022-03-11T09:17:40.090Z] Main->SharedProcess#connect
[main 2022-03-11T09:17:40.095Z] [File Watcher (node.js)] Started watching: '/home/tim/.config/Code - Insiders/User'
[main 2022-03-11T09:17:40.096Z] [File Watcher (node.js)] Error: ENOENT: no such file or directory, stat '/home/tim/.config/Code - Insiders/User/settings.json'
[main 2022-03-11T09:17:40.101Z] StorageMainService: creating global storage
[main 2022-03-11T09:17:40.110Z] lifecycle (main): phase changed (value: 2)
[main 2022-03-11T09:17:40.111Z] windowsManager#open
[main 2022-03-11T09:17:40.111Z] windowsManager#open pathsToOpen [
  {
    backupPath: '/home/tim/.config/Code - Insiders/Backups/1646989352923',
    remoteAuthority: undefined
  }
]
[main 2022-03-11T09:17:40.112Z] windowsManager#doOpenEmpty {
  restore: true,
  remoteAuthority: undefined,
  filesToOpen: undefined,
  forceNewWindow: true
}
[main 2022-03-11T09:17:40.114Z] IPC Object URL: Registered new channel vscode:8545fbe1-8a0c-492d-a867-18b5f52c266a.
[main 2022-03-11T09:17:40.114Z] window#validateWindowState: validating window state on 1 display(s) { mode: 1, x: 346, y: 195, width: 1024, height: 768 }
[main 2022-03-11T09:17:40.114Z] window#validateWindowState: 1 monitor working area { x: 0, y: 0, width: 1280, height: 720 }
[main 2022-03-11T09:17:40.115Z] window#ctor: using window state { mode: 1, x: 346, y: 195, width: 1024, height: 720 }
[34319:0311/101740.116186:ERROR:cursor_loader.cc(116)] Failed to load a platform cursor of type kNull
[0311/101740.161550:ERROR:directory_reader_posix.cc(42)] opendir /home/tim/.config/Code - Insiders/Crashpad/attachments/bc3c5bed-d8cc-462c-a527-32b5c3354908: No such file or directory (2)
[1]    34319 segmentation fault (core dumped)  /usr/share/code-insiders/code-insiders  --ozone-platform=wayland --verbose

EDIT: May be a different bug, since this happens also on Gnome Wayland

@deepak1556 deepak1556 added the electron-17-update Issues related to electron 17 update label Mar 17, 2022
@xsrvmy
Copy link

xsrvmy commented Mar 28, 2022

For sway users on archlinux:
There is a hidpi version of sway-git on the aur that allows scaling of the xwayland frame which avoids blurriness if you use integer scale for sway to begin with. You will need to use Xdefaults or Xresources in that case to fix vscode's scaling.

@deepak1556 deepak1556 added upstream-issue-fixed The underlying upstream issue has been fixed and removed upstream-issue-linked This is an upstream issue that has been reported upstream labels Mar 31, 2022
@deepak1556 deepak1556 added this to the April 2022 milestone Mar 31, 2022
@Maskedman99
Copy link

The new version (1.66.0) doesn't launch for me. I am using sway. Now it's showing the same error as #141964 (comment)

@etdr
Copy link

etdr commented Apr 2, 2022

The new version (1.66.0) doesn't launch for me. I am using sway. Now it's showing the same error as #141964 (comment)

Yeah, same.. I switched back to stable VS Code because of this and I guess I'm staying on 1.65.x until this is fixed in insiders

@taaem
Copy link

taaem commented Apr 2, 2022

I think this issue should be fixed in Electron v18.0.1 or v17.3.1, since the main branch is on 17.3.0 the update to 17.3.1 should be a no brainer.

@Maskedman99
Copy link

If so, #145527 is the PR for upgradation to electron 18. Will have to wait for another month.

@lovelymono
Copy link

🎉 Fixed in the latests insiders code-insider-x64-1649156657

@Microwave-WYB
Copy link

tada Fixed in the latests insiders code-insider-x64-1649156657

Just downloaded code-insiders-1.67.0-1651667213.el7.x86_64, the problem still remains. There's not title bar when ozone is set to wayland. How did you fix that?

@xsrvmy
Copy link

xsrvmy commented May 9, 2022

Are you on Gnome? You need to change vscode settings to use custom titlebar.

@Microwave-WYB
Copy link

Are you on Gnome? You need to change vscode settings to use custom titlebar.

NVM! Just fixed by running code-insiders --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland

@github-actions github-actions bot locked and limited conversation to collaborators May 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
chromium Issues and items related to Chromium electron-17-update Issues related to electron 17 update insiders-released Patch has been released in VS Code Insiders linux Issues with VS Code on Linux upstream-issue-fixed The underlying upstream issue has been fixed wayland Issue related to wayland display server
Projects
None yet
Development

No branches or pull requests