From 819811e3e6a54e1f8055f5a0792d0e04f36ff01f Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Tue, 29 Dec 2020 18:11:18 +0300 Subject: [PATCH] Disabling GPU acceleration by setting env variable (#1870) * Disabling GPU by setting env variable Signed-off-by: Alex Andreev * Moving fuzzy bug description into docs FAQ Signed-off-by: Alex Andreev * Fix lint error Signed-off-by: Alex Andreev --- docs/faq/README.md | 22 +++++++++++++++++++++- src/main/index.ts | 4 ++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/faq/README.md b/docs/faq/README.md index 472ba6596b..4ac6bee3bc 100644 --- a/docs/faq/README.md +++ b/docs/faq/README.md @@ -43,4 +43,24 @@ Lens will store application logs to following locations depending on your operat ### How can I see more verbose logs? -You can start Lens application on debug mode from the command line to see more verbose logs. To start application on debug mode, please provide `DEBUG=true` environment variable and before starting the application, for example: `DEBUG=TRUE /Applications/Lens.app/Contents/MacOS/Lens` \ No newline at end of file +You can start Lens application on debug mode from the command line to see more verbose logs. To start application on debug mode, please provide `DEBUG=true` environment variable and before starting the application, for example: `DEBUG=TRUE /Applications/Lens.app/Contents/MacOS/Lens` + +### Why Lens window rendering is broken? + +MacOS users can encouter visual bug with fuzzy lines appeared while [connected to external 4K display](https://www.forbes.com/sites/gordonkelly/2020/06/11/apple-macos-macbook-pro-google-chrome-display-problem/?sh=331ac27967b4). Same thing can happen with any of Electron applications or Chrome itself. + +![fuzzy lines](https://user-images.githubusercontent.com/4453/78537270-80cc8e80-77ef-11ea-8a6e-0bc69cc28abe.png "Fuzzy lines on MacOS") + +As a temporary workaround there is a possibility to disable Chromium GPU acceleration. To do this for Lens, you need to provide `LENS_DISABLE_GPU=true` env variable and relaunch app. + +First, open `.bash_profile` file from your terminal + +``` +open -a TextEdit.app ~/.bash_profile +``` + +Then, add this line + +``` +export LENS_DISABLE_GPU=true +``` \ No newline at end of file diff --git a/src/main/index.ts b/src/main/index.ts index b0ba60d029..265c91f6d4 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -55,6 +55,10 @@ app.on("second-instance", () => { windowManager?.ensureMainWindow(); }); +if (process.env.LENS_DISABLE_GPU) { + app.disableHardwareAcceleration(); +} + app.on("ready", async () => { logger.info(`🚀 Starting Lens from "${workingDir}"`); await shellSync();