diff -Nru nvidia-settings-418.43/debian/changelog nvidia-settings-418.56/debian/changelog --- nvidia-settings-418.43/debian/changelog 2019-02-22 18:18:25.000000000 +0000 +++ nvidia-settings-418.56/debian/changelog 2019-03-20 21:00:00.000000000 +0000 @@ -1,32 +1,14 @@ -nvidia-settings (418.43-0ubuntu0~gpu18.04.1) bionic; urgency=medium +nvidia-settings (418.56-0ubuntu0~gpu18.04.1) bionic; urgency=medium * New upstream release - -- Michael Marley Fri, 22 Feb 2019 17:00:00 -0500 + -- Michael Marley Wed, 20 Mar 2019 17:00:00 -0400 -nvidia-settings (418.30-0ubuntu0~gpu19.04.1) disco; urgency=medium +nvidia-settings (418.43-0ubuntu1) disco; urgency=medium - * New upstream release - - -- Michael Marley Wed, 30 Jan 2019 17:00:00 -0500 - -nvidia-settings (415.27-0ubuntu0~gpu19.04.1) disco; urgency=medium - - * New upstream release - - -- Michael Marley Tue, 15 Jan 2019 17:00:00 -0500 - -nvidia-settings (415.25-0ubuntu0~gpu19.04.1) disco; urgency=medium - - * New upstream release - - -- Michael Marley Tue, 18 Dec 2018 17:00:00 -0500 - -nvidia-settings (415.23-0ubuntu0~gpu19.04.1) disco; urgency=medium - - * New upstream release + * New upstream release. - -- Michael Marley Wed, 12 Dec 2018 17:00:00 -0500 + -- Alberto Milone Wed, 13 Mar 2019 13:01:17 +0100 nvidia-settings (410.78-0ubuntu2) disco; urgency=medium diff -Nru nvidia-settings-418.43/debian/patches/05_add_polkit_support.patch nvidia-settings-418.56/debian/patches/05_add_polkit_support.patch --- nvidia-settings-418.43/debian/patches/05_add_polkit_support.patch 2019-01-30 19:51:51.000000000 +0000 +++ nvidia-settings-418.56/debian/patches/05_add_polkit_support.patch 2019-03-20 21:00:00.000000000 +0000 @@ -1,7 +1,7 @@ -Index: nvidia-settings-418.30/src/gtk+-2.x/ctkdisplayconfig-utils.c +Index: nvidia-settings-418.56/src/gtk+-2.x/ctkdisplayconfig-utils.c =================================================================== ---- nvidia-settings-418.30.orig/src/gtk+-2.x/ctkdisplayconfig-utils.c -+++ nvidia-settings-418.30/src/gtk+-2.x/ctkdisplayconfig-utils.c +--- nvidia-settings-418.56.orig/src/gtk+-2.x/ctkdisplayconfig-utils.c ++++ nvidia-settings-418.56/src/gtk+-2.x/ctkdisplayconfig-utils.c @@ -4219,6 +4219,77 @@ static void update_banner(XConfigPtr con } /* update_banner() */ diff -Nru nvidia-settings-418.43/debian/patches/06_remove_local_prefix.patch nvidia-settings-418.56/debian/patches/06_remove_local_prefix.patch --- nvidia-settings-418.43/debian/patches/06_remove_local_prefix.patch 2018-12-12 21:19:02.000000000 +0000 +++ nvidia-settings-418.56/debian/patches/06_remove_local_prefix.patch 2019-03-20 21:00:00.000000000 +0000 @@ -7,10 +7,10 @@ utils.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: nvidia-settings-415.23/utils.mk +Index: nvidia-settings-418.56/utils.mk =================================================================== ---- nvidia-settings-415.23.orig/utils.mk -+++ nvidia-settings-415.23/utils.mk +--- nvidia-settings-418.56.orig/utils.mk ++++ nvidia-settings-418.56/utils.mk @@ -180,7 +180,7 @@ endif # the source tarball ############################################################################## diff -Nru nvidia-settings-418.43/debian/patches/07_remove_features_for_legacy.patch nvidia-settings-418.56/debian/patches/07_remove_features_for_legacy.patch --- nvidia-settings-418.43/debian/patches/07_remove_features_for_legacy.patch 2018-12-12 21:19:04.000000000 +0000 +++ nvidia-settings-418.56/debian/patches/07_remove_features_for_legacy.patch 2019-03-20 21:00:00.000000000 +0000 @@ -7,10 +7,10 @@ src/gtk+-2.x/ctkwindow.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) -Index: nvidia-settings-415.23/src/gtk+-2.x/ctkwindow.c +Index: nvidia-settings-418.56/src/gtk+-2.x/ctkwindow.c =================================================================== ---- nvidia-settings-415.23.orig/src/gtk+-2.x/ctkwindow.c -+++ nvidia-settings-415.23/src/gtk+-2.x/ctkwindow.c +--- nvidia-settings-418.56.orig/src/gtk+-2.x/ctkwindow.c ++++ nvidia-settings-418.56/src/gtk+-2.x/ctkwindow.c @@ -410,6 +410,50 @@ static gboolean has_randr_gamma(CtrlTarg return ((ret == NvCtrlSuccess) && (val == 1)); } diff -Nru nvidia-settings-418.43/debian/patches/11_link_as-needed.patch nvidia-settings-418.56/debian/patches/11_link_as-needed.patch --- nvidia-settings-418.43/debian/patches/11_link_as-needed.patch 2019-01-15 18:38:18.000000000 +0000 +++ nvidia-settings-418.56/debian/patches/11_link_as-needed.patch 2019-03-20 21:00:00.000000000 +0000 @@ -1,10 +1,10 @@ Author: Andreas Beckmann Description: link with -Wl,--as-needed to reduce library footprint -Index: nvidia-settings-415.27/utils.mk +Index: nvidia-settings-418.56/utils.mk =================================================================== ---- nvidia-settings-415.27.orig/utils.mk -+++ nvidia-settings-415.27/utils.mk +--- nvidia-settings-418.56.orig/utils.mk ++++ nvidia-settings-418.56/utils.mk @@ -42,6 +42,9 @@ CC_ONLY_CFLAGS ?= LDFLAGS ?= BIN_LDFLAGS ?= @@ -15,10 +15,10 @@ HOST_CC ?= $(CC) HOST_LD ?= $(LD) HOST_CFLAGS ?= $(CFLAGS) -Index: nvidia-settings-415.27/samples/Makefile +Index: nvidia-settings-418.56/samples/Makefile =================================================================== ---- nvidia-settings-415.27.orig/samples/Makefile -+++ nvidia-settings-415.27/samples/Makefile +--- nvidia-settings-418.56.orig/samples/Makefile ++++ nvidia-settings-418.56/samples/Makefile @@ -60,6 +60,8 @@ LDFLAGS += $(X_LDFLAGS) LDFLAGS += -L $(XNVCTRL_DIR) LIBS += -lXNVCtrl -lXext -lX11 diff -Nru nvidia-settings-418.43/debian/patches/16_gzip-n.patch nvidia-settings-418.56/debian/patches/16_gzip-n.patch --- nvidia-settings-418.43/debian/patches/16_gzip-n.patch 2018-12-12 21:19:14.000000000 +0000 +++ nvidia-settings-418.56/debian/patches/16_gzip-n.patch 2019-03-20 21:00:00.000000000 +0000 @@ -1,10 +1,10 @@ Author: Andreas Beckmann Description: use gzip -n to avoid package-contains-timestamped-gzip -Index: nvidia-settings-415.23/doc/Makefile +Index: nvidia-settings-418.56/doc/Makefile =================================================================== ---- nvidia-settings-415.23.orig/doc/Makefile -+++ nvidia-settings-415.23/doc/Makefile +--- nvidia-settings-418.56.orig/doc/Makefile ++++ nvidia-settings-418.56/doc/Makefile @@ -113,4 +113,4 @@ $(MANPAGE_not_gzipped): nvidia-settings. $< > $@ diff -Nru nvidia-settings-418.43/debian/patches/link-order.diff nvidia-settings-418.56/debian/patches/link-order.diff --- nvidia-settings-418.43/debian/patches/link-order.diff 2018-12-12 21:18:59.000000000 +0000 +++ nvidia-settings-418.56/debian/patches/link-order.diff 2019-03-20 21:00:00.000000000 +0000 @@ -4,10 +4,10 @@ drop now superfluous --no-as-needed flag fail on unresolved symbols -Index: nvidia-settings-415.23/src/Makefile +Index: nvidia-settings-418.56/src/Makefile =================================================================== ---- nvidia-settings-415.23.orig/src/Makefile -+++ nvidia-settings-415.23/src/Makefile +--- nvidia-settings-418.56.orig/src/Makefile ++++ nvidia-settings-418.56/src/Makefile @@ -49,7 +49,7 @@ ifndef GTK2_CFLAGS endif diff -Nru nvidia-settings-418.43/doc/version.mk nvidia-settings-418.56/doc/version.mk --- nvidia-settings-418.43/doc/version.mk 2019-02-19 07:54:55.000000000 +0000 +++ nvidia-settings-418.56/doc/version.mk 2019-03-15 17:56:18.000000000 +0000 @@ -1 +1 @@ -NVIDIA_VERSION = 418.43 +NVIDIA_VERSION = 418.56 diff -Nru nvidia-settings-418.43/samples/version.mk nvidia-settings-418.56/samples/version.mk --- nvidia-settings-418.43/samples/version.mk 2019-02-19 07:54:55.000000000 +0000 +++ nvidia-settings-418.56/samples/version.mk 2019-03-15 17:56:18.000000000 +0000 @@ -1 +1 @@ -NVIDIA_VERSION = 418.43 +NVIDIA_VERSION = 418.56 diff -Nru nvidia-settings-418.43/src/common-utils/msg.c nvidia-settings-418.56/src/common-utils/msg.c --- nvidia-settings-418.43/src/common-utils/msg.c 2019-02-19 07:54:55.000000000 +0000 +++ nvidia-settings-418.56/src/common-utils/msg.c 2019-03-15 17:56:18.000000000 +0000 @@ -20,6 +20,8 @@ * DEALINGS IN THE SOFTWARE. */ +#define _GNU_SOURCE // needed for fileno + #include #include #include @@ -88,16 +90,20 @@ static void format(FILE *stream, const char *prefix, const char *buf, const int whitespace) { - int i; - TextRows *t; + if (isatty(fileno(stream))) { + int i; + TextRows *t; - if (!__terminal_width) reset_current_terminal_width(0); + if (!__terminal_width) reset_current_terminal_width(0); - t = nv_format_text_rows(prefix, buf, __terminal_width, whitespace); + t = nv_format_text_rows(prefix, buf, __terminal_width, whitespace); - for (i = 0; i < t->n; i++) fprintf(stream, "%s\n", t->t[i]); + for (i = 0; i < t->n; i++) fprintf(stream, "%s\n", t->t[i]); - nv_free_text_rows(t); + nv_free_text_rows(t); + } else { + fprintf(stream, "%s%s\n", prefix ? prefix : "", buf); + } } diff -Nru nvidia-settings-418.43/src/libXNVCtrl/version.mk nvidia-settings-418.56/src/libXNVCtrl/version.mk --- nvidia-settings-418.43/src/libXNVCtrl/version.mk 2019-02-19 07:54:55.000000000 +0000 +++ nvidia-settings-418.56/src/libXNVCtrl/version.mk 2019-03-15 17:56:18.000000000 +0000 @@ -1 +1 @@ -NVIDIA_VERSION = 418.43 +NVIDIA_VERSION = 418.56 diff -Nru nvidia-settings-418.43/src/nvml.h nvidia-settings-418.56/src/nvml.h --- nvidia-settings-418.43/src/nvml.h 2019-02-19 07:54:56.000000000 +0000 +++ nvidia-settings-418.56/src/nvml.h 2019-03-15 17:56:19.000000000 +0000 @@ -6145,12 +6145,12 @@ /***************************************************************************************************/ /** - * Structure representing a range of vGPU version + * Structure representing range of vGPU versions. */ typedef struct nvmlVgpuVersion_st { - unsigned int minVersion; //!< Minimum vGPU version. - unsigned int maxVersion; //!< Maximum vGPU version. + unsigned int minVersion; //!< Minimum vGPU version. + unsigned int maxVersion; //!< Maximum vGPU version. } nvmlVgpuVersion_t; /** @@ -6292,41 +6292,62 @@ */ nvmlReturn_t DECLDIR nvmlGetVgpuCompatibility(nvmlVgpuMetadata_t *vgpuMetadata, nvmlVgpuPgpuMetadata_t *pgpuMetadata, nvmlVgpuPgpuCompatibility_t *compatibilityInfo); +/* + * Virtual GPU (vGPU) version + * + * The NVIDIA vGPU Manager and the guest drivers are tagged with a range of supported vGPU versions. This determines the range of NVIDIA guest driver versions that + * are compatible for vGPU feature support with a given NVIDIA vGPU Manager. For vGPU feature support, the range of supported versions for the NVIDIA vGPU Manager + * and the guest driver must overlap. Otherwise, the guest driver fails to load in the VM. + * + * When the NVIDIA guest driver loads, either when the VM is booted or when the driver is installed or upgraded, a negotiation occurs between the guest driver + * and the NVIDIA vGPU Manager to select the highest mutually compatible vGPU version. The negotiated vGPU version stays the same across VM migration. + */ + /** - * Returns the following two version range structures \ref nvmlVgpuVersion_t : - * 1. \a supported : structure representing the range of vGPU versions supported by the host; - * 2. \a current : structure representing the range of supported versions enforced by the caller via \ref nvmlSetVgpuVersion(). - * - * The caller pass in the pointer to the structures, into which the compatible ranges are written. + * Query the ranges of supported vGPU versions. + * + * This function gets the linear range of supported vGPU versions that is preset for the NVIDIA vGPU Manager and the range set by an administrator. + * If the preset range has not been overridden by \ref nvmlSetVgpuVersion, both ranges are the same. * - * @note: 1. The guest driver will fail to load if the version is below the range returned in the \a current structure. - * 2. If the guest driver is above the range, it will be downgraded to the current structure maximum version. + * The caller passes pointers to the following \ref nvmlVgpuVersion_t structures, into which the NVIDIA vGPU Manager writes the ranges: + * 1. \a supported structure that represents the preset range of vGPU versions supported by the NVIDIA vGPU Manager. + * 2. \a current structure that represents the range of supported vGPU versions set by an administrator. By default, this range is the same as the preset range. * - * @param supported Pointer to caller-supplied structure into which the supported vGPU version range is returned - * @param current Pointer to caller-supplied structure into which the caller enforced supported vGPU version range is returned. + * @param supported Pointer to the structure in which the preset range of vGPU versions supported by the NVIDIA vGPU Manager is written + * @param current Pointer to the structure in which the range of supported vGPU versions set by an administrator is written * * @return - * - \ref NVML_SUCCESS vGPU version range structure was successfully returned - * - \ref NVML_ERROR_NOT_SUPPORTED API not supported - * - \ref NVML_ERROR_UNKNOWN Error while getting the data + * - \ref NVML_SUCCESS The vGPU version range structures were successfully obtained. + * - \ref NVML_ERROR_NOT_SUPPORTED The API is not supported. + * - \ref NVML_ERROR_INVALID_ARGUMENT The \a supported parameter or the \a current parameter is NULL. + * - \ref NVML_ERROR_UNKNOWN An error occurred while the data was being fetched. */ nvmlReturn_t DECLDIR nvmlGetVgpuVersion(nvmlVgpuVersion_t *supported, nvmlVgpuVersion_t *current); /** - * Takes a vGPU version range structure \ref nvmlVgpuVersion_t and set the vGPU compatible version range to the one provided as input. - * The caller should call the \ref nvmlGetVgpuVersion() to get the range of supported version by the host driver. + * Override the preset range of vGPU versions supported by the NVIDIA vGPU Manager with a range set by an administrator. * - * @note: 1. The guest driver will fail to load if the version is below the range set via \a vgpuVersion structure. - * 2. If the guest driver is above the range, it will be downgraded to the \a vgpuVersion structure maximum version. - * 3. This will result error if there are VMs already active on the host or the supported range being set is outside the range supported by host driver. + * This function configures the NVIDIA vGPU Manager with a range of supported vGPU versions set by an administrator. This range must be a subset of the + * preset range that the NVIDIA vGPU Manager supports. The custom range set by an administrator takes precedence over the preset range and is advertised to + * the guest VM for negotiating the vGPU version. See \ref nvmlGetVgpuVersion for details of how to query the preset range of versions supported. * - * @param vgpuVersion Pointer to caller-supplied vGPU supported version range. + * This function takes a pointer to vGPU version range structure \ref nvmlVgpuVersion_t as input to override the preset vGPU version range that the NVIDIA vGPU Manager supports. + * + * After host system reboot or driver reload, the range of supported versions reverts to the range that is preset for the NVIDIA vGPU Manager. + * + * @note 1. The range set by the administrator must be a subset of the preset range that the NVIDIA vGPU Manager supports. Otherwise, an error is returned. + * 2. If the range of supported guest driver versions does not overlap the range set by the administrator, the guest driver fails to load. + * 3. If the range of supported guest driver versions overlaps the range set by the administrator, the guest driver will load with a negotiated + * vGPU version that is the maximum value in the overlapping range. + * 4. No VMs must be running on the host when this function is called. If a VM is running on the host, the call to this function fails. + * + * @param vgpuVersion Pointer to a caller-supplied range of supported vGPU versions. * * @return - * - \ref NVML_SUCCESS vGPU metadata structure was successfully returned - * - \ref NVML_ERROR_NOT_SUPPORTED API not supported - * - \ref NVML_ERROR_IN_USE Range not set as VM is running on the host - * - \ref NVML_ERROR_INVALID_ARGUMENT Range being set is outside the range supported by host driver + * - \ref NVML_SUCCESS The preset range of supported vGPU versions was successfully overridden. + * - \ref NVML_ERROR_NOT_SUPPORTED The API is not supported. + * - \ref NVML_ERROR_IN_USE The range was not overridden because a VM is running on the host. + * - \ref NVML_ERROR_INVALID_ARGUMENT The \a vgpuVersion parameter specifies a range that is outside the range supported by the NVIDIA vGPU Manager or if \a vgpuVersion is NULL. */ nvmlReturn_t DECLDIR nvmlSetVgpuVersion(nvmlVgpuVersion_t *vgpuVersion); diff -Nru nvidia-settings-418.43/src/version.h nvidia-settings-418.56/src/version.h --- nvidia-settings-418.43/src/version.h 2019-02-19 07:54:55.000000000 +0000 +++ nvidia-settings-418.56/src/version.h 2019-03-15 17:56:18.000000000 +0000 @@ -1 +1 @@ -#define NVIDIA_VERSION "418.43" +#define NVIDIA_VERSION "418.56" diff -Nru nvidia-settings-418.43/src/version.mk nvidia-settings-418.56/src/version.mk --- nvidia-settings-418.43/src/version.mk 2019-02-19 07:54:55.000000000 +0000 +++ nvidia-settings-418.56/src/version.mk 2019-03-15 17:56:18.000000000 +0000 @@ -1 +1 @@ -NVIDIA_VERSION = 418.43 +NVIDIA_VERSION = 418.56 diff -Nru nvidia-settings-418.43/version.mk nvidia-settings-418.56/version.mk --- nvidia-settings-418.43/version.mk 2019-02-19 07:54:55.000000000 +0000 +++ nvidia-settings-418.56/version.mk 2019-03-15 17:56:18.000000000 +0000 @@ -1 +1 @@ -NVIDIA_VERSION = 418.43 +NVIDIA_VERSION = 418.56