Fix problem when card does not recognize if it is already in use

This commit is contained in:
Pavel
2018-05-12 00:14:37 +03:00
parent ea36b95fae
commit 334934d5b5

View File

@@ -37,6 +37,13 @@ const BumblebeeNvidiaUtil = new Lang.Class({
this._lockMonitor.id = this._lockMonitor.connect(
'changed', Lang.bind(this, this._statusChanged)
);
// Check if the lock file already exists
// (needed when NVIDIA card is already in use at that point)
if(GLib.file_test(lockFilePath, GLib.FileTest.EXISTS)){
this._detectLabel();
this._active = true;
}
},
_detectLabel: function() {