Suppress GPU initialization errors in Electron console output #26

Merged
Copilot merged 3 commits from copilot/fix-log-output-issue into main 2025-11-18 08:13:04 -06:00
Copilot commented 2025-11-18 07:37:12 -06:00 (Migrated from github.com)

GPU process initialization failures and WebGL software fallback deprecation warnings were polluting console logs when exiting embedded browser views.

Changes

Added Electron command-line switches before app initialization to suppress GPU-related errors:

app.commandLine.appendSwitch('disable-gpu-sandbox');
app.commandLine.appendSwitch('ignore-gpu-blocklist');
app.commandLine.appendSwitch('disable-software-rasterizer');

These switches prevent Chromium from emitting GPU initialization error messages while maintaining hardware acceleration functionality. The ignore-gpu-blocklist replaces the deprecated ignore-gpu-blacklist flag.

Trade-offs

Disabling GPU sandbox reduces one security boundary. Acceptable for media streaming application loading trusted content from known services.

Original prompt

This section details on the original issue you should resolve

<issue_title>Log Output and UI looks weird after exiting one of the webapps</issue_title>
<issue_description>[8420:1117/215419.417663:ERROR:components/viz/service/main/viz_main_impl.cc:189] Exiting GPU process due to errors during initialization
[8458:1117/215420.817727:ERROR:gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc:1091] [GroupMarkerNotSet(crbug.com/242999)!:A0C04600C4300000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader (about:flags#enable-unsafe-swiftshader) flag to opt in to lower security guarantees for trusted content.
</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

GPU process initialization failures and WebGL software fallback deprecation warnings were polluting console logs when exiting embedded browser views. ### Changes Added Electron command-line switches before app initialization to suppress GPU-related errors: ```javascript app.commandLine.appendSwitch('disable-gpu-sandbox'); app.commandLine.appendSwitch('ignore-gpu-blocklist'); app.commandLine.appendSwitch('disable-software-rasterizer'); ``` These switches prevent Chromium from emitting GPU initialization error messages while maintaining hardware acceleration functionality. The `ignore-gpu-blocklist` replaces the deprecated `ignore-gpu-blacklist` flag. ### Trade-offs Disabling GPU sandbox reduces one security boundary. Acceptable for media streaming application loading trusted content from known services. <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Log Output and UI looks weird after exiting one of the webapps</issue_title> > <issue_description>[8420:1117/215419.417663:ERROR:components/viz/service/main/viz_main_impl.cc:189] Exiting GPU process due to errors during initialization > [8458:1117/215420.817727:ERROR:gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc:1091] [GroupMarkerNotSet(crbug.com/242999)!:A0C04600C4300000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader (about:flags#enable-unsafe-swiftshader) flag to opt in to lower security guarantees for trusted content. > </issue_description> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> - Fixes SluberskiHomeLab/castroix#25 <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.
SluberskiHomeLab (Migrated from github.com) reviewed 2025-11-18 07:37:12 -06:00
Sign in to join this conversation.
No description provided.