Skip to content

Commit

Permalink
Merge pull request #997 from cnhind/flag_disable_gpu
Browse files Browse the repository at this point in the history
Flag disable gpu
  • Loading branch information
jijojosephk authored Oct 30, 2023
2 parents af4d9e4 + 4fbbf43 commit 38c1eee
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 6 deletions.
1 change: 1 addition & 0 deletions app/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Here is the list of available arguments and its usage:
| config | config file location | ~/.config/teams-for-linux/config.json |
| defaultURLHandler | Default application to be used to open the HTTP URLs | |
| disableAutogain | A flag indicates whether to disable mic auto gain or not | false |
| disableGpu | A flag to disable GPU and hardware acceleration (can be useful if the window remains blank) | false |
| disableMeetingNotifications | Whether to disable meeting notifications or not | false |
| disableNotifications | A flag to disable all notifications | false |
| disableNotificationSound | Disable chat/meeting start notification sound | false |
Expand Down
5 changes: 5 additions & 0 deletions app/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ function argv(configPath) {
describe: 'A flag indicates whether to disable mic auto gain or not',
type: 'boolean'
},
disableGpu: {
default: false,
describe: 'A flag to disable GPU and hardware acceleration (can be useful if the window remains blank)',
type: 'boolean'
},
disableMeetingNotifications: {
default: false,
describe: 'Whether to disable meeting notifications or not',
Expand Down
10 changes: 10 additions & 0 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ if (!app.isDefaultProtocolClient(protocolClient, process.execPath)) {

app.allowRendererProcessReuse = false;

if (config.disableGpu) {
logger.info('Disabling GPU support...');
app.commandLine.appendSwitch('disable-gpu');
app.commandLine.appendSwitch('disable-software-rasterizer');
// app.commandLine.appendSwitch('disable-gpu-compositing');
// app.commandLine.appendSwitch('disable-gpu-rasterization');
// app.commandLine.appendSwitch('disable-gpu-sandbox');
// app.disableHardwareAcceleration();
}

if (!gotTheLock) {
logger.info('App already running');
app.quit();
Expand Down
8 changes: 8 additions & 0 deletions com.github.IsmaelMartinez.teams_for_linux.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
<url type="bugtracker">https://github.com/IsmaelMartinez/teams-for-linux/issues</url>
<launchable type="desktop-id">com.github.IsmaelMartinez.teams_for_linux.desktop</launchable>
<releases>
<release version="1.3.16" date="2023-10-30">
<description>
<ul>
<li>New: add flag --disableGpu to disable GPU and hardware acceleration</li>
<li>Update: Electron version upgraded to 27.0.2</li>
</ul>
</description>
</release>
<release version="1.3.13" date="2023-09-29">
<description>
<ul>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "teams-for-linux",
"version": "1.3.15",
"version": "1.3.16",
"main": "app/index.js",
"description": "Unofficial client for Microsoft Teams for Linux",
"homepage": "https://github.com/IsmaelMartinez/teams-for-linux",
Expand Down Expand Up @@ -48,7 +48,7 @@
"yargs": "17.7.2"
},
"devDependencies": {
"electron": "^27.0.0",
"electron": "27.0.2",
"electron-builder": "24.6.4",
"eslint": "8.51.0",
"yarn": "1.22.19"
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -835,10 +835,10 @@ [email protected]:
jsonfile "^4.0.0"
mkdirp "^0.5.1"

electron@^27.0.0:
version "27.0.0"
resolved "https://registry.yarnpkg.com/electron/-/electron-27.0.0.tgz#bb6c45881e531b2ec1c7cc46c47aba773f38ee14"
integrity sha512-mr3Zoy82l8XKK/TgguE5FeNeHZ9KHXIGIpUMjbjZWIREfAv+X2Q3vdX6RG0Pmi1K23AFAxANXQezIHBA2Eypwg==
[email protected].2:
version "27.0.2"
resolved "https://registry.yarnpkg.com/electron/-/electron-27.0.2.tgz#5465475e4e5c4de7371dc06e1872b46265a340f0"
integrity sha512-4fbcHQ40ZDlqhr5Pamm+M5BF7ry2lGqjFTWTJ/mrBwuiPWu6xhV/RWgUhKBaLqKNfAaNl3eMxV3Jc82gv6JauQ==
dependencies:
"@electron/get" "^2.0.0"
"@types/node" "^18.11.18"
Expand Down

0 comments on commit 38c1eee

Please sign in to comment.