From 1c911575fae919bcf00749f8130096a11fd50bde Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Tue, 23 Apr 2019 19:18:50 +0200 Subject: [PATCH] Remove nvidia workaround --- src/main.cpp | 41 ----------------------------------------- src/main.h | 1 - 2 files changed, 42 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 1ae14cf2e..cbd146fdc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -145,7 +145,6 @@ int main(int argc, char* argv[]) { qLog(Info) << "Strawberry is already running - activating existing window (1)"; } if (core_app.sendMessage(options.Serialize(), 5000)) { - main_exit_safe(0); return 0; } // Couldn't send the message so start anyway @@ -175,7 +174,6 @@ int main(int argc, char* argv[]) { qLog(Info) << "Strawberry is already running - activating existing window (2)"; } if (a.sendMessage(options.Serialize(), 5000)) { - main_exit_safe(0); return 0; } // Couldn't send the message so start anyway @@ -270,44 +268,5 @@ int main(int argc, char* argv[]) { int ret = a.exec(); - //main_exit_safe(ret); - return ret; } - -void main_exit_safe(int ret) { - -#ifdef Q_OS_LINUX - bool have_nvidia = false; - - QFile proc_modules("/proc/modules"); - if (proc_modules.open(QIODevice::ReadOnly)) { - forever { - QByteArray line = proc_modules.readLine(); - if (line.startsWith("nvidia ") || line.startsWith("nvidia_")) { - have_nvidia = true; - } - if (proc_modules.atEnd()) break; - } - proc_modules.close(); - } - - QFile self_maps("/proc/self/maps"); - if (self_maps.open(QIODevice::ReadOnly)) { - forever { - QByteArray line = self_maps.readLine(); - if (line.startsWith("libnvidia-")) { - have_nvidia = true; - } - if (self_maps.atEnd()) break; - } - self_maps.close(); - } - - if (have_nvidia) { - qLog(Warning) << "Exiting immediately to work around NVIDIA driver bug."; - _exit(ret); - } -#endif - -} diff --git a/src/main.h b/src/main.h index 2391fe3c1..8aa88285a 100644 --- a/src/main.h +++ b/src/main.h @@ -23,6 +23,5 @@ #include "config.h" int main(int argc, char* argv[]); -void main_exit_safe(int ret); #endif // MAIN_H