summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2014-12-04 14:39:27 -0800
committerAaron Plattner <aplattner@nvidia.com>2014-12-04 14:39:27 -0800
commit3da306525b711e91df9df1782453cfc12f1eefb0 (patch)
treecc6dba22d89df7b8954f034ccd65b4872690cef0
parent064e61a11761016b4ef449dc7a61b51fe4c183a9 (diff)
304.125304.125
-rw-r--r--backup.c90
-rw-r--r--backup.h1
-rw-r--r--files.c69
-rw-r--r--install-from-cwd.c21
-rw-r--r--kernel.c60
-rw-r--r--misc.c81
-rw-r--r--misc.h2
-rw-r--r--nvidia-installer.c25
-rw-r--r--nvidia-installer.h10
-rw-r--r--option_table.h14
-rw-r--r--version.mk2
11 files changed, 257 insertions, 118 deletions
diff --git a/backup.c b/backup.c
index 47c4c4b..68368ae 100644
--- a/backup.c
+++ b/backup.c
@@ -765,14 +765,16 @@ static int do_uninstall(Options *op, const char *version)
/* XXX what to do if this fails?... nothing */
}
- /*
- * attempt to unload the kernel module, but don't abort if this fails: the
- * kernel may not have been configured with support for module unloading
- * (Linux 2.6) or the user might have unloaded it themselves.
- */
- cmd = nvstrcat(op->utils[RMMOD], " ", RMMOD_MODULE_NAME, NULL);
- run_command(op, cmd, NULL, FALSE, 0, TRUE);
- nvfree(cmd);
+ if (!op->skip_module_unload) {
+ /*
+ * attempt to unload the kernel module, but don't abort if this fails:
+ * the kernel may not have been configured with support for module
+ * unloading (Linux 2.6) or the user might have unloaded it themselves.
+ */
+ cmd = nvstrcat(op->utils[RMMOD], " ", RMMOD_MODULE_NAME, NULL);
+ run_command(op, cmd, NULL, FALSE, 0, TRUE);
+ nvfree(cmd);
+ }
run_distro_hook(op, "post-uninstall");
@@ -1344,6 +1346,78 @@ int uninstall_existing_driver(Options *op, const int interactive)
/*
+ * run_existing_uninstaller() - attempt to run `nvidia-uninstall` if it
+ * exists; if it does not exist or fails, fall back to normal uninstallation.
+ */
+int run_existing_uninstaller(Options *op)
+{
+ char *uninstaller = find_system_util("nvidia-uninstall");
+
+ if (uninstaller) {
+ /* Run the uninstaller non-interactively, and explicitly log to the
+ * uninstall log location: older installers may not do so implicitly. */
+ char *uninstall_cmd = nvstrcat(uninstaller, " -s --log-file-name="
+ DEFAULT_UNINSTALL_LOG_FILE_NAME, NULL);
+ char *data = NULL;
+ int ret;
+
+ ui_log(op, "Uninstalling the previous installation with %s.",
+ uninstaller);
+
+ if (!op->no_kernel_module && !op->kernel_name) {
+ /*
+ * Attempt to run the uninstaller with the --skip-module-unload
+ * option first. If that fails, fall back to running it without
+ * that option.
+ *
+ * We don't want the uninstaller to unload the module because this
+ * instance of the installer already unloaded the old module and
+ * loaded the new one.
+ */
+ char *uninstall_skip_unload_cmd =
+ nvstrcat(uninstall_cmd, " --skip-module-unload", NULL);
+ ret = run_command(op, uninstall_skip_unload_cmd, NULL, FALSE, 0, TRUE);
+ nvfree(uninstall_skip_unload_cmd);
+ } else {
+ /*
+ * If installing the kernel module was skipped or we're
+ * building/installing for a different kernel, then the new kernel
+ * module wasn't automatically loaded and we should unload whichever
+ * one is loaded now.
+ */
+ ret = 1;
+ }
+
+ if (ret) {
+ /* Try again without --skip-module-unload */
+ ret = run_command(op, uninstall_cmd, &data, FALSE, 0, TRUE);
+ }
+
+ nvfree(uninstall_cmd);
+
+ /* if nvidia-uninstall succeeded, return early; otherwise, fall back to
+ * uninstalling via the backup log file. */
+ if (ret == 0) {
+ nvfree(data);
+ return TRUE;
+ } else {
+ ui_log(op, "%s failed; see %s for more details.", uninstaller,
+ DEFAULT_UNINSTALL_LOG_FILE_NAME);
+ if (data && strlen(data)) {
+ ui_log(op, "The output from %s was:\n%s", uninstaller, data);
+ }
+ nvfree(data);
+ }
+
+ nvfree(uninstaller);
+ }
+
+ return uninstall_existing_driver(op, FALSE);
+}
+
+
+
+/*
* report_driver_information() - report basic information about the
* currently installed driver.
*/
diff --git a/backup.h b/backup.h
index 6d1be66..47c0bbc 100644
--- a/backup.h
+++ b/backup.h
@@ -33,6 +33,7 @@ int log_install_file (Options*, const char*);
int log_create_symlink (Options*, const char*, const char*);
int check_for_existing_driver (Options*, Package*);
int uninstall_existing_driver (Options*, const int);
+int run_existing_uninstaller (Options*);
int report_driver_information (Options*);
int get_installed_driver_version_and_descr(Options *, char **, char **);
diff --git a/files.c b/files.c
index 936d279..afc9f0c 100644
--- a/files.c
+++ b/files.c
@@ -665,6 +665,11 @@ int set_destinations(Options *op, Package *p)
dir = path = "";
break;
+ case FILE_TYPE_XORG_OUTPUTCLASS_CONFIG:
+ prefix = op->x_sysconfig_path;
+ dir = path = "";
+ break;
+
default:
/*
@@ -2221,19 +2226,25 @@ static char *extract_x_path(char *str, char **next)
} /* extract_x_path() */
+enum XPathType {
+ XPathLibrary,
+ XPathModule,
+ XPathSysConfig
+};
/*
* get_x_paths_helper() - helper function for determining the X
- * library and module paths; returns 'TRUE' if we had to guess at the
- * path
+ * library, module, and system xorg.conf.d paths; returns 'TRUE' if we had to
+ * guess at the path
*/
static int get_x_paths_helper(Options *op,
- int library,
+ enum XPathType pathType,
char *xserver_cmd,
char *pkg_config_cmd,
char *name,
- char **path)
+ char **path,
+ int require_existing_directory)
{
char *dirs, *cmd, *dir, *next;
int ret, guessed = 0;
@@ -2262,7 +2273,7 @@ static int get_x_paths_helper(Options *op,
* first, try the X server commandline option; this is the
* recommended query mechanism as of X.Org 7.2
*/
- if (op->utils[XSERVER]) {
+ if (op->utils[XSERVER] && xserver_cmd) {
dirs = NULL;
cmd = nvstrcat(op->utils[XSERVER], " ", xserver_cmd, NULL);
@@ -2277,7 +2288,7 @@ static int get_x_paths_helper(Options *op,
while (dir) {
- if (directory_exists(op, dir)) {
+ if (!require_existing_directory || directory_exists(op, dir)) {
ui_expert(op, "X %s path '%s' determined from `%s %s`",
name, dir, op->utils[XSERVER], xserver_cmd);
@@ -2324,7 +2335,7 @@ static int get_x_paths_helper(Options *op,
while (dir) {
- if (directory_exists(op, dir)) {
+ if (!require_existing_directory || directory_exists(op, dir)) {
ui_expert(op, "X %s path '%s' determined from `%s %s`",
name, dir, op->utils[PKG_CONFIG],
@@ -2364,11 +2375,19 @@ static int get_x_paths_helper(Options *op,
/* build the path */
-
- if (library) {
- *path = nvstrcat(op->x_prefix, "/", op->x_libdir, NULL);
- } else {
- *path = nvstrcat(op->x_library_path, "/", op->x_moddir, NULL);
+
+ switch (pathType) {
+ case XPathLibrary:
+ *path = nvstrcat(op->x_prefix, "/", op->x_libdir, NULL);
+ break;
+
+ case XPathModule:
+ *path = nvstrcat(op->x_library_path, "/", op->x_moddir, NULL);
+ break;
+
+ case XPathSysConfig:
+ *path = nvstrcat(DEFAULT_X_DATAROOT_PATH, "/", DEFAULT_CONFDIR, NULL);
+ break;
}
remove_trailing_slashes(*path);
@@ -2393,19 +2412,35 @@ static void get_x_library_and_module_paths(Options *op)
*/
guessed |= get_x_paths_helper(op,
- TRUE,
+ XPathLibrary,
"-showDefaultLibPath",
"--variable=libdir xorg-server",
"library",
- &op->x_library_path);
+ &op->x_library_path,
+ TRUE);
guessed |= get_x_paths_helper(op,
- FALSE,
+ XPathModule,
"-showDefaultModulePath",
"--variable=moduledir xorg-server",
"module",
- &op->x_module_path);
-
+ &op->x_module_path,
+ TRUE);
+
+ /*
+ * Get the sysconfig path (typically /usr/share/X11/xorg.conf.d). This is
+ * only needed if the nvidia.conf OutputClass config snippet is going to be
+ * installed. Don't complain if we had to guess the path; the server will
+ * still work without it if xorg.conf is set up.
+ */
+ get_x_paths_helper(op,
+ XPathSysConfig,
+ NULL,
+ "--variable=sysconfigdir xorg-server",
+ "sysconfig",
+ &op->x_sysconfig_path,
+ FALSE);
+
/*
* done assigning op->x_library_path and op->x_module_path; if we
* had to guess at either of the paths, print a warning
diff --git a/install-from-cwd.c b/install-from-cwd.c
index c700e70..20f3230 100644
--- a/install-from-cwd.c
+++ b/install-from-cwd.c
@@ -247,7 +247,7 @@ int install_from_cwd(Options *op)
*/
if (!op->kernel_module_only) {
- if (!uninstall_existing_driver(op, FALSE)) goto failed;
+ if (!run_existing_uninstaller(op)) goto failed;
}
/* build a list of operations to execute to do the install */
@@ -275,6 +275,23 @@ int install_from_cwd(Options *op)
if (op->dkms && !dkms_install_module(op, p->version, get_kernel_name(op)))
goto failed;
+ /* Make sure the RM is loaded */
+
+ if (!op->no_kernel_module || op->dkms) {
+ /*
+ * If a kernel module was installed the normal way, it should have been
+ * left loaded by test_kernel_module(). However, older versions of
+ * nvidia-uninstall don't honor the --skip-module-unload option, so
+ * uninstalling a previous driver may have unloaded the module that
+ * test_kernel_module() loaded. Just in case that happened, modprobe it
+ * again here.
+ *
+ * When installing the module via DKMS, the module is not loaded to
+ * begin with.
+ */
+ if (!load_kernel_module(op, p)) goto failed;
+ }
+
/* run the distro postinstall script */
run_distro_hook(op, "post-install");
@@ -769,6 +786,8 @@ static Package *parse_manifest (Options *op)
p->entries[n].flags |= FILE_TYPE_NVCUVID_LIB;
else if (strcmp(flag, "NVCUVID_LIB_SYMLINK") == 0)
p->entries[n].flags |= FILE_TYPE_NVCUVID_SYMLINK;
+ else if (strcmp(flag, "XORG_OUTPUTCLASS_CONFIG") == 0)
+ p->entries[n].flags |= FILE_TYPE_XORG_OUTPUTCLASS_CONFIG;
else {
nvfree(flag);
goto invalid_manifest_file;
diff --git a/kernel.c b/kernel.c
index 4d32c54..4088439 100644
--- a/kernel.c
+++ b/kernel.c
@@ -681,16 +681,17 @@ void check_for_warning_messages(Options *op)
/*
- * test_kernel_module() - attempt to insmod the kernel module and then
- * rmmod it. Return TRUE if the insmod succeeded, or FALSE otherwise.
+ * test_kernel_module() - attempt to insmod the kernel module. Return TRUE if
+ * the insmod succeeded, or FALSE otherwise.
*/
int test_kernel_module(Options *op, Package *p)
{
char *cmd = NULL, *data;
int old_loglevel = 0, new_loglevel = 0;
- int fd, ret, name[] = { CTL_KERN, KERN_PRINTK };
+ int fd, ret, name[] = { CTL_KERN, KERN_PRINTK }, i;
size_t len = sizeof(int);
+ const char *depmods[] = { "agpgart", "i2c-core", "drm" };
/*
* If we're building/installing for a different kernel, then we
@@ -709,6 +710,7 @@ int test_kernel_module(Options *op, Package *p)
if (fd >= 0) {
if (read(fd, &old_loglevel, 1) == 1) {
new_loglevel = '2'; /* KERN_CRIT */
+ lseek(fd, 0, SEEK_SET);
write(fd, &new_loglevel, 1);
}
} else {
@@ -719,25 +721,16 @@ int test_kernel_module(Options *op, Package *p)
}
/*
- * On Linux 2.6 we depend on the AGPGART frontend module unless
- * the kernel was configured without support for the Linux AGP
- * GART driver. Preload it here to satisfy the dependency, which
- * isn't resolved by `insmod`.
+ * Attempt to load modules that nvidia.ko might depend on. Silently ignore
+ * failures: if nvidia.ko doesn't depend on the module that failed, the test
+ * load below will succeed and it doesn't matter that the load here failed.
*/
if (strncmp(get_kernel_name(op), "2.4", 3) != 0) {
- cmd = nvstrcat(op->utils[MODPROBE], " -q agpgart", NULL);
- run_command(op, cmd, NULL, FALSE, 0, TRUE);
- nvfree(cmd);
- }
-
- /*
- * Likewise, we need to preload the i2c-core.ko kernel module to
- * satisfy another dependency not resolved by `insmod`.
- */
- if (strncmp(get_kernel_name(op), "2.4", 3) != 0) {
- cmd = nvstrcat(op->utils[MODPROBE], " -q i2c-core", NULL);
- run_command(op, cmd, NULL, FALSE, 0, TRUE);
- nvfree(cmd);
+ for (i = 0; i < ARRAY_LEN(depmods); i++) {
+ cmd = nvstrcat(op->utils[MODPROBE], " -q ", depmods[i], NULL);
+ run_command(op, cmd, NULL, FALSE, 0, TRUE);
+ nvfree(cmd);
+ }
}
cmd = nvstrcat(op->utils[INSMOD], " ",
@@ -774,8 +767,6 @@ int test_kernel_module(Options *op, Package *p)
ret = FALSE;
} else {
- nvfree(cmd);
-
/*
* check if the kernel module detected problems with this
* system's kernel and display any warning messages it may
@@ -785,12 +776,9 @@ int test_kernel_module(Options *op, Package *p)
check_for_warning_messages(op);
/*
- * attempt to unload the kernel module, but don't abort if
- * this fails: the kernel may not have been configured with
- * support for module unloading (Linux 2.6).
+ * The nvidia module is left loaded in case an X server with
+ * OutputClass-based driver matching is being used.
*/
- cmd = nvstrcat(op->utils[RMMOD], " ", p->kernel_module_name, NULL);
- run_command(op, cmd, NULL, FALSE, 0, TRUE);
ret = TRUE;
}
@@ -812,12 +800,26 @@ int test_kernel_module(Options *op, Package *p)
nvfree(data);
if (fd >= 0) {
- if (new_loglevel != 0)
+ if (new_loglevel != 0) {
+ lseek(fd, 0, SEEK_SET);
write(fd, &old_loglevel, 1);
+ }
close(fd);
} else {
- if (new_loglevel != 0)
+ if (new_loglevel != 0) {
sysctl(name, 2, NULL, 0, &old_loglevel, len);
+ }
+ }
+
+ /*
+ * Unload dependencies that might have been loaded earlier.
+ */
+ if (strncmp(get_kernel_name(op), "2.4", 3) != 0) {
+ for (i = 0; i < ARRAY_LEN(depmods); i++) {
+ cmd = nvstrcat(op->utils[MODPROBE], " -qr ", depmods[i], NULL);
+ run_command(op, cmd, NULL, FALSE, 0, TRUE);
+ nvfree(cmd);
+ }
}
return ret;
diff --git a/misc.c b/misc.c
index 7c5945c..ac0189a 100644
--- a/misc.c
+++ b/misc.c
@@ -1303,6 +1303,8 @@ uint64_t get_installable_file_mask(Options *op)
if (!op->opengl_headers) installable_files &= ~FILE_TYPE_OPENGL_HEADER;
if (op->no_kernel_module_source)
installable_files &= ~FILE_TYPE_KERNEL_MODULE_SRC;
+ if (!op->xorg_supports_output_class)
+ installable_files &= ~FILE_TYPE_XORG_OUTPUTCLASS_CONFIG;
return installable_files;
} /* get_installable_file_mask() */
@@ -1864,15 +1866,11 @@ Distribution get_distribution(Options *op)
* get_xserver_information() - parse the versionString (from `X
* -version`) and assign relevant information that we infer from the X
* server version.
- *
- * Note: this implementation should be shared with nvidia-xconfig
*/
static int get_xserver_information(const char *versionString,
- int *isXorg,
int *isModular,
- int *autoloadsGLX,
- int *supportsExtensionSection)
+ int *supportsOutputClassSection)
{
#define XSERVER_VERSION_FORMAT_1 "X Window System Version"
#define XSERVER_VERSION_FORMAT_2 "X.Org X Server"
@@ -1883,18 +1881,15 @@ static int get_xserver_information(const char *versionString,
/* check if this is an XFree86 X server */
if (strstr(versionString, "XFree86 Version")) {
- *isXorg = FALSE;
*isModular = FALSE;
- *autoloadsGLX = FALSE;
- *supportsExtensionSection = FALSE;
return TRUE;
}
- /* this must be an X.Org X server */
-
- *isXorg = TRUE;
- /* attempt to parse the major.minor version out of the string */
+ /*
+ * This must be an X.Org X server. Attempt to parse the major.minor version
+ * out of the string
+ */
found = FALSE;
@@ -1925,30 +1920,13 @@ static int get_xserver_information(const char *versionString,
}
/*
- * supportsExtensionSection: support for the "Extension" xorg.conf
- * section was added between X.Org 6.7 and 6.8. To account for
- * the X server version wrap, it is easier to check for X servers
- * that do not support the Extension section: 6.x (x < 8) X
- * servers.
+ * support for using OutputClass sections to automatically match drivers to
+ * platform devices was added in X.Org xserver 1.16.
*/
-
- if ((major == 6) && (minor < 8)) {
- *supportsExtensionSection = FALSE;
+ if ((major == 6) || (major == 7) || ((major == 1) && (minor < 16))) {
+ *supportsOutputClassSection = FALSE;
} else {
- *supportsExtensionSection = TRUE;
- }
-
- /*
- * support for autoloading GLX was added in X.Org 1.5. To account
- * for the X server version wrap, it is easier to check for X
- * servers that do not support GLX autoloading: 6.x, 7.x, or < 1.5
- * X servers.
- */
-
- if ((major == 6) || (major == 7) || ((major == 1) && (minor < 5))) {
- *autoloadsGLX = FALSE;
- } else {
- *autoloadsGLX = TRUE;
+ *supportsOutputClassSection = TRUE;
}
return TRUE;
@@ -1958,23 +1936,23 @@ static int get_xserver_information(const char *versionString,
/*
- * check_for_modular_xorg() - run the X binary with the '-version'
- * command line option and extract the version in an attempt to
- * determine if it's part of a modular Xorg release. If the version
- * can't be determined, we assume it's not.
+ * query_xorg_version() - run the X binary with the '-version'
+ * command line option and extract the version.
*
- * This should eventually get collapsed with xconfigGetXServerInUse()
- * in nvidia-xconfig.
+ * Using the version, try to infer if it's part of a modular Xorg release. If
+ * the version can't be determined, we assume it's not.
+ *
+ * This function assigns the following fields:
+ * op->modular_xorg
*/
#define OLD_VERSION_FORMAT "(protocol Version %d, revision %d, vendor release %d)"
#define NEW_VERSION_FORMAT "X Protocol Version %d, Revision %d, Release %d."
-int check_for_modular_xorg(Options *op)
+void query_xorg_version(Options *op)
{
char *cmd = NULL, *data = NULL;
- int modular_xorg = FALSE;
- int dummy, ret;
+ int ret;
if (!op->utils[XSERVER])
goto done;
@@ -1991,19 +1969,17 @@ int check_for_modular_xorg(Options *op)
* modular
*/
- ret = get_xserver_information(data,
- &dummy, /* isXorg */
- &modular_xorg, /* isModular */
- &dummy, /* autoloadsGLX */
- &dummy); /* supportsExtensionSection */
+ ret = get_xserver_information(data, &op->modular_xorg,
+ &op->xorg_supports_output_class);
/*
* if get_xserver_information() failed, assume the X server is not
- * modular
+ * modular and does not support OutputClass sections
*/
if (!ret) {
- modular_xorg = FALSE;
+ op->modular_xorg = FALSE;
+ op->xorg_supports_output_class = FALSE;
}
/* fall through */
@@ -2011,10 +1987,7 @@ int check_for_modular_xorg(Options *op)
done:
nvfree(data);
nvfree(cmd);
-
- return modular_xorg;
-
-} /* check_for_modular_xorg() */
+}
/*
diff --git a/misc.h b/misc.h
index b78e958..a20b65b 100644
--- a/misc.h
+++ b/misc.h
@@ -58,7 +58,7 @@ void collapse_multiple_slashes(char *s);
int is_symbolic_link_to(const char *path, const char *dest);
Distribution get_distribution(Options *op);
int check_for_running_x(Options *op);
-int check_for_modular_xorg(Options *op);
+void query_xorg_version(Options *op);
int check_for_nvidia_graphics_devices(Options *op, Package *p);
int run_nvidia_xconfig(Options *op, int restore);
int run_distro_hook(Options *op, const char *hook);
diff --git a/nvidia-installer.c b/nvidia-installer.c
index 75168ea..6fdc5b9 100644
--- a/nvidia-installer.c
+++ b/nvidia-installer.c
@@ -130,7 +130,6 @@ static Options *load_default_options(void)
/* statically initialized strings */
op->proc_mount_point = DEFAULT_PROC_MOUNT_POINT;
- op->log_file_name = DEFAULT_LOG_FILE_NAME;
op->ftp_site = DEFAULT_FTP_SITE;
op->tmpdir = get_tmpdir(op);
@@ -239,6 +238,8 @@ static void parse_commandline(int argc, char *argv[], Options *op)
op->x_library_path = strval; break;
case X_MODULE_PATH_OPTION:
op->x_module_path = strval; break;
+ case X_SYSCONFIG_PATH_OPTION:
+ op->x_sysconfig_path = strval; break;
case OPENGL_PREFIX_OPTION:
op->opengl_prefix = strval; break;
case OPENGL_LIBDIR_OPTION:
@@ -269,6 +270,8 @@ static void parse_commandline(int argc, char *argv[], Options *op)
op->kernel_module_installation_path = strval; break;
case UNINSTALL_OPTION:
op->uninstall = TRUE; break;
+ case SKIP_MODULE_UNLOAD_OPTION:
+ op->skip_module_unload = TRUE; break;
case PROC_MOUNT_POINT_OPTION:
op->proc_mount_point = strval; break;
case USER_INTERFACE_OPTION:
@@ -430,7 +433,18 @@ static void parse_commandline(int argc, char *argv[], Options *op)
if (!op->installer_prefix) {
op->installer_prefix = op->utility_prefix;
}
-
+
+ /*
+ * Set the default log file path. This is deferred until after the
+ * command line has been parsed so that the installer has a chance
+ * to determine whether it should be run in uninstall mode.
+ */
+
+ if (!op->log_file_name) {
+ op->log_file_name = op->uninstall ? DEFAULT_UNINSTALL_LOG_FILE_NAME :
+ DEFAULT_LOG_FILE_NAME;
+ }
+
return;
fail:
@@ -497,11 +511,10 @@ int main(int argc, char *argv[])
if (!find_module_utils(op)) goto done;
if (!check_selinux(op)) goto done;
- /* check if we need to worry about modular Xorg */
+ /* check for X server properties based on the version of the server */
+
+ query_xorg_version(op);
- op->modular_xorg =
- check_for_modular_xorg(op);
-
/* get the default installation prefixes/paths */
get_default_prefixes_and_paths(op);
diff --git a/nvidia-installer.h b/nvidia-installer.h
index 61d194e..887f3b7 100644
--- a/nvidia-installer.h
+++ b/nvidia-installer.h
@@ -108,6 +108,7 @@ typedef struct __options {
int update;
int expert;
int uninstall;
+ int skip_module_unload;
int driver_info;
int debug;
int logging;
@@ -152,6 +153,7 @@ typedef struct __options {
char *x_moddir;
char *x_module_path;
char *x_library_path;
+ char *x_sysconfig_path;
char *compat32_chroot;
char *compat32_prefix;
@@ -169,6 +171,7 @@ typedef struct __options {
char *documentation_mandir;
int modular_xorg;
+ int xorg_supports_output_class;
char *kernel_source_path;
char *kernel_output_path;
@@ -314,6 +317,7 @@ typedef struct __package {
#define FILE_TYPE_NVCUVID_SYMLINK 0x0000000080000000ULL
#define FILE_TYPE_GLX_MODULE_SHARED_LIB 0x0000000100000000ULL
#define FILE_TYPE_GLX_MODULE_SYMLINK 0x0000000200000000ULL
+#define FILE_TYPE_XORG_OUTPUTCLASS_CONFIG 0x0000000400000000ULL
/* file class: this is used to distinguish OpenGL libraries */
@@ -347,7 +351,8 @@ typedef struct __package {
FILE_TYPE_DOT_DESKTOP | \
FILE_TYPE_VDPAU_LIB | \
FILE_TYPE_NVCUVID_LIB | \
- FILE_TYPE_KERNEL_MODULE_SRC)
+ FILE_TYPE_KERNEL_MODULE_SRC | \
+ FILE_TYPE_XORG_OUTPUTCLASS_CONFIG)
#define FILE_TYPE_HAVE_PATH (FILE_TYPE_XMODULE_SHARED_LIB | \
FILE_TYPE_XMODULE_SYMLINK | \
@@ -456,8 +461,10 @@ typedef struct __package {
#define DEFAULT_DOT_DESKTOPDIR "share/applications"
#define DEFAULT_DOCDIR "share/doc"
#define DEFAULT_MANDIR "share/man"
+#define DEFAULT_CONFDIR "X11/xorg.conf.d"
#define DEFAULT_KERNEL_MODULE_SRC_PREFIX "/usr/src"
+#define DEFAULT_X_DATAROOT_PATH "/usr/share"
/*
* As of Xorg 7.x, X components need not be installed relative
@@ -506,6 +513,7 @@ typedef struct __package {
#define LICENSE_FILE "LICENSE"
#define DEFAULT_LOG_FILE_NAME "/var/log/nvidia-installer.log"
+#define DEFAULT_UNINSTALL_LOG_FILE_NAME "/var/log/nvidia-uninstall.log"
#define NUM_TIMES_QUESTIONS_ASKED 3
diff --git a/option_table.h b/option_table.h
index ab3b115..cba4ed3 100644
--- a/option_table.h
+++ b/option_table.h
@@ -41,6 +41,7 @@ enum {
KERNEL_INCLUDE_PATH_OPTION,
KERNEL_INSTALL_PATH_OPTION,
UNINSTALL_OPTION,
+ SKIP_MODULE_UNLOAD_OPTION,
PROC_MOUNT_POINT_OPTION,
USER_INTERFACE_OPTION,
LOG_FILE_NAME_OPTION,
@@ -84,6 +85,7 @@ enum {
KERNEL_MODULE_SOURCE_DIR_OPTION,
NO_KERNEL_MODULE_SOURCE_OPTION,
DKMS_OPTION,
+ X_SYSCONFIG_PATH_OPTION,
};
static const NVGetoptOption __options[] = {
@@ -126,6 +128,11 @@ static const NVGetoptOption __options[] = {
{ "uninstall", UNINSTALL_OPTION, 0, NULL,
"Uninstall the currently installed NVIDIA driver." },
+ { "skip-module-unload", SKIP_MODULE_UNLOAD_OPTION,
+ NVGETOPT_OPTION_APPLIES_TO_NVIDIA_UNINSTALL, NULL,
+ "When uninstalling the driver, skip unloading of the NVIDIA kernel "
+ "module. This option is ignored when the driver is being installed." },
+
{ "sanity", SANITY_OPTION, 0, NULL,
"Perform basic sanity tests on an existing NVIDIA "
"driver installation." },
@@ -180,6 +187,13 @@ static const NVGetoptOption __options[] = {
DEFAULT_64BIT_LIBDIR "' or '" DEFAULT_LIBDIR "' on 64bit systems, "
"depending on the installed Linux distribution." },
+ { "x-sysconfig-path", X_SYSCONFIG_PATH_OPTION, NVGETOPT_STRING_ARGUMENT, NULL,
+ "The path under which X system configuration files will be installed. "
+ "If this option is not specified, nvidia-installer uses the following "
+ "search order and selects the first valid directory it finds: 1) "
+ "`pkg-config --variable=sysconfigdir xorg-server`, or 2) "
+ DEFAULT_X_DATAROOT_PATH "/" DEFAULT_CONFDIR "." },
+
{ "opengl-prefix", OPENGL_PREFIX_OPTION, NVGETOPT_STRING_ARGUMENT, NULL,
"The prefix under which the OpenGL components of the "
"NVIDIA driver will be installed; the default is: '" DEFAULT_OPENGL_PREFIX
diff --git a/version.mk b/version.mk
index 17a52e5..9eef500 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 304.123
+NVIDIA_VERSION = 304.125