Skip to content

Commit a7a94fb

Browse files
authored
fix: force software gl backend for snap (#214549)
* fix: force software gl backend for snap Refs #212494 When using the default ANGLE gl/gles backend, v1.90 attempts to get display refresh rate for vsync from an internal implementation instead of using the gl extension EGL_CHROMIUM_sync_control, this eventually ends up loading display info from XRandr and chromium attempts to set a label for the data from the shipped resource pak file that is not accessible to the gpu process triggering a SIGTRAP in ui::ResourceBundle::GetSharedInstance. * fix: snap packaging for argument parsing (#214560) * chore: add use-gl and use-angle to known chromium flags
1 parent 7640672 commit a7a94fb

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

resources/linux/snap/electron-launch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,4 +261,4 @@ fi
261261

262262
wait_for_async_execs
263263

264-
exec "$@"
264+
exec "$@" "--no-sandbox" "--use-gl=angle" "--use-angle=swiftshader"

resources/linux/snap/snapcraft.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ parts:
7474
7575
apps:
7676
@@NAME@@:
77-
command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@ --no-sandbox
77+
command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@
7878
common-id: @@NAME@@.desktop
7979

8080
url-handler:
81-
command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@ --open-url --no-sandbox
81+
command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@ --open-url

src/vs/platform/environment/common/argv.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,6 @@ export interface NativeParsedArgs {
145145
'trace-startup-format'?: string;
146146
'trace-startup-file'?: string;
147147
'trace-startup-duration'?: string;
148+
'use-gl'?: string;
149+
'use-angle'?: string;
148150
}

src/vs/platform/environment/node/argv.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ export const OPTIONS: OptionDescriptions<Required<NativeParsedArgs>> = {
209209
'trace-startup-format': { type: 'string' },
210210
'trace-startup-file': { type: 'string' },
211211
'trace-startup-duration': { type: 'string' },
212+
'use-gl': { type: 'string' },
213+
'use-angle': { type: 'string' },
212214

213215
_: { type: 'string[]' } // main arguments
214216
};

0 commit comments

Comments
 (0)