1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Disabling GPU acceleration by setting env variable (#1870)

* Disabling GPU by setting env variable

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Moving fuzzy bug description into docs FAQ

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fix lint error

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2020-12-29 18:11:18 +03:00 committed by GitHub
parent 2b78794000
commit 819811e3e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 1 deletions

View File

@ -43,4 +43,24 @@ Lens will store application logs to following locations depending on your operat
### How can I see more verbose logs? ### 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` 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
```

View File

@ -55,6 +55,10 @@ app.on("second-instance", () => {
windowManager?.ensureMainWindow(); windowManager?.ensureMainWindow();
}); });
if (process.env.LENS_DISABLE_GPU) {
app.disableHardwareAcceleration();
}
app.on("ready", async () => { app.on("ready", async () => {
logger.info(`🚀 Starting Lens from "${workingDir}"`); logger.info(`🚀 Starting Lens from "${workingDir}"`);
await shellSync(); await shellSync();