Merge pull request #1478 from acrisci/bug/remove-nvidia-support-claim

remove nvidia support claim
master
Drew DeVault 7 years ago committed by GitHub
commit e3013a33c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -84,23 +84,16 @@ void detect_proprietary() {
if (!f) { if (!f) {
return; return;
} }
bool nvidia = false, nvidia_modeset = false, nvidia_uvm = false, nvidia_drm = false;
while (!feof(f)) { while (!feof(f)) {
char *line; char *line;
if (!(line = read_line(f))) { if (!(line = read_line(f))) {
break; break;
} }
if (strstr(line, "nvidia")) { if (strstr(line, "nvidia")) {
nvidia = true; fprintf(stderr, "\x1B[1;31mWarning: Proprietary Nvidia drivers are "
} "NOT supported. Use Nouveau.\x1B[0m\n");
if (strstr(line, "nvidia_modeset")) { free(line);
nvidia_modeset = true; break;
}
if (strstr(line, "nvidia_uvm")) {
nvidia_uvm = true;
}
if (strstr(line, "nvidia_drm")) {
nvidia_drm = true;
} }
if (strstr(line, "fglrx")) { if (strstr(line, "fglrx")) {
fprintf(stderr, "\x1B[1;31mWarning: Proprietary AMD drivers do " fprintf(stderr, "\x1B[1;31mWarning: Proprietary AMD drivers do "
@ -111,52 +104,6 @@ void detect_proprietary() {
free(line); free(line);
} }
fclose(f); fclose(f);
if (nvidia) {
fprintf(stderr, "\x1B[1;31mWarning: Proprietary nvidia driver support "
"is considered experimental. Nouveau is strongly recommended."
"\x1B[0m\n");
if (!nvidia_modeset || !nvidia_uvm || !nvidia_drm) {
fprintf(stderr, "\x1B[1;31mWarning: You do not have all of the "
"necessary kernel modules loaded for nvidia support. "
"You need nvidia, nvidia_modeset, nvidia_uvm, and nvidia_drm."
"\x1B[0m\n");
}
#ifdef __linux__
f = fopen("/sys/module/nvidia_drm/parameters/modeset", "r");
if (f) {
char *line = read_line(f);
if (line && strstr(line, "Y")) {
// nvidia-drm.modeset is set to 0
fprintf(stderr, "\x1B[1;31mWarning: You must load "
"nvidia-drm with the modeset option on to use "
"the proprietary driver. Consider adding "
"nvidia-drm.modeset=1 to your kernel command line "
"parameters.\x1B[0m\n");
}
fclose(f);
free(line);
} else {
// nvidia-drm.modeset is not set
fprintf(stderr, "\x1B[1;31mWarning: You must load "
"nvidia-drm with the modeset option on to use "
"the proprietary driver. Consider adding "
"nvidia-drm.modeset=1 to your kernel command line "
"parameters.\x1B[0m\n");
}
#else
f = fopen("/proc/cmdline", "r");
if (f) {
char *line = read_line(f);
if (line && !strstr(line, "nvidia-drm.modeset=1")) {
fprintf(stderr, "\x1B[1;31mWarning: You must add "
"nvidia-drm.modeset=1 to your kernel command line to use "
"the proprietary driver.\x1B[0m\n");
}
fclose(f);
free(line);
}
#endif
}
} }
void run_as_ipc_client(char *command, char *socket_path) { void run_as_ipc_client(char *command, char *socket_path) {

Loading…
Cancel
Save