From bc8327955a86af6c3e073f64be5ebbc58a1473a6 Mon Sep 17 00:00:00 2001 From: guibuilder_pel7x64builder0 Date: Mon, 26 Nov 2018 15:19:08 +0100 Subject: [PATCH] gnome-settings-daemon package update Signed-off-by: guibuilder_pel7x64builder0 --- ...plugins-Work-around-startup-deadlock.patch | 136 +- ...-account-first-cut-at-account-plugin.patch | 373 ++--- ...-Add-a-GPU-memory-usage-notification.patch | 1333 ++++++++++------- ...ntil-smartcards-are-inspected-before.patch | 6 +- ...evert-sharing-Fix-function-arguments.patch | 80 +- ...the-notification-when-screen-unlocks.patch | 58 +- ...-a-smartcard-getting-removed-very-sh.patch | 6 +- ...se-systemd-to-track-running-services.patch | 158 +- ...ount-display-nag-screen-periodically.patch | 130 +- SOURCES/gnome-settings-daemon-python3.patch | 16 + ...ings-daemon.plugins.power.gschema.override | 3 + SPECS/gnome-settings-daemon.spec | 58 +- 12 files changed, 1377 insertions(+), 980 deletions(-) create mode 100644 SOURCES/gnome-settings-daemon-python3.patch create mode 100644 SOURCES/org.gnome.settings-daemon.plugins.power.gschema.override diff --git a/SOURCES/0001-Revert-Revert-plugins-Work-around-startup-deadlock.patch b/SOURCES/0001-Revert-Revert-plugins-Work-around-startup-deadlock.patch index c64a9ea..4ff8f8d 100644 --- a/SOURCES/0001-Revert-Revert-plugins-Work-around-startup-deadlock.patch +++ b/SOURCES/0001-Revert-Revert-plugins-Work-around-startup-deadlock.patch @@ -1,33 +1,46 @@ -From a89835db96703a861c14cc36211511ecfcb7d3d6 Mon Sep 17 00:00:00 2001 +From 3b383ffcb65dcd318cdb9c1bf3e039007e628ec3 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Wed, 11 Oct 2017 18:08:52 +0200 Subject: [PATCH 1/3] Revert "Revert "plugins: Work-around startup deadlock"" This reverts commit e0f230ce6124fac47bc0810d30ff78ec327152ca. --- - configure.ac | 2 +- plugins/common/daemon-skeleton-gtk.h | 4 ++++ plugins/common/daemon-skeleton.h | 4 ++++ - 3 files changed, 9 insertions(+), 1 deletion(-) + 2 files changed, 8 insertions(+) -diff --git a/configure.ac b/configure.ac -index c74ba250..3073017d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -42,7 +42,7 @@ dnl --------------------------------------------------------------------------- - dnl - Dependencies - dnl --------------------------------------------------------------------------- - --GLIB_REQUIRED_VERSION=2.53.0 -+GLIB_REQUIRED_VERSION=2.44.0 - GIO_REQUIRED_VERSION=${GLIB_REQUIRED_VERSION} - GTK_REQUIRED_VERSION=3.15.3 - GCONF_REQUIRED_VERSION=2.6.1 diff --git a/plugins/common/daemon-skeleton-gtk.h b/plugins/common/daemon-skeleton-gtk.h -index 27aade6c..46d0ed1a 100644 +index 2194b3d6..500ff3de 100644 --- a/plugins/common/daemon-skeleton-gtk.h +++ b/plugins/common/daemon-skeleton-gtk.h -@@ -199,6 +199,10 @@ main (int argc, char **argv) +@@ -172,60 +172,64 @@ set_empty_gtk_theme (gboolean set) + /* Override GTK_THEME to reduce overhead of CSS engine. By using + * GTK_THEME environment variable, GtkSettings is not allowed to + * initially parse the Adwaita theme. + * + * https://bugzilla.gnome.org/show_bug.cgi?id=780555 */ + old_gtk_theme = g_strdup (g_getenv ("GTK_THEME")); + g_setenv ("GTK_THEME", "Disabled", TRUE); + } else { + /* GtkSettings has loaded, so we can drop GTK_THEME used to initialize + * our internal theme. Only the main thread accesses the GTK_THEME + * environment variable, so this is safe to release. */ + if (old_gtk_theme != NULL) + g_setenv ("GTK_THEME", old_gtk_theme, TRUE); + else + g_unsetenv ("GTK_THEME"); + } + } + + int + main (int argc, char **argv) + { + GError *error; + + bindtextdomain (GETTEXT_PACKAGE, GNOME_SETTINGS_LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + setlocale (LC_ALL, ""); set_empty_gtk_theme (TRUE); @@ -38,11 +51,65 @@ index 27aade6c..46d0ed1a 100644 gdk_set_allowed_backends ("x11"); error = NULL; + if (! gtk_init_with_args (&argc, &argv, PLUGIN_NAME, entries, NULL, &error)) { + if (error != NULL) { + fprintf (stderr, "%s\n", error->message); + g_error_free (error); + } + exit (1); + } + + set_empty_gtk_theme (FALSE); + + if (verbose) { + g_setenv ("G_MESSAGES_DEBUG", "all", TRUE); + /* Work around GLib not flushing the output for us by explicitly + * setting buffering to a sane behaviour. This is important + * during testing when the output is not going to a TTY and + * we are reading messages from g_debug on stdout. + * + * See also + * https://bugzilla.gnome.org/show_bug.cgi?id=792432 + */ + setlinebuf (stdout); + } + + if (timeout > 0) { + guint id; + id = g_timeout_add_seconds (timeout, (GSourceFunc) gtk_main_quit, NULL); + g_source_set_name_by_id (id, "[gnome-settings-daemon] gtk_main_quit"); diff --git a/plugins/common/daemon-skeleton.h b/plugins/common/daemon-skeleton.h -index e4641fcc..cdd7bc2a 100644 +index 367ac1ec..83493ca1 100644 --- a/plugins/common/daemon-skeleton.h +++ b/plugins/common/daemon-skeleton.h -@@ -174,6 +174,10 @@ main (int argc, char **argv) +@@ -147,60 +147,64 @@ on_client_registered (GObject *source_object, + static void + register_with_gnome_session (GMainLoop *loop) + { + GDBusProxy *proxy; + const char *startup_id; + + proxy = G_DBUS_PROXY (gnome_settings_bus_get_session_proxy ()); + startup_id = g_getenv ("DESKTOP_AUTOSTART_ID"); + g_dbus_proxy_call (proxy, + "RegisterClient", + g_variant_new ("(ss)", dummy_name ? dummy_name : PLUGIN_NAME, startup_id ? startup_id : ""), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + (GAsyncReadyCallback) on_client_registered, + loop); + } + + int + main (int argc, char **argv) + { + GError *error = NULL; + GOptionContext *context; + GMainLoop *loop; + + bindtextdomain (GETTEXT_PACKAGE, GNOME_SETTINGS_LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); setlocale (LC_ALL, ""); @@ -53,6 +120,33 @@ index e4641fcc..cdd7bc2a 100644 context = g_option_context_new (NULL); g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE); if (!g_option_context_parse (context, &argc, &argv, &error)) { + fprintf (stderr, "%s\n", error->message); + g_error_free (error); + exit (1); + } + g_option_context_free (context); + + loop = g_main_loop_new (NULL, FALSE); + + if (verbose) { + g_setenv ("G_MESSAGES_DEBUG", "all", TRUE); + /* Work around GLib not flushing the output for us by explicitly + * setting buffering to a sane behaviour. This is important + * during testing when the output is not going to a TTY and + * we are reading messages from g_debug on stdout. + * + * See also + * https://bugzilla.gnome.org/show_bug.cgi?id=792432 + */ + setlinebuf (stdout); + } + + if (timeout > 0) { + guint id; + id = g_timeout_add_seconds (timeout, (GSourceFunc) g_main_loop_quit, loop); + g_source_set_name_by_id (id, "[gnome-settings-daemon] g_main_loop_quit"); + } + -- -2.13.5 +2.17.0 diff --git a/SOURCES/0001-account-first-cut-at-account-plugin.patch b/SOURCES/0001-account-first-cut-at-account-plugin.patch index 6705476..c495c52 100644 --- a/SOURCES/0001-account-first-cut-at-account-plugin.patch +++ b/SOURCES/0001-account-first-cut-at-account-plugin.patch @@ -1,4 +1,4 @@ -From 7816366e44e5bbf417cccfe0a7affad2f40db48f Mon Sep 17 00:00:00 2001 +From 26a5916ed00260399454a2df3942b4349d74a607 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 6 Nov 2017 14:43:46 -0500 Subject: [PATCH 1/3] account: first cut at account plugin @@ -9,25 +9,26 @@ Future commits will make it redisplay the notification after screen unlock and provide some configurability for regular nags. --- - configure.ac | 6 + - plugins/Makefile.am | 1 + - plugins/account/Makefile.am | 68 + - plugins/account/gsd-account-manager.c | 422 ++ - plugins/account/gsd-account-manager.h | 54 + - plugins/account/main.c | 7 + - plugins/account/org.freedesktop.Accounts.User.c | 6177 ++++++++++++++++++++ - plugins/account/org.freedesktop.Accounts.User.h | 725 +++ - plugins/account/org.freedesktop.Accounts.User.xml | 825 +++ - plugins/account/org.freedesktop.Accounts.c | 3017 ++++++++++ - plugins/account/org.freedesktop.Accounts.h | 400 ++ - plugins/account/org.freedesktop.Accounts.xml | 248 + - .../org.gnome.SettingsDaemon.Account.desktop | 9 + - .../org.gnome.SettingsDaemon.Account.desktop.in | 9 + - 14 files changed, 11968 insertions(+) + plugins/account/Makefile.am | 68 + + plugins/account/gsd-account-manager.c | 422 ++ + plugins/account/gsd-account-manager.h | 54 + + plugins/account/main.c | 7 + + plugins/account/meson.build | 39 + + .../account/org.freedesktop.Accounts.User.c | 6176 +++++++++++++++++ + .../account/org.freedesktop.Accounts.User.h | 725 ++ + .../account/org.freedesktop.Accounts.User.xml | 825 +++ + plugins/account/org.freedesktop.Accounts.c | 3016 ++++++++ + plugins/account/org.freedesktop.Accounts.h | 400 ++ + plugins/account/org.freedesktop.Accounts.xml | 248 + + .../org.gnome.SettingsDaemon.Account.desktop | 9 + + ...rg.gnome.SettingsDaemon.Account.desktop.in | 9 + + plugins/meson.build | 1 + + 14 files changed, 11999 insertions(+) create mode 100644 plugins/account/Makefile.am create mode 100644 plugins/account/gsd-account-manager.c create mode 100644 plugins/account/gsd-account-manager.h create mode 100644 plugins/account/main.c + create mode 100644 plugins/account/meson.build create mode 100644 plugins/account/org.freedesktop.Accounts.User.c create mode 100644 plugins/account/org.freedesktop.Accounts.User.h create mode 100644 plugins/account/org.freedesktop.Accounts.User.xml @@ -37,179 +38,6 @@ nags. create mode 100644 plugins/account/org.gnome.SettingsDaemon.Account.desktop create mode 100644 plugins/account/org.gnome.SettingsDaemon.Account.desktop.in -diff --git a/configure.ac b/configure.ac -index 3073017d..5bd742e5 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -128,60 +128,65 @@ dnl --------------------------------------------------------------------------- - dnl - Check for libwayland-client - dnl --------------------------------------------------------------------------- - AC_ARG_ENABLE(wayland, - AS_HELP_STRING([--disable-wayland],[Disable wayland support (default: auto)]), - enable_wayland=$enableval, enable_wayland=auto) - if test x$enable_wayland != xno; then - PKG_CHECK_MODULES(WAYLAND, wayland-client, have_wayland=yes, have_wayland=no) - if test x$have_wayland = xyes; then - AC_DEFINE(HAVE_WAYLAND, 1, [Define if libwayland-client is available]) - else - if test x$enable_wayland = xyes; then - AC_MSG_ERROR([Wayland enabled but not found]) - fi - fi - fi - - dnl ================================================================ - dnl Plugins - dnl ================================================================ - - PKG_CHECK_MODULES(A11Y_KEYBOARD, - gtk+-3.0 - libnotify >= $LIBNOTIFY_REQUIRED_VERSION - gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED_VERSION - x11) - - PKG_CHECK_MODULES(A11Y_SETTINGS, - gio-2.0 - gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED_VERSION) - -+PKG_CHECK_MODULES(ACCOUNT, -+ gtk+-3.0 -+ gio-unix-2.0 -+ libnotify >= $LIBNOTIFY_REQUIRED_VERSION) -+ - PKG_CHECK_MODULES(CLIPBOARD, - gtk+-x11-3.0 - x11) - - PKG_CHECK_MODULES(COLOR, - colord >= 1.0.2 - gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION - libcanberra-gtk3 - libgeoclue-2.0 >= $GEOCLUE_REQUIRED_VERSION - lcms2 >= $LCMS_REQUIRED_VERSION - libnotify) - - PKG_CHECK_MODULES(DATETIME, - libnotify >= $LIBNOTIFY_REQUIRED_VERSION - libgeoclue-2.0 >= $GEOCLUE_REQUIRED_VERSION - geocode-glib-1.0 >= $GEOCODE_GLIB_REQUIRED_VERSION - gweather-3.0 >= $LIBGWEATHER_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION) - - PKG_CHECK_MODULES(DUMMY, - gio-2.0 - glib-2.0) - - PKG_CHECK_MODULES(HOUSEKEEPING, - gtk+-3.0 - gio-unix-2.0 - libnotify >= $LIBNOTIFY_REQUIRED_VERSION) - - PKG_CHECK_MODULES(KEYBOARD, - gtk+-3.0) -@@ -480,60 +485,61 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then - unset SAVE_CFLAGS - done - unset option - else - AC_MSG_RESULT(no) - fi - - # - # Enable Debug - # - AC_ARG_ENABLE(debug, - [AS_HELP_STRING([--enable-debug],[turn on debugging])], - , enable_debug=yes) - if test "$enable_debug" = "yes"; then - DEBUG_CFLAGS="-DG_ENABLE_DEBUG" - else - if test "x$enable_debug" = "xno"; then - DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS" - else - DEBUG_CFLAGS="" - fi - fi - AC_SUBST(DEBUG_CFLAGS) - - AC_CONFIG_FILES([ - Makefile - gnome-settings-daemon/Makefile - plugins/Makefile - plugins/a11y-keyboard/Makefile - plugins/a11y-settings/Makefile -+plugins/account/Makefile - plugins/clipboard/Makefile - plugins/color/Makefile - plugins/common/Makefile - plugins/datetime/Makefile - plugins/dummy/Makefile - plugins/power/Makefile - plugins/housekeeping/Makefile - plugins/keyboard/Makefile - plugins/media-keys/Makefile - plugins/media-keys/gvc/Makefile - plugins/mouse/Makefile - plugins/print-notifications/Makefile - plugins/rfkill/Makefile - plugins/screensaver-proxy/Makefile - plugins/sharing/Makefile - plugins/smartcard/Makefile - plugins/sound/Makefile - plugins/wacom/Makefile - plugins/xsettings/Makefile - data/Makefile - data/gnome-settings-daemon.pc - data/org.gnome.settings-daemon.plugins.gschema.xml.in - data/org.gnome.settings-daemon.plugins.xsettings.gschema.xml.in - data/org.gnome.settings-daemon.plugins.power.gschema.xml.in - data/org.gnome.settings-daemon.plugins.color.gschema.xml.in - data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in - data/org.gnome.settings-daemon.peripherals.gschema.xml.in - data/org.gnome.settings-daemon.plugins.housekeeping.gschema.xml.in - data/org.gnome.settings-daemon.plugins.sharing.gschema.xml.in - data/org.gnome.settings-daemon.peripherals.wacom.gschema.xml.in -diff --git a/plugins/Makefile.am b/plugins/Makefile.am -index 6de38f07..1f25b04a 100644 ---- a/plugins/Makefile.am -+++ b/plugins/Makefile.am -@@ -1,35 +1,36 @@ - NULL = - - enabled_plugins = \ - a11y-keyboard \ - a11y-settings \ -+ account \ - clipboard \ - color \ - datetime \ - dummy \ - power \ - housekeeping \ - keyboard \ - media-keys \ - mouse \ - screensaver-proxy \ - sharing \ - sound \ - xsettings \ - $(NULL) - - disabled_plugins = $(NULL) - - if SMARTCARD_SUPPORT - enabled_plugins += smartcard - else - disabled_plugins += smartcard - endif - - if HAVE_WACOM - enabled_plugins += wacom - else - disabled_plugins += wacom - endif - - if BUILD_PRINT_NOTIFICATIONS diff --git a/plugins/account/Makefile.am b/plugins/account/Makefile.am new file mode 100644 index 00000000..e06abcf5 @@ -286,7 +114,7 @@ index 00000000..e06abcf5 +DISTCLEANFILES = $(desktop_DATA) diff --git a/plugins/account/gsd-account-manager.c b/plugins/account/gsd-account-manager.c new file mode 100644 -index 00000000..642d5bcc +index 00000000..40b91cb6 --- /dev/null +++ b/plugins/account/gsd-account-manager.c @@ -0,0 +1,422 @@ @@ -785,12 +613,57 @@ index 00000000..9b854f65 +#include "gsd-account-manager.h" + +#include "daemon-skeleton.h" +diff --git a/plugins/account/meson.build b/plugins/account/meson.build +new file mode 100644 +index 00000000..c70ac36e +--- /dev/null ++++ b/plugins/account/meson.build +@@ -0,0 +1,39 @@ ++sources = files( ++ 'gsd-account-manager.c', ++ 'main.c' ++) ++ ++sources += gnome.gdbus_codegen( ++ 'org.freedesktop.Accounts', ++ 'org.freedesktop.Accounts.xml', ++ interface_prefix: 'org.freedesktop.', ++ namespace: 'Gsd', ++ object_manager: false, ++ annotations: ['org.freedesktop.Accounts', 'org.gtk.GDBus.C.Name', 'Accounts'] ++) ++ ++sources += gnome.gdbus_codegen( ++ 'org.freedesktop.Accounts.User', ++ 'org.freedesktop.Accounts.User.xml', ++ interface_prefix: 'org.freedesktop.', ++ namespace: 'Gsd', ++ object_manager: false, ++ annotations: ['org.freedesktop.Accounts.User', 'org.gtk.GDBus.C.Name', 'AccountsUser'] ++) ++ ++deps = plugins_deps + [ ++ gio_unix_dep, ++ libnotify_dep, ++ nss_dep ++] ++ ++executable( ++ 'gsd-' + plugin_name, ++ sources, ++ include_directories: [top_inc, common_inc], ++ dependencies: deps, ++ c_args: cflags, ++ install: true, ++ install_rpath: gsd_pkglibdir, ++ install_dir: gsd_libexecdir ++) diff --git a/plugins/account/org.freedesktop.Accounts.User.c b/plugins/account/org.freedesktop.Accounts.User.c new file mode 100644 -index 00000000..035eb7a4 +index 00000000..3b18d185 --- /dev/null +++ b/plugins/account/org.freedesktop.Accounts.User.c -@@ -0,0 +1,6177 @@ +@@ -0,0 +1,6176 @@ +/* + * Generated by gdbus-codegen 2.54.1. DO NOT EDIT. + * @@ -2766,7 +2639,7 @@ index 00000000..035eb7a4 + * + * Returns: The property value. + */ -+guint64 ++guint64 +gsd_accounts_user_get_uid (GsdAccountsUser *object) +{ + return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_uid (object); @@ -2899,7 +2772,7 @@ index 00000000..035eb7a4 + * + * Returns: The property value. + */ -+gint ++gint +gsd_accounts_user_get_account_type (GsdAccountsUser *object) +{ + return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_account_type (object); @@ -3236,7 +3109,7 @@ index 00000000..035eb7a4 + * + * Returns: The property value. + */ -+guint64 ++guint64 +gsd_accounts_user_get_login_frequency (GsdAccountsUser *object) +{ + return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_login_frequency (object); @@ -3267,7 +3140,7 @@ index 00000000..035eb7a4 + * + * Returns: The property value. + */ -+gint64 ++gint64 +gsd_accounts_user_get_login_time (GsdAccountsUser *object) +{ + return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_login_time (object); @@ -3400,7 +3273,7 @@ index 00000000..035eb7a4 + * + * Returns: The property value. + */ -+gboolean ++gboolean +gsd_accounts_user_get_locked (GsdAccountsUser *object) +{ + return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_locked (object); @@ -3431,7 +3304,7 @@ index 00000000..035eb7a4 + * + * Returns: The property value. + */ -+gint ++gint +gsd_accounts_user_get_password_mode (GsdAccountsUser *object) +{ + return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_password_mode (object); @@ -3513,7 +3386,7 @@ index 00000000..035eb7a4 + * + * Returns: The property value. + */ -+gboolean ++gboolean +gsd_accounts_user_get_automatic_login (GsdAccountsUser *object) +{ + return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_automatic_login (object); @@ -3544,7 +3417,7 @@ index 00000000..035eb7a4 + * + * Returns: The property value. + */ -+gboolean ++gboolean +gsd_accounts_user_get_system_account (GsdAccountsUser *object) +{ + return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_system_account (object); @@ -3575,7 +3448,7 @@ index 00000000..035eb7a4 + * + * Returns: The property value. + */ -+gboolean ++gboolean +gsd_accounts_user_get_local_account (GsdAccountsUser *object) +{ + return GSD_ACCOUNTS_USER_GET_IFACE (object)->get_local_account (object); @@ -5596,7 +5469,7 @@ index 00000000..035eb7a4 + if (!_ret) + { + g_warning ("Error setting property '%s' on interface org.freedesktop.Accounts.User: %s (%s, %d)", -+ info->parent_struct.name, ++ info->parent_struct.name, + error->message, g_quark_to_string (error->domain), error->code); + g_error_free (error); + } @@ -5696,7 +5569,7 @@ index 00000000..035eb7a4 + } +} + -+static guint64 ++static guint64 +gsd_accounts_user_proxy_get_uid (GsdAccountsUser *object) +{ + GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); @@ -5741,7 +5614,7 @@ index 00000000..035eb7a4 + return value; +} + -+static gint ++static gint +gsd_accounts_user_proxy_get_account_type (GsdAccountsUser *object) +{ + GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); @@ -5846,7 +5719,7 @@ index 00000000..035eb7a4 + return value; +} + -+static guint64 ++static guint64 +gsd_accounts_user_proxy_get_login_frequency (GsdAccountsUser *object) +{ + GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); @@ -5861,7 +5734,7 @@ index 00000000..035eb7a4 + return value; +} + -+static gint64 ++static gint64 +gsd_accounts_user_proxy_get_login_time (GsdAccountsUser *object) +{ + GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); @@ -5904,7 +5777,7 @@ index 00000000..035eb7a4 + return value; +} + -+static gboolean ++static gboolean +gsd_accounts_user_proxy_get_locked (GsdAccountsUser *object) +{ + GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); @@ -5919,7 +5792,7 @@ index 00000000..035eb7a4 + return value; +} + -+static gint ++static gint +gsd_accounts_user_proxy_get_password_mode (GsdAccountsUser *object) +{ + GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); @@ -5949,7 +5822,7 @@ index 00000000..035eb7a4 + return value; +} + -+static gboolean ++static gboolean +gsd_accounts_user_proxy_get_automatic_login (GsdAccountsUser *object) +{ + GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); @@ -5964,7 +5837,7 @@ index 00000000..035eb7a4 + return value; +} + -+static gboolean ++static gboolean +gsd_accounts_user_proxy_get_system_account (GsdAccountsUser *object) +{ + GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); @@ -5979,7 +5852,7 @@ index 00000000..035eb7a4 + return value; +} + -+static gboolean ++static gboolean +gsd_accounts_user_proxy_get_local_account (GsdAccountsUser *object) +{ + GsdAccountsUserProxy *proxy = GSD_ACCOUNTS_USER_PROXY (object); @@ -6683,7 +6556,7 @@ index 00000000..035eb7a4 + g_value_init (&skeleton->priv->properties[19], G_TYPE_BOOLEAN); +} + -+static guint64 ++static guint64 +gsd_accounts_user_skeleton_get_uid (GsdAccountsUser *object) +{ + GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); @@ -6716,7 +6589,7 @@ index 00000000..035eb7a4 + return value; +} + -+static gint ++static gint +gsd_accounts_user_skeleton_get_account_type (GsdAccountsUser *object) +{ + GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); @@ -6793,7 +6666,7 @@ index 00000000..035eb7a4 + return value; +} + -+static guint64 ++static guint64 +gsd_accounts_user_skeleton_get_login_frequency (GsdAccountsUser *object) +{ + GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); @@ -6804,7 +6677,7 @@ index 00000000..035eb7a4 + return value; +} + -+static gint64 ++static gint64 +gsd_accounts_user_skeleton_get_login_time (GsdAccountsUser *object) +{ + GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); @@ -6837,7 +6710,7 @@ index 00000000..035eb7a4 + return value; +} + -+static gboolean ++static gboolean +gsd_accounts_user_skeleton_get_locked (GsdAccountsUser *object) +{ + GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); @@ -6848,7 +6721,7 @@ index 00000000..035eb7a4 + return value; +} + -+static gint ++static gint +gsd_accounts_user_skeleton_get_password_mode (GsdAccountsUser *object) +{ + GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); @@ -6870,7 +6743,7 @@ index 00000000..035eb7a4 + return value; +} + -+static gboolean ++static gboolean +gsd_accounts_user_skeleton_get_automatic_login (GsdAccountsUser *object) +{ + GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); @@ -6881,7 +6754,7 @@ index 00000000..035eb7a4 + return value; +} + -+static gboolean ++static gboolean +gsd_accounts_user_skeleton_get_system_account (GsdAccountsUser *object) +{ + GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); @@ -6892,7 +6765,7 @@ index 00000000..035eb7a4 + return value; +} + -+static gboolean ++static gboolean +gsd_accounts_user_skeleton_get_local_account (GsdAccountsUser *object) +{ + GsdAccountsUserSkeleton *skeleton = GSD_ACCOUNTS_USER_SKELETON (object); @@ -6967,7 +6840,6 @@ index 00000000..035eb7a4 +{ + return GSD_ACCOUNTS_USER (g_object_new (GSD_TYPE_ACCOUNTS_USER_SKELETON, NULL)); +} -+ diff --git a/plugins/account/org.freedesktop.Accounts.User.h b/plugins/account/org.freedesktop.Accounts.User.h new file mode 100644 index 00000000..f5a0ca0f @@ -8532,10 +8404,10 @@ index 00000000..4ab989a0 + diff --git a/plugins/account/org.freedesktop.Accounts.c b/plugins/account/org.freedesktop.Accounts.c new file mode 100644 -index 00000000..d5d11f5d +index 00000000..669c43a8 --- /dev/null +++ b/plugins/account/org.freedesktop.Accounts.c -@@ -0,0 +1,3017 @@ +@@ -0,0 +1,3016 @@ +/* + * Generated by gdbus-codegen 2.54.1. DO NOT EDIT. + * @@ -9617,7 +9489,7 @@ index 00000000..d5d11f5d + * + * Returns: The property value. + */ -+gboolean ++gboolean +gsd_accounts_get_has_no_users (GsdAccounts *object) +{ + return GSD_ACCOUNTS_GET_IFACE (object)->get_has_no_users (object); @@ -9648,7 +9520,7 @@ index 00000000..d5d11f5d + * + * Returns: The property value. + */ -+gboolean ++gboolean +gsd_accounts_get_has_multiple_users (GsdAccounts *object) +{ + return GSD_ACCOUNTS_GET_IFACE (object)->get_has_multiple_users (object); @@ -10645,7 +10517,7 @@ index 00000000..d5d11f5d + if (!_ret) + { + g_warning ("Error setting property '%s' on interface org.freedesktop.Accounts: %s (%s, %d)", -+ info->parent_struct.name, ++ info->parent_struct.name, + error->message, g_quark_to_string (error->domain), error->code); + g_error_free (error); + } @@ -10760,7 +10632,7 @@ index 00000000..d5d11f5d + return value; +} + -+static gboolean ++static gboolean +gsd_accounts_proxy_get_has_no_users (GsdAccounts *object) +{ + GsdAccountsProxy *proxy = GSD_ACCOUNTS_PROXY (object); @@ -10775,7 +10647,7 @@ index 00000000..d5d11f5d + return value; +} + -+static gboolean ++static gboolean +gsd_accounts_proxy_get_has_multiple_users (GsdAccounts *object) +{ + GsdAccountsProxy *proxy = GSD_ACCOUNTS_PROXY (object); @@ -11482,7 +11354,7 @@ index 00000000..d5d11f5d + return value; +} + -+static gboolean ++static gboolean +gsd_accounts_skeleton_get_has_no_users (GsdAccounts *object) +{ + GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_SKELETON (object); @@ -11493,7 +11365,7 @@ index 00000000..d5d11f5d + return value; +} + -+static gboolean ++static gboolean +gsd_accounts_skeleton_get_has_multiple_users (GsdAccounts *object) +{ + GsdAccountsSkeleton *skeleton = GSD_ACCOUNTS_SKELETON (object); @@ -11552,7 +11424,6 @@ index 00000000..d5d11f5d +{ + return GSD_ACCOUNTS (g_object_new (GSD_TYPE_ACCOUNTS_SKELETON, NULL)); +} -+ diff --git a/plugins/account/org.freedesktop.Accounts.h b/plugins/account/org.freedesktop.Accounts.h new file mode 100644 index 00000000..b8d0625e @@ -12243,6 +12114,44 @@ index 00000000..1a8ded7d +X-GNOME-Autostart-Phase=Initialization +X-GNOME-Autostart-Notify=true +X-GNOME-AutoRestart=true +diff --git a/plugins/meson.build b/plugins/meson.build +index 3db69da7..3c4d42ac 100644 +--- a/plugins/meson.build ++++ b/plugins/meson.build +@@ -1,32 +1,33 @@ + enabled_plugins = [ + ['a11y-settings', 'A11ySettings'], ++ ['account', 'Account'], + ['clipboard', 'Clipboard'], + ['color', 'Color'], + ['datetime', 'Datetime'], + ['dummy', ''], + ['power', 'Power'], + ['housekeeping', 'Housekeeping'], + ['keyboard', 'Keyboard'], + ['media-keys', 'MediaKeys'], + ['mouse', 'Mouse'], + ['screensaver-proxy', 'ScreensaverProxy'], + ['sharing', 'Sharing'], + ['sound', 'Sound'], + ['xsettings', 'XSettings'] + ] + + if enable_smartcard + enabled_plugins += [['smartcard', 'Smartcard']] + endif + + if enable_wacom + enabled_plugins += [['wacom', 'Wacom']] + endif + + if enable_cups + enabled_plugins += [['print-notifications', 'PrintNotifications']] + endif + + if enable_rfkill + enabled_plugins += [['rfkill', 'Rfkill']] + endif -- -2.14.2 +2.17.0 diff --git a/SOURCES/0001-housekeeping-Add-a-GPU-memory-usage-notification.patch b/SOURCES/0001-housekeeping-Add-a-GPU-memory-usage-notification.patch index 079bb43..d1f2bda 100644 --- a/SOURCES/0001-housekeeping-Add-a-GPU-memory-usage-notification.patch +++ b/SOURCES/0001-housekeeping-Add-a-GPU-memory-usage-notification.patch @@ -1,4 +1,4 @@ -From 9f5afbaa94f7a6b466d0bfb2be257187cfc4cc18 Mon Sep 17 00:00:00 2001 +From cacaa4836243264b1d8be579eed591a7dbe10d5f Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Thu, 31 Aug 2017 17:32:43 +0200 Subject: [PATCH] housekeeping: Add a GPU memory usage notification @@ -6,62 +6,83 @@ Subject: [PATCH] housekeeping: Add a GPU memory usage notification Only works on supported nvidia GPUs and nvidia binary driver combinations. --- - plugins/housekeeping/Makefile.am | 10 +- - plugins/housekeeping/gsd-gpu-mem.c | 261 ++ - plugins/housekeeping/gsd-gpu-mem.h | 33 + - plugins/housekeeping/gsd-housekeeping-manager.c | 7 + - plugins/housekeeping/nvml/include/nvml.h | 4447 +++++++++++++++++++++++ - 5 files changed, 4754 insertions(+), 4 deletions(-) + meson.build | 1 + + plugins/housekeeping/gsd-gpu-mem.c | 261 + + plugins/housekeeping/gsd-gpu-mem.h | 33 + + .../housekeeping/gsd-housekeeping-manager.c | 7 + + plugins/housekeeping/meson.build | 7 +- + plugins/housekeeping/nvml/include/nvml.h | 4447 +++++++++++++++++ + 6 files changed, 4754 insertions(+), 2 deletions(-) create mode 100644 plugins/housekeeping/gsd-gpu-mem.c create mode 100644 plugins/housekeeping/gsd-gpu-mem.h create mode 100644 plugins/housekeeping/nvml/include/nvml.h -diff --git a/plugins/housekeeping/Makefile.am b/plugins/housekeeping/Makefile.am -index 3841edf4..b01666ca 100644 ---- a/plugins/housekeeping/Makefile.am -+++ b/plugins/housekeeping/Makefile.am -@@ -1,6 +1,8 @@ - plugin_name = housekeeping +diff --git a/meson.build b/meson.build +index 5c66be4d..6067ec2e 100644 +--- a/meson.build ++++ b/meson.build +@@ -76,60 +76,61 @@ endif - COMMON_FILES = \ -+ gsd-gpu-mem.c \ -+ gsd-gpu-mem.h \ - gsd-disk-space.c \ - gsd-disk-space.h \ - gsd-disk-space-helper.h \ -@@ -11,20 +13,20 @@ noinst_PROGRAMS = gsd-disk-space-test gsd-empty-trash-test gsd-purge-temp-test - gsd_disk_space_test_SOURCES = \ - gsd-disk-space-test.c \ - $(COMMON_FILES) --gsd_disk_space_test_LDADD = $(HOUSEKEEPING_LIBS) -+gsd_disk_space_test_LDADD = $(HOUSEKEEPING_LIBS) -lm -ldl - gsd_disk_space_test_CFLAGS = \ - $(HOUSEKEEPING_CFLAGS) + # Workaround for meson's bug + # https://github.com/mesonbuild/meson/pull/1896 + if get_option('b_ndebug') == true + common_flags += ['-DG_DISABLE_ASSERT'] + endif - gsd_empty_trash_test_SOURCES = \ - gsd-empty-trash-test.c \ - $(COMMON_FILES) --gsd_empty_trash_test_LDADD = $(HOUSEKEEPING_LIBS) -+gsd_empty_trash_test_LDADD = $(HOUSEKEEPING_LIBS) -lm -ldl - gsd_empty_trash_test_CFLAGS = $(HOUSEKEEPING_CFLAGS) + add_project_arguments(common_flags + compiler_flags, language: 'c') - gsd_purge_temp_test_SOURCES = \ - gsd-purge-temp-test.c \ - $(COMMON_FILES) --gsd_purge_temp_test_LDADD = $(HOUSEKEEPING_LIBS) -+gsd_purge_temp_test_LDADD = $(HOUSEKEEPING_LIBS) -lm -ldl - gsd_purge_temp_test_CFLAGS = $(HOUSEKEEPING_CFLAGS) + colord_dep = dependency('colord', version: '>= 1.0.2') + geocode_glib_dep = dependency('geocode-glib-1.0', version: '>= 3.10.0') + gio_dep = dependency('gio-2.0', version: '>= 2.53.0') + gio_unix_dep = dependency('gio-unix-2.0') + gnome_desktop_dep = dependency('gnome-desktop-3.0', version: '>= 3.11.1') + gsettings_desktop_dep = dependency('gsettings-desktop-schemas', version: '>= 3.23.3') + gtk_dep = dependency('gtk+-3.0', version: '>= 3.15.3') + gtk_x11_dep = dependency('gtk+-x11-3.0') + gweather_dep = dependency('gweather-3.0', version: '>= 3.9.5') + lcms_dep = dependency('lcms2', version: '>= 2.2') + libcanberra_gtk_dep = dependency('libcanberra-gtk3') + libgeoclue_dep = dependency('libgeoclue-2.0', version: '>= 2.3.1') + libnotify_dep = dependency('libnotify', version: '>= 0.7.3') + libpulse_mainloop_glib_dep = dependency('libpulse-mainloop-glib', version: '>= 2.0') + pango_dep = dependency('pango', version: '>= 1.20.0') + polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.103') + upower_glib_dep = dependency('upower-glib', version: '>= 0.99.0') + x11_dep = dependency('x11') + xtst_dep = dependency('xtst') - libexec_PROGRAMS = gsd-housekeeping -@@ -51,7 +53,7 @@ gsd_housekeeping_CFLAGS = \ - gsd_housekeeping_LDADD = \ - $(top_builddir)/gnome-settings-daemon/libgsd.la \ - $(top_builddir)/plugins/common/libcommon.la \ -- $(HOUSEKEEPING_LIBS) -+ $(HOUSEKEEPING_LIBS) -lm -ldl + m_dep = cc.find_library('m') ++dl_dep = cc.find_library('dl') + + # ALSA integration (default enabled) + enable_alsa = get_option('alsa') + assert(enable_alsa or not host_is_linux, 'ALSA is not optional on Linux platforms') + + libgvc = subproject( + 'gvc', + default_options: [ + 'static=true', + 'alsa=' + enable_alsa.to_string() + ] + ) + libgvc_dep = libgvc.get_variable('libgvc_dep') + + # GUdev integration (default enabled) + enable_gudev = get_option('gudev') + if enable_gudev + assert(enable_gudev, 'GUdev is not optional on Linux platforms') + gudev_dep = dependency('gudev-1.0') + endif + config_h.set('HAVE_GUDEV', enable_gudev) + + # Check for libwayland-client + enable_wayland = get_option('wayland') + if enable_wayland + assert(enable_gudev, 'GUDev support is required for wayland support.') + wayland_client_dep = dependency('wayland-client') + endif + config_h.set10('HAVE_WAYLAND', enable_wayland) - desktopdir = $(sysconfdir)/xdg/autostart - desktop_in_files = org.gnome.SettingsDaemon.Housekeeping.desktop.in diff --git a/plugins/housekeeping/gsd-gpu-mem.c b/plugins/housekeeping/gsd-gpu-mem.c new file mode 100644 index 00000000..a76579b6 @@ -372,7 +393,32 @@ diff --git a/plugins/housekeeping/gsd-housekeeping-manager.c b/plugins/housekeep index 2c94e35d..5efb0aaa 100644 --- a/plugins/housekeeping/gsd-housekeeping-manager.c +++ b/plugins/housekeeping/gsd-housekeeping-manager.c -@@ -26,6 +26,7 @@ +@@ -1,89 +1,92 @@ + /* + * Copyright (C) 2008 Michael J. Chudobiak + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + */ + + #include "config.h" + + #include + #include + #include + #include + #include "gnome-settings-profile.h" #include "gsd-housekeeping-manager.h" #include "gsd-disk-space.h" @@ -380,7 +426,31 @@ index 2c94e35d..5efb0aaa 100644 /* General */ -@@ -57,6 +58,8 @@ struct GsdHousekeepingManagerPrivate { + #define INTERVAL_ONCE_A_DAY 24*60*60 + #define INTERVAL_TWO_MINUTES 2*60 + + /* Thumbnail cleaner */ + #define THUMB_PREFIX "org.gnome.desktop.thumbnail-cache" + + #define THUMB_AGE_KEY "maximum-age" + #define THUMB_SIZE_KEY "maximum-size" + + #define GSD_HOUSEKEEPING_DBUS_PATH "/org/gnome/SettingsDaemon/Housekeeping" + + static const gchar introspection_xml[] = + "" + " " + " " + " " + " " + ""; + + struct GsdHousekeepingManagerPrivate { + GSettings *settings; + guint long_term_cb; + guint short_term_cb; + + GDBusNodeInfo *introspection_data; GDBusConnection *connection; GCancellable *bus_cancellable; guint name_id; @@ -389,7 +459,61 @@ index 2c94e35d..5efb0aaa 100644 }; #define GSD_HOUSEKEEPING_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_HOUSEKEEPING_MANAGER, GsdHousekeepingManagerPrivate)) -@@ -411,6 +414,8 @@ gsd_housekeeping_manager_start (GsdHousekeepingManager *manager, + + static void gsd_housekeeping_manager_class_init (GsdHousekeepingManagerClass *klass); + static void gsd_housekeeping_manager_init (GsdHousekeepingManager *housekeeping_manager); + + G_DEFINE_TYPE (GsdHousekeepingManager, gsd_housekeeping_manager, G_TYPE_OBJECT) + + static gpointer manager_object = NULL; + + + typedef struct { + glong now; + glong max_age; + goffset total_size; + goffset max_size; + } PurgeData; + + + typedef struct { + time_t mtime; + char *path; + glong size; + } ThumbData; + + + static void + thumb_data_free (gpointer data) + { +@@ -384,101 +387,105 @@ gsd_housekeeping_manager_start (GsdHousekeepingManager *manager, + { + gchar *dir; + + g_debug ("Starting housekeeping manager"); + gnome_settings_profile_start (NULL); + + /* Create ~/.local/ as early as possible */ + (void) g_mkdir_with_parents(g_get_user_data_dir (), 0700); + + /* Create ~/.local/share/applications/, see + * https://bugzilla.gnome.org/show_bug.cgi?id=703048 */ + dir = g_build_filename (g_get_user_data_dir (), "applications", NULL); + (void) g_mkdir (dir, 0700); + g_free (dir); + + gsd_ldsm_setup (FALSE); + + manager->priv->settings = g_settings_new (THUMB_PREFIX); + g_signal_connect (G_OBJECT (manager->priv->settings), "changed", + G_CALLBACK (settings_changed_callback), manager); + + /* Clean once, a few minutes after start-up */ + do_cleanup_soon (manager); + + /* Clean periodically, on a daily basis. */ + manager->priv->long_term_cb = g_timeout_add_seconds (INTERVAL_ONCE_A_DAY, + (GSourceFunc) do_cleanup, manager); g_source_set_name_by_id (manager->priv->long_term_cb, "[gnome-settings-daemon] do_cleanup"); @@ -398,7 +522,41 @@ index 2c94e35d..5efb0aaa 100644 gnome_settings_profile_end (NULL); return TRUE; -@@ -452,6 +457,8 @@ gsd_housekeeping_manager_stop (GsdHousekeepingManager *manager) + } + + void + gsd_housekeeping_manager_stop (GsdHousekeepingManager *manager) + { + GsdHousekeepingManagerPrivate *p = manager->priv; + + g_debug ("Stopping housekeeping manager"); + + if (manager->priv->name_id != 0) { + g_bus_unown_name (manager->priv->name_id); + manager->priv->name_id = 0; + } + + g_clear_object (&p->bus_cancellable); + g_clear_pointer (&p->introspection_data, g_dbus_node_info_unref); + g_clear_object (&p->connection); + + if (p->short_term_cb) { + g_source_remove (p->short_term_cb); + p->short_term_cb = 0; + } + + if (p->long_term_cb) { + g_source_remove (p->long_term_cb); + p->long_term_cb = 0; + + /* Do a clean-up on shutdown if and only if the size or age + limits have been set to paranoid levels (zero) */ + if ((g_settings_get_int (p->settings, THUMB_AGE_KEY) == 0) || + (g_settings_get_int (p->settings, THUMB_SIZE_KEY) == 0)) { + do_cleanup (manager); + } + + } g_clear_object (&p->settings); gsd_ldsm_clean (); @@ -407,51 +565,128 @@ index 2c94e35d..5efb0aaa 100644 } static void + gsd_housekeeping_manager_finalize (GObject *object) + { + gsd_housekeeping_manager_stop (GSD_HOUSEKEEPING_MANAGER (object)); + + G_OBJECT_CLASS (gsd_housekeeping_manager_parent_class)->finalize (object); + } + + static void + gsd_housekeeping_manager_class_init (GsdHousekeepingManagerClass *klass) + { + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = gsd_housekeeping_manager_finalize; + + notify_init ("gnome-settings-daemon"); + + g_type_class_add_private (klass, sizeof (GsdHousekeepingManagerPrivate)); + } + + static void + gsd_housekeeping_manager_init (GsdHousekeepingManager *manager) + { + manager->priv = GSD_HOUSEKEEPING_MANAGER_GET_PRIVATE (manager); + } + + GsdHousekeepingManager * + gsd_housekeeping_manager_new (void) +diff --git a/plugins/housekeeping/meson.build b/plugins/housekeeping/meson.build +index 5ac2455e..8582d10c 100644 +--- a/plugins/housekeeping/meson.build ++++ b/plugins/housekeeping/meson.build +@@ -1,40 +1,43 @@ + common_files = files( + 'gsd-disk-space.c', +- 'gsd-disk-space-helper.c' ++ 'gsd-disk-space-helper.c', ++ 'gsd-gpu-mem.c' + ) + + sources = common_files + files( + 'gsd-housekeeping-manager.c', + 'main.c' + ) + + deps = plugins_deps + [ + gtk_dep, +- libnotify_dep ++ libnotify_dep, ++ m_dep, ++ dl_dep + ] + + executable( + 'gsd-' + plugin_name, + sources, + include_directories: [top_inc, common_inc], + dependencies: deps, + c_args: cflags, + install: true, + install_rpath: gsd_pkglibdir, + install_dir: gsd_libexecdir + ) + + programs = [ + 'gsd-disk-space-test', + 'gsd-empty-trash-test', + 'gsd-purge-temp-test' + ] + + foreach program: programs + executable( + program, + common_files + [program + '.c'], + include_directories: top_inc, + dependencies: deps + ) + endforeach diff --git a/plugins/housekeeping/nvml/include/nvml.h b/plugins/housekeeping/nvml/include/nvml.h new file mode 100644 -index 00000000..778b4bfb +index 00000000..f151007e --- /dev/null +++ b/plugins/housekeeping/nvml/include/nvml.h @@ -0,0 +1,4447 @@ +/* + * Copyright 1993-2016 NVIDIA Corporation. All rights reserved. + * -+ * NOTICE TO USER: ++ * NOTICE TO USER: + * -+ * This source code is subject to NVIDIA ownership rights under U.S. and -+ * international Copyright laws. Users and possessors of this source code -+ * are hereby granted a nonexclusive, royalty-free license to use this code ++ * This source code is subject to NVIDIA ownership rights under U.S. and ++ * international Copyright laws. Users and possessors of this source code ++ * are hereby granted a nonexclusive, royalty-free license to use this code + * in individual and commercial software. + * -+ * NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE -+ * CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR -+ * IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH -+ * REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF ++ * NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE ++ * CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR ++ * IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH ++ * REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. -+ * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, -+ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE -+ * OR PERFORMANCE OF THIS SOURCE CODE. -+ * -+ * U.S. Government End Users. This source code is a "commercial item" as -+ * that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of -+ * "commercial computer software" and "commercial computer software -+ * documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) -+ * and is provided to the U.S. Government only as a commercial end item. -+ * Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through -+ * 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the -+ * source code with only those rights set forth herein. -+ * -+ * Any use of this source code in individual and commercial software must ++ * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, ++ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS ++ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE ++ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE ++ * OR PERFORMANCE OF THIS SOURCE CODE. ++ * ++ * U.S. Government End Users. This source code is a "commercial item" as ++ * that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of ++ * "commercial computer software" and "commercial computer software ++ * documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) ++ * and is provided to the U.S. Government only as a commercial end item. ++ * Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through ++ * 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the ++ * source code with only those rights set forth herein. ++ * ++ * Any use of this source code in individual and commercial software must + * include, in the user documentation and internal comments to the code, + * the above Disclaimer and U.S. Government End Users Notice. + */ + -+/* ++/* +NVML API Reference + -+The NVIDIA Management Library (NVML) is a C-based programmatic interface for monitoring and ++The NVIDIA Management Library (NVML) is a C-based programmatic interface for monitoring and +managing various states within NVIDIA Tesla &tm; GPUs. It is intended to be a platform for building +3rd party applications, and is also the underlying library for the NVIDIA-supported nvidia-smi +tool. NVML is thread-safe so it is safe to make simultaneous NVML calls from multiple threads. @@ -473,7 +708,7 @@ index 00000000..778b4bfb + - All Geforce products, starting with the Fermi architecture + +The NVML library can be found at \%ProgramW6432\%\\"NVIDIA Corporation"\\NVSMI\\ on Windows. It is -+not be added to the system path by default. To dynamically link to NVML, add this path to the PATH ++not be added to the system path by default. To dynamically link to NVML, add this path to the PATH +environmental variable. To dynamically load NVML, call LoadLibrary with this path. + +On Linux the NVML library will be found on the standard library path. For 64 bit Linux, both the 32 bit @@ -542,17 +777,17 @@ index 00000000..778b4bfb +/** + * PCI information about a GPU device. + */ -+typedef struct nvmlPciInfo_st ++typedef struct nvmlPciInfo_st +{ + char busId[NVML_DEVICE_PCI_BUS_ID_BUFFER_SIZE]; //!< The tuple domain:bus:device.function PCI identifier (& NULL terminator) + unsigned int domain; //!< The PCI domain on which the device's bus resides, 0 to 0xffff + unsigned int bus; //!< The bus on which the device resides, 0 to 0xff + unsigned int device; //!< The device's id on the bus, 0 to 31 + unsigned int pciDeviceId; //!< The combined 16-bit device id and 16-bit vendor id -+ ++ + // Added in NVML 2.285 API + unsigned int pciSubSystemId; //!< The 32-bit Sub System Device ID -+ ++ + // NVIDIA reserved for internal use only + unsigned int reserved0; + unsigned int reserved1; @@ -566,7 +801,7 @@ index 00000000..778b4bfb + * @deprecated Different GPU families can have different memory error counters + * See \ref nvmlDeviceGetMemoryErrorCounter + */ -+typedef struct nvmlEccErrorCounts_st ++typedef struct nvmlEccErrorCounts_st +{ + unsigned long long l1Cache; //!< L1 cache errors + unsigned long long l2Cache; //!< L2 cache errors @@ -574,20 +809,20 @@ index 00000000..778b4bfb + unsigned long long registerFile; //!< Register file errors +} nvmlEccErrorCounts_t; + -+/** ++/** + * Utilization information for a device. + * Each sample period may be between 1 second and 1/6 second, depending on the product being queried. + */ -+typedef struct nvmlUtilization_st ++typedef struct nvmlUtilization_st +{ + unsigned int gpu; //!< Percent of time over the past sample period during which one or more kernels was executing on the GPU + unsigned int memory; //!< Percent of time over the past sample period during which global (device) memory was being read or written +} nvmlUtilization_t; + -+/** ++/** + * Memory allocation information for a device. + */ -+typedef struct nvmlMemory_st ++typedef struct nvmlMemory_st +{ + unsigned long long total; //!< Total installed FB memory (in bytes) + unsigned long long free; //!< Unallocated FB memory (in bytes) @@ -622,11 +857,11 @@ index 00000000..778b4bfb +typedef enum nvmlBridgeChipType_enum +{ + NVML_BRIDGE_CHIP_PLX = 0, -+ NVML_BRIDGE_CHIP_BRO4 = 1 ++ NVML_BRIDGE_CHIP_BRO4 = 1 +}nvmlBridgeChipType_t; + +/** -+ * Maximum number of NvLink links supported ++ * Maximum number of NvLink links supported + */ +#define NVML_NVLINK_MAX_LINKS 4 + @@ -648,7 +883,7 @@ index 00000000..778b4bfb + * ** this is ONLY applicable with the units as packets or bytes + * ** as specified in \a nvmlNvLinkUtilizationCountUnits_t + * ** all packet filter descriptions are target GPU centric -+ * ** these can be "OR'd" together ++ * ** these can be "OR'd" together + */ +typedef enum nvmlNvLinkUtilizationCountPktTypes_enum +{ @@ -663,7 +898,7 @@ index 00000000..778b4bfb + NVML_NVLINK_COUNTER_PKTFILTER_ALL = 0xFF // all packets +} nvmlNvLinkUtilizationCountPktTypes_t; + -+/** ++/** + * Struct to define the NVLINK counter controls + */ +typedef struct nvmlNvLinkUtilizationControl_st @@ -751,12 +986,12 @@ index 00000000..778b4bfb + */ +typedef struct nvmlBridgeChipInfo_st +{ -+ nvmlBridgeChipType_t type; //!< Type of Bridge Chip ++ nvmlBridgeChipType_t type; //!< Type of Bridge Chip + unsigned int fwVersion; //!< Firmware Version. 0=Version is unavailable +}nvmlBridgeChipInfo_t; + +/** -+ * This structure stores the complete Hierarchy of the Bridge Chip within the board. The immediate ++ * This structure stores the complete Hierarchy of the Bridge Chip within the board. The immediate + * bridge is stored at index 0 of bridgeInfoList, parent to immediate bridge is at index 1 and so forth. + */ +typedef struct nvmlBridgeChipHierarchy_st @@ -774,12 +1009,12 @@ index 00000000..778b4bfb + NVML_GPU_UTILIZATION_SAMPLES = 1, //!< To represent percent of time during which one or more kernels was executing on the GPU + NVML_MEMORY_UTILIZATION_SAMPLES = 2, //!< To represent percent of time during which global (device) memory was being read or written + NVML_ENC_UTILIZATION_SAMPLES = 3, //!< To represent percent of time during which NVENC remains busy -+ NVML_DEC_UTILIZATION_SAMPLES = 4, //!< To represent percent of time during which NVDEC remains busy ++ NVML_DEC_UTILIZATION_SAMPLES = 4, //!< To represent percent of time during which NVDEC remains busy + NVML_PROCESSOR_CLK_SAMPLES = 5, //!< To represent processor clock samples + NVML_MEMORY_CLK_SAMPLES = 6, //!< To represent memory clock samples -+ ++ + // Keep this last -+ NVML_SAMPLINGTYPE_COUNT ++ NVML_SAMPLINGTYPE_COUNT +}nvmlSamplingType_t; + +/** @@ -789,7 +1024,7 @@ index 00000000..778b4bfb +{ + NVML_PCIE_UTIL_TX_BYTES = 0, // 1KB granularity + NVML_PCIE_UTIL_RX_BYTES = 1, // 1KB granularity -+ ++ + // Keep this last + NVML_PCIE_UTIL_COUNT +} nvmlPcieUtilCounter_t; @@ -797,7 +1032,7 @@ index 00000000..778b4bfb +/** + * Represents the type for sample value returned + */ -+typedef enum nvmlValueType_enum ++typedef enum nvmlValueType_enum +{ + NVML_VALUE_TYPE_DOUBLE = 0, + NVML_VALUE_TYPE_UNSIGNED_INT = 1, @@ -823,14 +1058,14 @@ index 00000000..778b4bfb +/** + * Information for Sample + */ -+typedef struct nvmlSample_st ++typedef struct nvmlSample_st +{ + unsigned long long timeStamp; //!< CPU Timestamp in microseconds + nvmlValue_t sampleValue; //!< Sample Value +}nvmlSample_t; + +/** -+ * Represents type of perf policy for which violation times can be queried ++ * Represents type of perf policy for which violation times can be queried + */ +typedef enum nvmlPerfPolicyType_enum +{ @@ -859,26 +1094,26 @@ index 00000000..778b4bfb + */ +/***************************************************************************************************/ + -+/** -+ * Generic enable/disable enum. ++/** ++ * Generic enable/disable enum. + */ -+typedef enum nvmlEnableState_enum ++typedef enum nvmlEnableState_enum +{ -+ NVML_FEATURE_DISABLED = 0, //!< Feature disabled ++ NVML_FEATURE_DISABLED = 0, //!< Feature disabled + NVML_FEATURE_ENABLED = 1 //!< Feature enabled +} nvmlEnableState_t; + +//! Generic flag used to specify the default behavior of some functions. See description of particular functions for details. -+#define nvmlFlagDefault 0x00 ++#define nvmlFlagDefault 0x00 +//! Generic flag used to force some behavior. See description of particular functions for details. -+#define nvmlFlagForce 0x01 ++#define nvmlFlagForce 0x01 + +/** + * * The Brand of the GPU + * */ +typedef enum nvmlBrandType_enum +{ -+ NVML_BRAND_UNKNOWN = 0, ++ NVML_BRAND_UNKNOWN = 0, + NVML_BRAND_QUADRO = 1, + NVML_BRAND_TESLA = 2, + NVML_BRAND_NVS = 3, @@ -901,36 +1136,36 @@ index 00000000..778b4bfb + NVML_TEMPERATURE_THRESHOLD_COUNT +} nvmlTemperatureThresholds_t; + -+/** -+ * Temperature sensors. ++/** ++ * Temperature sensors. + */ -+typedef enum nvmlTemperatureSensors_enum ++typedef enum nvmlTemperatureSensors_enum +{ + NVML_TEMPERATURE_GPU = 0, //!< Temperature sensor for the GPU die -+ ++ + // Keep this last + NVML_TEMPERATURE_COUNT +} nvmlTemperatureSensors_t; + -+/** -+ * Compute mode. ++/** ++ * Compute mode. + * + * NVML_COMPUTEMODE_EXCLUSIVE_PROCESS was added in CUDA 4.0. -+ * Earlier CUDA versions supported a single exclusive mode, ++ * Earlier CUDA versions supported a single exclusive mode, + * which is equivalent to NVML_COMPUTEMODE_EXCLUSIVE_THREAD in CUDA 4.0 and beyond. + */ -+typedef enum nvmlComputeMode_enum ++typedef enum nvmlComputeMode_enum +{ + NVML_COMPUTEMODE_DEFAULT = 0, //!< Default compute mode -- multiple contexts per device + NVML_COMPUTEMODE_EXCLUSIVE_THREAD = 1, //!< Support Removed + NVML_COMPUTEMODE_PROHIBITED = 2, //!< Compute-prohibited mode -- no contexts per device + NVML_COMPUTEMODE_EXCLUSIVE_PROCESS = 3, //!< Compute-exclusive-process mode -- only one context per device, usable from multiple threads at a time -+ ++ + // Keep this last + NVML_COMPUTEMODE_COUNT +} nvmlComputeMode_t; + -+/** ++/** + * ECC bit types. + * + * @deprecated See \ref nvmlMemoryErrorType_t for a more flexible type @@ -958,54 +1193,54 @@ index 00000000..778b4bfb +{ + /** + * A memory error that was corrected -+ * ++ * + * For ECC errors, these are single bit errors + * For Texture memory, these are errors fixed by resend + */ + NVML_MEMORY_ERROR_TYPE_CORRECTED = 0, + /** + * A memory error that was not corrected -+ * ++ * + * For ECC errors, these are double bit errors + * For Texture memory, these are errors where the resend fails + */ + NVML_MEMORY_ERROR_TYPE_UNCORRECTED = 1, -+ -+ ++ ++ + // Keep this last + NVML_MEMORY_ERROR_TYPE_COUNT //!< Count of memory error types + +} nvmlMemoryErrorType_t; + -+/** -+ * ECC counter types. ++/** ++ * ECC counter types. + * + * Note: Volatile counts are reset each time the driver loads. On Windows this is once per boot. On Linux this can be more frequent. -+ * On Linux the driver unloads when no active clients exist. If persistence mode is enabled or there is always a driver ++ * On Linux the driver unloads when no active clients exist. If persistence mode is enabled or there is always a driver + * client active (e.g. X11), then Linux also sees per-boot behavior. If not, volatile counts are reset each time a compute app + * is run. + */ -+typedef enum nvmlEccCounterType_enum ++typedef enum nvmlEccCounterType_enum +{ + NVML_VOLATILE_ECC = 0, //!< Volatile counts are reset each time the driver loads. + NVML_AGGREGATE_ECC = 1, //!< Aggregate counts persist across reboots (i.e. for the lifetime of the device) -+ ++ + // Keep this last + NVML_ECC_COUNTER_TYPE_COUNT //!< Count of memory counter types +} nvmlEccCounterType_t; + -+/** -+ * Clock types. -+ * ++/** ++ * Clock types. ++ * + * All speeds are in Mhz. + */ -+typedef enum nvmlClockType_enum ++typedef enum nvmlClockType_enum +{ + NVML_CLOCK_GRAPHICS = 0, //!< Graphics clock domain + NVML_CLOCK_SM = 1, //!< SM clock domain + NVML_CLOCK_MEM = 2, //!< Memory clock domain + NVML_CLOCK_VIDEO = 3, //!< Video encoder/decoder clock domain -+ ++ + // Keep this last + NVML_CLOCK_COUNT //usedGpuMemory is not supported -+ + -+ unsigned long long time; //!< Amount of time in ms during which the compute context was active. The time is reported as 0 if ++ ++ unsigned long long time; //!< Amount of time in ms during which the compute context was active. The time is reported as 0 if + //!< the process is not terminated -+ ++ + unsigned long long startTime; //!< CPU Timestamp in usec representing start time for the process -+ ++ + unsigned int isRunning; //!< Flag to represent if the process is running (1 for running, 0 for terminated) + + unsigned int reserved[5]; //!< Reserved for future use @@ -1464,7 +1699,7 @@ index 00000000..778b4bfb +/***************************************************************************************************/ +/** @defgroup nvmlInitializationAndCleanup Initialization and Cleanup + * This chapter describes the methods that handle NVML initialization and cleanup. -+ * It is the user's responsibility to call \ref nvmlInit() before calling any other methods, and ++ * It is the user's responsibility to call \ref nvmlInit() before calling any other methods, and + * nvmlShutdown() once NVML is no longer being used. + * @{ + */ @@ -1475,21 +1710,21 @@ index 00000000..778b4bfb + * + * \note In NVML 5.319 new nvmlInit_v2 has replaced nvmlInit"_v1" (default in NVML 4.304 and older) that + * did initialize all GPU devices in the system. -+ * ++ * + * This allows NVML to communicate with a GPU + * when other GPUs in the system are unstable or in a bad state. When using this API, GPUs are + * discovered and initialized in nvmlDeviceGetHandleBy* functions instead. -+ * ++ * + * \note To contrast nvmlInit_v2 with nvmlInit"_v1", NVML 4.304 nvmlInit"_v1" will fail when any detected GPU is in + * a bad or unstable state. -+ * ++ * + * For all products. + * + * This method, should be called once before invoking any other methods in the library. + * A reference count of the number of initializations is maintained. Shutdown only occurs + * when the reference count reaches zero. -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if NVML has been properly initialized + * - \ref NVML_ERROR_DRIVER_NOT_LOADED if NVIDIA driver is not running + * - \ref NVML_ERROR_NO_PERMISSION if NVML does not have permission to talk to the driver @@ -1499,15 +1734,15 @@ index 00000000..778b4bfb + +/** + * Shut down NVML by releasing all GPU resources previously allocated with \ref nvmlInit(). -+ * ++ * + * For all products. + * + * This method should be called after NVML work is done, once for each call to \ref nvmlInit() + * A reference count of the number of initializations is maintained. Shutdown only occurs + * when the reference count reaches zero. For backwards compatibility, no error is reported if + * nvmlShutdown() is called more times than nvmlInit(). -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if NVML has been properly shut down + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_UNKNOWN on any unexpected error @@ -1595,7 +1830,7 @@ index 00000000..778b4bfb + +/** + * Retrieves the version of the system's graphics driver. -+ * ++ * + * For all products. + * + * The version identifier is an alphanumeric string. It will not exceed 80 characters in length @@ -1604,17 +1839,17 @@ index 00000000..778b4bfb + * @param version Reference in which to return the version identifier + * @param length The maximum allowed length of the string returned in \a version + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a version has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a version is NULL -+ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small + */ +nvmlReturn_t DECLDIR nvmlSystemGetDriverVersion(char *version, unsigned int length); + +/** + * Retrieves the version of the NVML library. -+ * ++ * + * For all products. + * + * The version identifier is an alphanumeric string. It will not exceed 80 characters in length @@ -1623,10 +1858,10 @@ index 00000000..778b4bfb + * @param version Reference in which to return the version identifier + * @param length The maximum allowed length of the string returned in \a version + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a version has been set + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a version is NULL -+ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small + */ +nvmlReturn_t DECLDIR nvmlSystemGetNVMLVersion(char *version, unsigned int length); + @@ -1641,8 +1876,8 @@ index 00000000..778b4bfb + * @param pid The identifier of the process + * @param name Reference in which to return the process name + * @param length The maximum allowed length of the string returned in \a name -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a name has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a name is NULL or \a length is 0. @@ -1657,7 +1892,7 @@ index 00000000..778b4bfb +/***************************************************************************************************/ +/** @defgroup nvmlUnitQueries Unit Queries + * This chapter describes that queries that NVML can perform against each unit. For S-class systems only. -+ * In each case the device is identified with an nvmlUnit_t handle. This handle is obtained by ++ * In each case the device is identified with an nvmlUnit_t handle. This handle is obtained by + * calling \ref nvmlUnitGetHandleByIndex(). + * @{ + */ @@ -1669,8 +1904,8 @@ index 00000000..778b4bfb + * For S-class products. + * + * @param unitCount Reference in which to return the number of units -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a unitCount has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a unitCount is NULL @@ -1683,15 +1918,15 @@ index 00000000..778b4bfb + * + * For S-class products. + * -+ * Valid indices are derived from the \a unitCount returned by \ref nvmlUnitGetCount(). ++ * Valid indices are derived from the \a unitCount returned by \ref nvmlUnitGetCount(). + * For example, if \a unitCount is 2 the valid indices are 0 and 1, corresponding to UNIT 0 and UNIT 1. + * + * The order in which NVML enumerates units has no guarantees of consistency between reboots. + * + * @param index The index of the target unit, >= 0 and < \a unitCount + * @param unit Reference in which to return the unit handle -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a unit has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a index is invalid or \a unit is NULL @@ -1708,8 +1943,8 @@ index 00000000..778b4bfb + * + * @param unit The identifier of the target unit + * @param info Reference in which to return the unit information -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a info has been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a unit is invalid or \a info is NULL @@ -1725,14 +1960,14 @@ index 00000000..778b4bfb + * + * @param unit The identifier of the target unit + * @param state Reference in which to return the current LED state -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a state has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a unit is invalid or \a state is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if this is not an S-class product + * - \ref NVML_ERROR_UNKNOWN on any unexpected error -+ * ++ * + * @see nvmlUnitSetLedState() + */ +nvmlReturn_t DECLDIR nvmlUnitGetLedState(nvmlUnit_t unit, nvmlLedState_t *state); @@ -1746,8 +1981,8 @@ index 00000000..778b4bfb + * + * @param unit The identifier of the target unit + * @param psu Reference in which to return the PSU information -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a psu has been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a unit is invalid or \a psu is NULL @@ -1761,14 +1996,14 @@ index 00000000..778b4bfb + * + * For S-class products. + * -+ * Depending on the product, readings may be available for intake (type=0), ++ * Depending on the product, readings may be available for intake (type=0), + * exhaust (type=1) and board (type=2). + * + * @param unit The identifier of the target unit + * @param type The type of reading to take + * @param temp Reference in which to return the intake temperature -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a temp has been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a unit or \a type is invalid or \a temp is NULL @@ -1786,8 +2021,8 @@ index 00000000..778b4bfb + * + * @param unit The identifier of the target unit + * @param fanSpeeds Reference in which to return the fan speed information -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a fanSpeeds has been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a unit is invalid or \a fanSpeeds is NULL @@ -1807,8 +2042,8 @@ index 00000000..778b4bfb + * @param deviceCount Reference in which to provide the \a devices array size, and + * to return the number of attached GPU devices + * @param devices Reference in which to return the references to the attached GPU devices -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a deviceCount and \a devices have been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a deviceCount indicates that the \a devices array is too small @@ -1819,7 +2054,7 @@ index 00000000..778b4bfb + +/** + * Retrieves the IDs and firmware versions for any Host Interface Cards (HICs) in the system. -+ * ++ * + * For S-class products. + * + * The \a hwbcCount argument is expected to be set to the size of the input \a hwbcEntries array. @@ -1828,7 +2063,7 @@ index 00000000..778b4bfb + * @param hwbcCount Size of hwbcEntries array + * @param hwbcEntries Array holding information about hwbc + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a hwbcCount and \a hwbcEntries have been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if either \a hwbcCount or \a hwbcEntries is NULL @@ -1840,16 +2075,16 @@ index 00000000..778b4bfb +/***************************************************************************************************/ +/** @defgroup nvmlDeviceQueries Device Queries + * This chapter describes that queries that NVML can perform against each device. -+ * In each case the device is identified with an nvmlDevice_t handle. This handle is obtained by ++ * In each case the device is identified with an nvmlDevice_t handle. This handle is obtained by + * calling one of \ref nvmlDeviceGetHandleByIndex(), \ref nvmlDeviceGetHandleBySerial(), -+ * \ref nvmlDeviceGetHandleByPciBusId(). or \ref nvmlDeviceGetHandleByUUID(). ++ * \ref nvmlDeviceGetHandleByPciBusId(). or \ref nvmlDeviceGetHandleByUUID(). + * @{ + */ +/***************************************************************************************************/ + + /** + * Retrieves the number of compute devices in the system. A compute device is a single GPU. -+ * ++ * + * For all products. + * + * Note: New nvmlDeviceGetCount_v2 (default in NVML 5.319) returns count of all devices in the system @@ -1860,8 +2095,8 @@ index 00000000..778b4bfb + * Old _v1 version of nvmlDeviceGetCount doesn't count devices that NVML has no permission to talk to. + * + * @param deviceCount Reference in which to return the number of accessible devices -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a deviceCount has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a deviceCount is NULL @@ -1871,15 +2106,15 @@ index 00000000..778b4bfb + +/** + * Acquire the handle for a particular device, based on its index. -+ * ++ * + * For all products. + * -+ * Valid indices are derived from the \a accessibleDevices count returned by -+ * \ref nvmlDeviceGetCount(). For example, if \a accessibleDevices is 2 the valid indices ++ * Valid indices are derived from the \a accessibleDevices count returned by ++ * \ref nvmlDeviceGetCount(). For example, if \a accessibleDevices is 2 the valid indices + * are 0 and 1, corresponding to GPU 0 and GPU 1. + * + * The order in which NVML enumerates devices has no guarantees of consistency between reboots. For that reason it -+ * is recommended that devices be looked up by their PCI ids or UUID. See ++ * is recommended that devices be looked up by their PCI ids or UUID. See + * \ref nvmlDeviceGetHandleByUUID() and \ref nvmlDeviceGetHandleByPciBusId(). + * + * Note: The NVML index may not correlate with other APIs, such as the CUDA device index. @@ -1887,7 +2122,7 @@ index 00000000..778b4bfb + * Starting from NVML 5, this API causes NVML to initialize the target GPU + * NVML may initialize additional GPUs if: + * - The target GPU is an SLI slave -+ * ++ * + * Note: New nvmlDeviceGetCount_v2 (default in NVML 5.319) returns count of all devices in the system + * even if nvmlDeviceGetHandleByIndex_v2 returns NVML_ERROR_NO_PERMISSION for such device. + * Update your code to handle this error, or use NVML 4.304 or older nvml header file. @@ -1901,8 +2136,8 @@ index 00000000..778b4bfb + * + * @param index The index of the target GPU, >= 0 and < \a accessibleDevices + * @param device Reference in which to return the device handle -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a device has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a index is invalid or \a device is NULL @@ -1925,7 +2160,7 @@ index 00000000..778b4bfb + * This number corresponds to the value printed directly on the board, and to the value returned by + * \ref nvmlDeviceGetSerial(). + * -+ * @deprecated Since more than one GPU can exist on a single board this function is deprecated in favor ++ * @deprecated Since more than one GPU can exist on a single board this function is deprecated in favor + * of \ref nvmlDeviceGetHandleByUUID. + * For dual GPU boards this function will return NVML_ERROR_INVALID_ARGUMENT. + * @@ -1934,8 +2169,8 @@ index 00000000..778b4bfb + * + * @param serial The board serial number of the target GPU + * @param device Reference in which to return the device handle -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a device has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a serial is invalid, \a device is NULL or more than one @@ -1958,11 +2193,11 @@ index 00000000..778b4bfb + * + * @param uuid The UUID of the target GPU + * @param device Reference in which to return the device handle -+ * ++ * + * Starting from NVML 5, this API causes NVML to initialize the target GPU + * NVML may initialize additional GPUs as it searches for the target GPU + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a device has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a uuid is invalid or \a device is null @@ -1978,7 +2213,7 @@ index 00000000..778b4bfb + +/** + * Acquire the handle for a particular device, based on its PCI bus id. -+ * ++ * + * For all products. + * + * This value corresponds to the nvmlPciInfo_t::busId returned by \ref nvmlDeviceGetPciInfo(). @@ -1987,13 +2222,13 @@ index 00000000..778b4bfb + * NVML may initialize additional GPUs if: + * - The target GPU is an SLI slave + * -+ * \note NVML 4.304 and older version of nvmlDeviceGetHandleByPciBusId"_v1" returns NVML_ERROR_NOT_FOUND ++ * \note NVML 4.304 and older version of nvmlDeviceGetHandleByPciBusId"_v1" returns NVML_ERROR_NOT_FOUND + * instead of NVML_ERROR_NO_PERMISSION. + * + * @param pciBusId The PCI bus id of the target GPU + * @param device Reference in which to return the device handle -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a device has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a pciBusId is invalid or \a device is NULL @@ -2007,8 +2242,8 @@ index 00000000..778b4bfb +nvmlReturn_t DECLDIR nvmlDeviceGetHandleByPciBusId(const char *pciBusId, nvmlDevice_t *device); + +/** -+ * Retrieves the name of this device. -+ * ++ * Retrieves the name of this device. ++ * + * For all products. + * + * The name is an alphanumeric string that denotes a particular product, e.g. Tesla &tm; C2070. It will not @@ -2018,8 +2253,8 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param name Reference in which to return the product name + * @param length The maximum allowed length of the string returned in \a name -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a name has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a name is NULL @@ -2052,13 +2287,13 @@ index 00000000..778b4bfb + * Retrieves the NVML index of this device. + * + * For all products. -+ * -+ * Valid indices are derived from the \a accessibleDevices count returned by -+ * \ref nvmlDeviceGetCount(). For example, if \a accessibleDevices is 2 the valid indices ++ * ++ * Valid indices are derived from the \a accessibleDevices count returned by ++ * \ref nvmlDeviceGetCount(). For example, if \a accessibleDevices is 2 the valid indices + * are 0 and 1, corresponding to GPU 0 and GPU 1. + * + * The order in which NVML enumerates devices has no guarantees of consistency between reboots. For that reason it -+ * is recommended that devices be looked up by their PCI ids or GPU UUID. See ++ * is recommended that devices be looked up by their PCI ids or GPU UUID. See + * \ref nvmlDeviceGetHandleByPciBusId() and \ref nvmlDeviceGetHandleByUUID(). + * + * Note: The NVML index may not correlate with other APIs, such as the CUDA device index. @@ -2066,7 +2301,7 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param index Reference in which to return the NVML index of the device + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a index has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a index is NULL @@ -2090,8 +2325,8 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param serial Reference in which to return the board/module serial number + * @param length The maximum allowed length of the string returned in \a serial -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a serial has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a serial is NULL @@ -2112,10 +2347,10 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param cpuSetSize The size of the cpuSet array that is safe to access -+ * @param cpuSet Array reference in which to return a bitmask of CPUs, 64 CPUs per ++ * @param cpuSet Array reference in which to return a bitmask of CPUs, 64 CPUs per + * unsigned long on 64-bit machines, 32 on 32-bit machines + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a cpuAffinity has been filled + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, cpuSetSize == 0, or cpuSet is NULL @@ -2126,8 +2361,8 @@ index 00000000..778b4bfb +nvmlReturn_t DECLDIR nvmlDeviceGetCpuAffinity(nvmlDevice_t device, unsigned int cpuSetSize, unsigned long *cpuSet); + +/** -+ * Sets the ideal affinity for the calling thread and device using the guidelines -+ * given in nvmlDeviceGetCpuAffinity(). Note, this is a change as of version 8.0. ++ * Sets the ideal affinity for the calling thread and device using the guidelines ++ * given in nvmlDeviceGetCpuAffinity(). Note, this is a change as of version 8.0. + * Older versions set the affinity for a calling process and all children. + * Currently supports up to 64 processors. + * @@ -2136,7 +2371,7 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if the calling process has been successfully bound + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid @@ -2155,7 +2390,7 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if the calling process has been successfully unbound + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized @@ -2187,7 +2422,7 @@ index 00000000..778b4bfb + * + * @param device The identifier of the first device + * @param level The \ref nvmlGpuTopologyLevel_t level to search for other GPUs -+ * @param count When zero, is set to the number of matching GPUs such that \a deviceArray ++ * @param count When zero, is set to the number of matching GPUs such that \a deviceArray + * can be malloc'd. When non-zero, \a deviceArray will be filled with \a count + * number of device handles. + * @param deviceArray An array of device handles for GPUs found at \a level @@ -2206,7 +2441,7 @@ index 00000000..778b4bfb + * Supported on Linux only. + * + * @param cpuNumber The CPU number -+ * @param count When zero, is set to the number of matching GPUs such that \a deviceArray ++ * @param count When zero, is set to the number of matching GPUs such that \a deviceArray + * can be malloc'd. When non-zero, \a deviceArray will be filled with \a count + * number of device handles. + * @param deviceArray An array of device handles for GPUs found with affinity to \a cpuNumber @@ -2220,18 +2455,18 @@ index 00000000..778b4bfb +nvmlReturn_t DECLDIR nvmlSystemGetTopologyGpuSet(unsigned int cpuNumber, unsigned int *count, nvmlDevice_t *deviceArray); + +/** -+ * Retrieve the status for a given p2p capability index between a given pair of GPU -+ * -+ * @param device1 The first device ++ * Retrieve the status for a given p2p capability index between a given pair of GPU ++ * ++ * @param device1 The first device + * @param device2 The second device + * @param p2pIndex p2p Capability Index being looked for between \a device1 and \a device2 -+ * @param p2pStatus Reference in which to return the status of the \a p2pIndex ++ * @param p2pStatus Reference in which to return the status of the \a p2pIndex + * between \a device1 and \a device2 -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a p2pStatus has been populated + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device1 or \a device2 or \a p2pIndex is invalid or \a p2pStatus is NULL + * - \ref NVML_ERROR_UNKNOWN on any unexpected error -+ */ ++ */ +nvmlReturn_t DECLDIR nvmlDeviceGetP2PStatus(nvmlDevice_t device1, nvmlDevice_t device2, nvmlGpuP2PCapsIndex_t p2pIndex,nvmlGpuP2PStatus_t *p2pStatus); + + @@ -2248,12 +2483,12 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param uuid Reference in which to return the GPU UUID + * @param length The maximum allowed length of the string returned in \a uuid -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a uuid has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a uuid is NULL -+ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error @@ -2261,7 +2496,7 @@ index 00000000..778b4bfb +nvmlReturn_t DECLDIR nvmlDeviceGetUUID(nvmlDevice_t device, char *uuid, unsigned int length); + +/** -+ * Retrieves minor number for the device. The minor number for the device is such that the Nvidia device node file for ++ * Retrieves minor number for the device. The minor number for the device is such that the Nvidia device node file for + * each GPU will have the form /dev/nvidia[minor number]. + * + * For all products. @@ -2303,7 +2538,7 @@ index 00000000..778b4bfb + * + * For all products with an inforom. + * -+ * Fermi and higher parts have non-volatile on-board memory for persisting device info, such as aggregate ++ * Fermi and higher parts have non-volatile on-board memory for persisting device info, such as aggregate + * ECC counts. The version of the data structures in this memory may change from time to time. It will not + * exceed 16 characters in length (including the NULL terminator). + * See \ref nvmlConstants::NVML_DEVICE_INFOROM_VERSION_BUFFER_SIZE. @@ -2315,11 +2550,11 @@ index 00000000..778b4bfb + * @param version Reference in which to return the infoROM version + * @param length The maximum allowed length of the string returned in \a version + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a version has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a version is NULL -+ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not have an infoROM + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error @@ -2333,7 +2568,7 @@ index 00000000..778b4bfb + * + * For all products with an inforom. + * -+ * Image version just like VBIOS version uniquely describes the exact version of the infoROM flashed on the board ++ * Image version just like VBIOS version uniquely describes the exact version of the infoROM flashed on the board + * in contrast to infoROM object version which is only an indicator of supported features. + * Version string will not exceed 16 characters in length (including the NULL terminator). + * See \ref nvmlConstants::NVML_DEVICE_INFOROM_VERSION_BUFFER_SIZE. @@ -2342,11 +2577,11 @@ index 00000000..778b4bfb + * @param version Reference in which to return the infoROM image version + * @param length The maximum allowed length of the string returned in \a version + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a version has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a version is NULL -+ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not have an infoROM + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error @@ -2367,14 +2602,14 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param checksum Reference in which to return the infoROM configuration checksum + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a checksum has been set + * - \ref NVML_ERROR_CORRUPTED_INFOROM if the device's checksum couldn't be retrieved due to infoROM corruption + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a checksum is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible -+ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ +nvmlReturn_t DECLDIR nvmlDeviceGetInforomConfigurationChecksum(nvmlDevice_t device, unsigned int *checksum); + @@ -2385,13 +2620,13 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if infoROM is not corrupted + * - \ref NVML_ERROR_CORRUPTED_INFOROM if the device's infoROM is corrupted + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible -+ * - \ref NVML_ERROR_UNKNOWN on any unexpected error ++ * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ +nvmlReturn_t DECLDIR nvmlDeviceValidateInforom(nvmlDevice_t device); + @@ -2407,8 +2642,8 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param display Reference in which to return the display mode -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a display has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a display is NULL @@ -2432,8 +2667,8 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param isActive Reference in which to return the display active state -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a isActive has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a isActive is NULL @@ -2449,15 +2684,15 @@ index 00000000..778b4bfb + * For all products. + * For Linux only. + * -+ * When driver persistence mode is enabled the driver software state is not torn down when the last -+ * client disconnects. By default this feature is disabled. ++ * When driver persistence mode is enabled the driver software state is not torn down when the last ++ * client disconnects. By default this feature is disabled. + * + * See \ref nvmlEnableState_t for details on allowed modes. + * + * @param device The identifier of the target device + * @param mode Reference in which to return the current driver persistence mode -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a mode has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a mode is NULL @@ -2471,15 +2706,15 @@ index 00000000..778b4bfb + +/** + * Retrieves the PCI attributes of this device. -+ * ++ * + * For all products. + * + * See \ref nvmlPciInfo_t for details on the available PCI info. + * + * @param device The identifier of the target device + * @param pci Reference in which to return the PCI info -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a pci has been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a pci is NULL @@ -2493,13 +2728,13 @@ index 00000000..778b4bfb + * + * I.E. for a generation 2 PCIe device attached to a generation 1 PCIe bus the max link generation this function will + * report is generation 1. -+ * ++ * + * For Fermi &tm; or newer fully supported devices. -+ * ++ * + * @param device The identifier of the target device + * @param maxLinkGen Reference in which to return the max PCIe link generation -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a maxLinkGen has been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a maxLinkGen is null @@ -2514,13 +2749,13 @@ index 00000000..778b4bfb + * + * I.E. for a device with a 16x PCIe bus width attached to a 8x PCIe system bus this function will report + * a max link width of 8. -+ * ++ * + * For Fermi &tm; or newer fully supported devices. -+ * ++ * + * @param device The identifier of the target device + * @param maxLinkWidth Reference in which to return the max PCIe link generation -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a maxLinkWidth has been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a maxLinkWidth is null @@ -2532,13 +2767,13 @@ index 00000000..778b4bfb + +/** + * Retrieves the current PCIe link generation -+ * ++ * + * For Fermi &tm; or newer fully supported devices. -+ * ++ * + * @param device The identifier of the target device + * @param currLinkGen Reference in which to return the current PCIe link generation -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a currLinkGen has been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a currLinkGen is null @@ -2550,13 +2785,13 @@ index 00000000..778b4bfb + +/** + * Retrieves the current PCIe link width -+ * ++ * + * For Fermi &tm; or newer fully supported devices. -+ * ++ * + * @param device The identifier of the target device + * @param currLinkWidth Reference in which to return the current PCIe link generation -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a currLinkWidth has been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a currLinkWidth is null @@ -2568,7 +2803,7 @@ index 00000000..778b4bfb + +/** + * Retrieve PCIe utilization information. -+ * This function is querying a byte counter over a 20ms interval and thus is the ++ * This function is querying a byte counter over a 20ms interval and thus is the + * PCIe throughput over that interval. + * + * For Maxwell &tm; or newer fully supported devices. @@ -2589,7 +2824,7 @@ index 00000000..778b4bfb + */ +nvmlReturn_t DECLDIR nvmlDeviceGetPcieThroughput(nvmlDevice_t device, nvmlPcieUtilCounter_t counter, unsigned int *value); + -+/** ++/** + * Retrieve the PCIe replay counter. + * + * For Kepler &tm; or newer fully supported devices. @@ -2617,8 +2852,8 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param type Identify which clock domain to query + * @param clock Reference in which to return the clock speed in MHz -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a clock has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a clock is NULL @@ -2641,8 +2876,8 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param type Identify which clock domain to query + * @param clock Reference in which to return the clock speed in MHz -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a clock has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a clock is NULL @@ -2661,8 +2896,8 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param clockType Identify which clock domain to query + * @param clockMHz Reference in which to return the clock in MHz -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a clockMHz has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a clockMHz is NULL or \a clockType is invalid @@ -2673,7 +2908,7 @@ index 00000000..778b4bfb +nvmlReturn_t DECLDIR nvmlDeviceGetApplicationsClock(nvmlDevice_t device, nvmlClockType_t clockType, unsigned int *clockMHz); + +/** -+ * Retrieves the default applications clock that GPU boots with or ++ * Retrieves the default applications clock that GPU boots with or + * defaults to after \ref nvmlDeviceResetApplicationsClocks call. + * + * For Kepler &tm; or newer fully supported devices. @@ -2681,8 +2916,8 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param clockType Identify which clock domain to query + * @param clockMHz Reference in which to return the default clock in MHz -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a clockMHz has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a clockMHz is NULL or \a clockType is invalid @@ -2710,8 +2945,8 @@ index 00000000..778b4bfb + * For Fermi &tm; or newer non-GeForce fully supported devices and Maxwell or newer GeForce devices. + * + * @param device The identifier of the target device -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if new settings were successfully set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid @@ -2769,9 +3004,9 @@ index 00000000..778b4bfb + * @param count Reference in which to provide the \a clocksMHz array size, and + * to return the number of elements + * @param clocksMHz Reference in which to return the clock in MHz -+ * -+ * @return -+ * - \ref NVML_SUCCESS if \a count and \a clocksMHz have been populated ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a count and \a clocksMHz have been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a count is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature @@ -2795,14 +3030,14 @@ index 00000000..778b4bfb + * @param count Reference in which to provide the \a clocksMHz array size, and + * to return the number of elements + * @param clocksMHz Reference in which to return the clocks in MHz -+ * -+ * @return -+ * - \ref NVML_SUCCESS if \a count and \a clocksMHz have been populated ++ * ++ * @return ++ * - \ref NVML_SUCCESS if \a count and \a clocksMHz have been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_NOT_FOUND if the specified \a memoryClockMHz is not a supported frequency + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a clock is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature -+ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a count is too small ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a count is too small + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * @@ -2907,15 +3142,15 @@ index 00000000..778b4bfb + * + * Note: The reported speed is the intended fan speed. If the fan is physically blocked and unable to spin, the + * output will not match the actual fan speed. -+ * ++ * + * For all discrete products with dedicated fans. + * + * The fan speed is expressed as a percent of the maximum, i.e. full speed is 100%. + * + * @param device The identifier of the target device + * @param speed Reference in which to return the fan speed percentage -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a speed has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a speed is NULL @@ -2926,8 +3161,8 @@ index 00000000..778b4bfb +nvmlReturn_t DECLDIR nvmlDeviceGetFanSpeed(nvmlDevice_t device, unsigned int *speed); + +/** -+ * Retrieves the current temperature readings for the device, in degrees C. -+ * ++ * Retrieves the current temperature readings for the device, in degrees C. ++ * + * For all products. + * + * See \ref nvmlTemperatureSensors_t for details on available temperature sensors. @@ -2935,8 +3170,8 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param sensorType Flag that indicates which sensor reading to retrieve + * @param temp Reference in which to return the temperature reading -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a temp has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a sensorType is invalid or \a temp is NULL @@ -2967,7 +3202,7 @@ index 00000000..778b4bfb +nvmlReturn_t DECLDIR nvmlDeviceGetTemperatureThreshold(nvmlDevice_t device, nvmlTemperatureThresholds_t thresholdType, unsigned int *temp); + +/** -+ * Retrieves the current performance state for the device. ++ * Retrieves the current performance state for the device. + * + * For Fermi &tm; or newer fully supported devices. + * @@ -2975,8 +3210,8 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param pState Reference in which to return the performance state reading -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a pState has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a pState is NULL @@ -2997,7 +3232,7 @@ index 00000000..778b4bfb + * @param clocksThrottleReasons Reference in which to return bitmask of active clocks throttle + * reasons + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a clocksThrottleReasons has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a clocksThrottleReasons is NULL @@ -3011,7 +3246,7 @@ index 00000000..778b4bfb +nvmlReturn_t DECLDIR nvmlDeviceGetCurrentClocksThrottleReasons(nvmlDevice_t device, unsigned long long *clocksThrottleReasons); + +/** -+ * Retrieves bitmask of supported clocks throttle reasons that can be returned by ++ * Retrieves bitmask of supported clocks throttle reasons that can be returned by + * \ref nvmlDeviceGetCurrentClocksThrottleReasons + * + * For all fully supported products. @@ -3022,7 +3257,7 @@ index 00000000..778b4bfb + * @param supportedClocksThrottleReasons Reference in which to return bitmask of supported + * clocks throttle reasons + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a supportedClocksThrottleReasons has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a supportedClocksThrottleReasons is NULL @@ -3037,7 +3272,7 @@ index 00000000..778b4bfb +/** + * Deprecated: Use \ref nvmlDeviceGetPerformanceState. This function exposes an incorrect generalization. + * -+ * Retrieve the current performance state for the device. ++ * Retrieve the current performance state for the device. + * + * For Fermi &tm; or newer fully supported devices. + * @@ -3045,8 +3280,8 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param pState Reference in which to return the performance state reading -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a pState has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a pState is NULL @@ -3067,16 +3302,16 @@ index 00000000..778b4bfb + * For from the Kepler or newer families. + * - Does not require \a NVML_INFOROM_POWER object. + * -+ * This flag indicates whether any power management algorithm is currently active on the device. An -+ * enabled state does not necessarily mean the device is being actively throttled -- only that ++ * This flag indicates whether any power management algorithm is currently active on the device. An ++ * enabled state does not necessarily mean the device is being actively throttled -- only that + * that the driver will do so if the appropriate conditions are met. + * + * See \ref nvmlEnableState_t for details on allowed modes. + * + * @param device The identifier of the target device + * @param mode Reference in which to return the current power management mode -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a mode has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a mode is NULL @@ -3094,13 +3329,13 @@ index 00000000..778b4bfb + * The power limit defines the upper boundary for the card's power draw. If + * the card's total power draw reaches this limit the power management algorithm kicks in. + * -+ * This reading is only available if power management mode is supported. ++ * This reading is only available if power management mode is supported. + * See \ref nvmlDeviceGetPowerManagementMode. + * + * @param device The identifier of the target device + * @param limit Reference in which to return the power management limit in milliwatts -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a limit has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a limit is NULL @@ -3118,8 +3353,8 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param minLimit Reference in which to return the minimum power management limit in milliwatts + * @param maxLimit Reference in which to return the maximum power management limit in milliwatts -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a minLimit and \a maxLimit have been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a minLimit or \a maxLimit is NULL @@ -3139,8 +3374,8 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param defaultLimit Reference in which to return the default power management limit in milliwatts -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a defaultLimit has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a defaultLimit is NULL @@ -3161,8 +3396,8 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param power Reference in which to return the power usage information -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a power has been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a power is NULL @@ -3183,7 +3418,7 @@ index 00000000..778b4bfb + * @param device The device to communicate with + * @param limit Reference in which to return the power management limit in milliwatts + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a limit has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a limit is NULL @@ -3203,8 +3438,8 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param current Reference in which to return the current GOM + * @param pending Reference in which to return the pending GOM -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a mode has been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a current or \a pending is NULL @@ -3219,21 +3454,21 @@ index 00000000..778b4bfb + +/** + * Retrieves the amount of used, free and total memory available on the device, in bytes. -+ * ++ * + * For all products. + * + * Enabling ECC reduces the amount of total available memory, due to the extra required parity bits. + * Under WDDM most device memory is allocated and managed on startup by Windows. + * -+ * Under Linux and Windows TCC, the reported amount of used memory is equal to the sum of memory allocated ++ * Under Linux and Windows TCC, the reported amount of used memory is equal to the sum of memory allocated + * by all active channels on the device. + * + * See \ref nvmlMemory_t for details on available memory info. + * + * @param device The identifier of the target device + * @param memory Reference in which to return the memory information -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a memory has been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a memory is NULL @@ -3251,8 +3486,8 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param mode Reference in which to return the current compute mode -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a mode has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a mode is NULL @@ -3279,8 +3514,8 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param current Reference in which to return the current ECC mode + * @param pending Reference in which to return the pending ECC mode -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a current and \a pending have been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or either \a current or \a pending is NULL @@ -3294,13 +3529,13 @@ index 00000000..778b4bfb + +/** + * Retrieves the device boardId from 0-N. -+ * Devices with the same boardId indicate GPUs connected to the same PLX. Use in conjunction with ++ * Devices with the same boardId indicate GPUs connected to the same PLX. Use in conjunction with + * \ref nvmlDeviceGetMultiGpuBoard() to decide if they are on the same board as well. -+ * The boardId returned is a unique ID for the current configuration. Uniqueness and ordering across ++ * The boardId returned is a unique ID for the current configuration. Uniqueness and ordering across + * reboots and system configurations is not guaranteed (i.e. if a Tesla K40c returns 0x100 and -+ * the two GPUs on a Tesla K10 in the same system returns 0x200 it is not guaranteed they will ++ * the two GPUs on a Tesla K10 in the same system returns 0x200 it is not guaranteed they will + * always return those values but they will always be different from each other). -+ * ++ * + * + * For Fermi &tm; or newer fully supported devices. + * @@ -3345,18 +3580,18 @@ index 00000000..778b4bfb + * Requires \a NVML_INFOROM_ECC version 1.0 or higher. + * Requires ECC Mode to be enabled. + * -+ * The total error count is the sum of errors across each of the separate memory systems, i.e. the total set of ++ * The total error count is the sum of errors across each of the separate memory systems, i.e. the total set of + * errors across the entire device. + * + * See \ref nvmlMemoryErrorType_t for a description of available error types.\n + * See \ref nvmlEccCounterType_t for a description of available counter types. + * + * @param device The identifier of the target device -+ * @param errorType Flag that specifies the type of the errors. -+ * @param counterType Flag that specifies the counter-type of the errors. ++ * @param errorType Flag that specifies the type of the errors. ++ * @param counterType Flag that specifies the counter-type of the errors. + * @param eccCounts Reference in which to return the specified ECC errors -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a eccCounts has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a errorType or \a counterType is invalid, or \a eccCounts is NULL @@ -3390,11 +3625,11 @@ index 00000000..778b4bfb + * See \ref nvmlEccErrorCounts_t for a description of provided detailed ECC counts. + * + * @param device The identifier of the target device -+ * @param errorType Flag that specifies the type of the errors. -+ * @param counterType Flag that specifies the counter-type of the errors. ++ * @param errorType Flag that specifies the type of the errors. ++ * @param counterType Flag that specifies the counter-type of the errors. + * @param eccCounts Reference in which to return the specified ECC errors -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a eccCounts has been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a errorType or \a counterType is invalid, or \a eccCounts is NULL @@ -3420,14 +3655,14 @@ index 00000000..778b4bfb + * See \ref nvmlMemoryErrorType_t for a description of available memory error types.\n + * See \ref nvmlEccCounterType_t for a description of available counter types.\n + * See \ref nvmlMemoryLocation_t for a description of available counter locations.\n -+ * ++ * + * @param device The identifier of the target device + * @param errorType Flag that specifies the type of error. -+ * @param counterType Flag that specifies the counter-type of the errors. -+ * @param locationType Specifies the location of the counter. ++ * @param counterType Flag that specifies the counter-type of the errors. ++ * @param locationType Specifies the location of the counter. + * @param count Reference in which to return the ECC counter -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a count has been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a bitTyp,e \a counterType or \a locationType is @@ -3452,8 +3687,8 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param utilization Reference in which to return the utilization information -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a utilization has been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a utilization is NULL @@ -3515,15 +3750,15 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param current Reference in which to return the current driver model + * @param pending Reference in which to return the pending driver model -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if either \a current and/or \a pending have been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or both \a current and \a pending are NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if the platform is not windows + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error -+ * ++ * + * @see nvmlDeviceSetDriverModel() + */ +nvmlReturn_t DECLDIR nvmlDeviceGetDriverModel(nvmlDevice_t device, nvmlDriverModel_t *current, nvmlDriverModel_t *pending); @@ -3533,18 +3768,18 @@ index 00000000..778b4bfb + * + * For all products. + * -+ * The VBIOS version may change from time to time. It will not exceed 32 characters in length ++ * The VBIOS version may change from time to time. It will not exceed 32 characters in length + * (including the NULL terminator). See \ref nvmlConstants::NVML_DEVICE_VBIOS_VERSION_BUFFER_SIZE. + * + * @param device The identifier of the target device + * @param version Reference to which to return the VBIOS version + * @param length The maximum allowed length of the string returned in \a version -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a version has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a version is NULL -+ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small ++ * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ @@ -3552,21 +3787,21 @@ index 00000000..778b4bfb + +/** + * Get Bridge Chip Information for all the bridge chips on the board. -+ * ++ * + * For all fully supported products. + * Only applicable to multi-GPU products. -+ * ++ * + * @param device The identifier of the target device + * @param bridgeHierarchy Reference to the returned bridge chip Hierarchy -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if bridge chip exists + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a bridgeInfo is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if bridge chip not supported on the device + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error -+ * ++ * + */ +nvmlReturn_t DECLDIR nvmlDeviceGetBridgeChipInfo(nvmlDevice_t device, nvmlBridgeChipHierarchy_t *bridgeHierarchy); + @@ -3591,8 +3826,8 @@ index 00000000..778b4bfb + * @param infoCount Reference in which to provide the \a infos array size, and + * to return the number of returned elements + * @param infos Reference in which to return the process information -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a infoCount and \a infos have been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a infoCount indicates that the \a infos array is too small @@ -3611,7 +3846,7 @@ index 00000000..778b4bfb + * + * For Kepler &tm; or newer fully supported devices. + * -+ * This function returns information only about graphics based processes ++ * This function returns information only about graphics based processes + * (eg. applications using OpenGL, DirectX) + * + * To query the current number of running graphics processes, call this function with *infoCount = 0. The @@ -3627,8 +3862,8 @@ index 00000000..778b4bfb + * @param infoCount Reference in which to provide the \a infos array size, and + * to return the number of returned elements + * @param infos Reference in which to return the process information -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a infoCount and \a infos have been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a infoCount indicates that the \a infos array is too small @@ -3670,7 +3905,7 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param apiType Target API type for this operation -+ * @param isRestricted Reference in which to return the current restriction ++ * @param isRestricted Reference in which to return the current restriction + * NVML_FEATURE_ENABLED indicates that the API is root-only + * NVML_FEATURE_DISABLED indicates that the API is accessible to all users + * @@ -3690,37 +3925,37 @@ index 00000000..778b4bfb + +/** + * Gets recent samples for the GPU. -+ * ++ * + * For Kepler &tm; or newer fully supported devices. -+ * -+ * Based on type, this method can be used to fetch the power, utilization or clock samples maintained in the buffer by ++ * ++ * Based on type, this method can be used to fetch the power, utilization or clock samples maintained in the buffer by + * the driver. -+ * ++ * + * Power, Utilization and Clock samples are returned as type "unsigned int" for the union nvmlValue_t. -+ * -+ * To get the size of samples that user needs to allocate, the method is invoked with samples set to NULL. -+ * The returned samplesCount will provide the number of samples that can be queried. The user needs to ++ * ++ * To get the size of samples that user needs to allocate, the method is invoked with samples set to NULL. ++ * The returned samplesCount will provide the number of samples that can be queried. The user needs to + * allocate the buffer with size as samplesCount * sizeof(nvmlSample_t). -+ * -+ * lastSeenTimeStamp represents CPU timestamp in microseconds. Set it to 0 to fetch all the samples maintained by the -+ * underlying buffer. Set lastSeenTimeStamp to one of the timeStamps retrieved from the date of the previous query ++ * ++ * lastSeenTimeStamp represents CPU timestamp in microseconds. Set it to 0 to fetch all the samples maintained by the ++ * underlying buffer. Set lastSeenTimeStamp to one of the timeStamps retrieved from the date of the previous query + * to get more recent samples. -+ * -+ * This method fetches the number of entries which can be accommodated in the provided samples array, and the -+ * reference samplesCount is updated to indicate how many samples were actually retrieved. The advantage of using this ++ * ++ * This method fetches the number of entries which can be accommodated in the provided samples array, and the ++ * reference samplesCount is updated to indicate how many samples were actually retrieved. The advantage of using this + * method for samples in contrast to polling via existing methods is to get get higher frequency data at lower polling cost. -+ * ++ * + * @param device The identifier for the target device + * @param type Type of sampling event -+ * @param lastSeenTimeStamp Return only samples with timestamp greater than lastSeenTimeStamp. ++ * @param lastSeenTimeStamp Return only samples with timestamp greater than lastSeenTimeStamp. + * @param sampleValType Output parameter to represent the type of sample value as described in nvmlSampleVal_t + * @param sampleCount Reference to provide the number of elements which can be queried in samples array + * @param samples Reference in which samples are returned -+ -+ * @return ++ ++ * @return + * - \ref NVML_SUCCESS if samples are successfully retrieved + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized -+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a samplesCount is NULL or ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a samplesCount is NULL or + * reference to \a sampleCount is 0 for non null \a samples + * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible @@ -3732,10 +3967,10 @@ index 00000000..778b4bfb + +/** + * Gets Total, Available and Used size of BAR1 memory. -+ * -+ * BAR1 is used to map the FB (device memory) so that it can be directly accessed by the CPU or by 3rd party -+ * devices (peer-to-peer on the PCIE bus). -+ * ++ * ++ * BAR1 is used to map the FB (device memory) so that it can be directly accessed by the CPU or by 3rd party ++ * devices (peer-to-peer on the PCIE bus). ++ * + * For Kepler &tm; or newer fully supported devices. + * + * @param device The identifier of the target device @@ -3755,20 +3990,20 @@ index 00000000..778b4bfb + + +/** -+ * Gets the duration of time during which the device was throttled (lower than requested clocks) due to power ++ * Gets the duration of time during which the device was throttled (lower than requested clocks) due to power + * or thermal constraints. + * + * The method is important to users who are tying to understand if their GPUs throttle at any point during their applications. The -+ * difference in violation times at two different reference times gives the indication of GPU throttling event. ++ * difference in violation times at two different reference times gives the indication of GPU throttling event. + * + * Violation for thermal capping is not supported at this time. -+ * ++ * + * For Kepler &tm; or newer fully supported devices. + * + * @param device The identifier of the target device + * @param perfPolicyType Represents Performance policy which can trigger GPU throttling -+ * @param violTime Reference to which violation time related information is returned -+ * ++ * @param violTime Reference to which violation time related information is returned ++ * + * + * @return + * - \ref NVML_SUCCESS if violation time is successfully retrieved @@ -3799,8 +4034,8 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param mode Reference in which to return the current accounting mode + * -+ * @return -+ * - \ref NVML_SUCCESS if the mode has been successfully retrieved ++ * @return ++ * - \ref NVML_SUCCESS if the mode has been successfully retrieved + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a mode are NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature @@ -3812,10 +4047,10 @@ index 00000000..778b4bfb + * Queries process's accounting stats. + * + * For Kepler &tm; or newer fully supported devices. -+ * ++ * + * Accounting stats capture GPU utilization and other statistics across the lifetime of a process. + * Accounting stats can be queried during life time of the process and after its termination. -+ * The time field in \ref nvmlAccountingStats_t is reported as 0 during the lifetime of the process and ++ * The time field in \ref nvmlAccountingStats_t is reported as 0 during the lifetime of the process and + * updated to actual running time after its termination. + * Accounting stats are kept in a circular buffer, newly created processes overwrite information about old + * processes. @@ -3829,12 +4064,12 @@ index 00000000..778b4bfb + * @note In case of pid collision stats of only the latest process (that terminated last) will be reported + * + * @warning On Kepler devices per process statistics are accurate only if there's one process running on a GPU. -+ * ++ * + * @param device The identifier of the target device + * @param pid Process Id of the target process to query stats for + * @param stats Reference in which to return the process's accounting stats + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if stats have been successfully retrieved + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a stats are NULL @@ -3847,14 +4082,14 @@ index 00000000..778b4bfb +nvmlReturn_t DECLDIR nvmlDeviceGetAccountingStats(nvmlDevice_t device, unsigned int pid, nvmlAccountingStats_t *stats); + +/** -+ * Queries list of processes that can be queried for accounting stats. The list of processes returned ++ * Queries list of processes that can be queried for accounting stats. The list of processes returned + * can be in running or terminated state. + * + * For Kepler &tm; or newer fully supported devices. + * + * To just query the number of processes ready to be queried, call this function with *count = 0 and + * pids=NULL. The return code will be NVML_ERROR_INSUFFICIENT_SIZE, or NVML_SUCCESS if list is empty. -+ * ++ * + * For more details see \ref nvmlDeviceGetAccountingStats. + * + * @note In case of PID collision some processes might not be accessible before the circular buffer is full. @@ -3863,8 +4098,8 @@ index 00000000..778b4bfb + * @param count Reference in which to provide the \a pids array size, and + * to return the number of elements ready to be queried + * @param pids Reference in which to return list of process ids -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if pids were successfully retrieved + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a count is NULL @@ -3888,14 +4123,14 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param bufferSize Reference in which to provide the size (in number of elements) + * of the circular buffer for accounting stats. -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if buffer size was successfully retrieved + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a bufferSize is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature or accounting mode is disabled + * - \ref NVML_ERROR_UNKNOWN on any unexpected error -+ * ++ * + * @see nvmlDeviceGetAccountingStats + * @see nvmlDeviceGetAccountingPids + */ @@ -3911,7 +4146,7 @@ index 00000000..778b4bfb + * Returns the list of retired pages by source, including pages that are pending retirement + * The address information provided from this API is the hardware address of the page that was retired. Note + * that this does not match the virtual address used in CUDA, but will match the address information in XID 63 -+ * ++ * + * For Kepler &tm; or newer fully supported devices. + * + * @param device The identifier of the target device @@ -3920,13 +4155,13 @@ index 00000000..778b4bfb + * to return the number of retired pages that match \a cause + * Set to 0 to query the size without allocating an \a addresses buffer + * @param addresses Buffer to write the page addresses into -+ * ++ * + * @return + * - \ref NVML_SUCCESS if \a pageCount was populated and \a addresses was filled + * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a pageCount indicates the buffer is not large enough to store all the + * matching page addresses. \a pageCount is set to the needed size. + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized -+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a pageCount is NULL, \a cause is invalid, or ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a pageCount is NULL, \a cause is invalid, or + * \a addresses is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible @@ -3942,7 +4177,7 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param isPending Reference in which to return the pending status -+ * ++ * + * @return + * - \ref NVML_SUCCESS if \a isPending was populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized @@ -3971,24 +4206,24 @@ index 00000000..778b4bfb + * Requires root/admin permissions. + * + * This operation takes effect immediately. -+ * + * -+ * Current S-Class products don't provide unique LEDs for each unit. As such, both front ++ * ++ * Current S-Class products don't provide unique LEDs for each unit. As such, both front + * and back LEDs will be toggled in unison regardless of which unit is specified with this command. + * + * See \ref nvmlLedColor_t for available colors. + * + * @param unit The identifier of the target unit + * @param color The target LED color -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if the LED color has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a unit or \a color is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED if this is not an S-class product + * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation + * - \ref NVML_ERROR_UNKNOWN on any unexpected error -+ * ++ * + * @see nvmlUnitGetLedState() + */ +nvmlReturn_t DECLDIR nvmlUnitSetLedState(nvmlUnit_t unit, nvmlLedColor_t color); @@ -4021,8 +4256,8 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param mode The target persistence mode -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if the persistence mode was set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a mode is invalid @@ -4053,8 +4288,8 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param mode The target compute mode -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if the compute mode was set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a mode is invalid @@ -4083,8 +4318,8 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param ecc The target ECC mode -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if the ECC mode was set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a ecc is invalid @@ -4095,7 +4330,7 @@ index 00000000..778b4bfb + * + * @see nvmlDeviceGetEccMode() + */ -+nvmlReturn_t DECLDIR nvmlDeviceSetEccMode(nvmlDevice_t device, nvmlEnableState_t ecc); ++nvmlReturn_t DECLDIR nvmlDeviceSetEccMode(nvmlDevice_t device, nvmlEnableState_t ecc); + +/** + * Clear the ECC error and other memory error counts for the device. @@ -4115,8 +4350,8 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param counterType Flag that indicates which type of errors should be cleared. -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if the error counts were cleared + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a counterType is invalid @@ -4125,7 +4360,7 @@ index 00000000..778b4bfb + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * -+ * @see ++ * @see + * - nvmlDeviceGetDetailedEccErrors() + * - nvmlDeviceGetTotalEccErrors() + */ @@ -4139,17 +4374,17 @@ index 00000000..778b4bfb + * Requires root/admin permissions. + * + * On Windows platforms the device driver can run in either WDDM or WDM (TCC) mode. If a display is attached -+ * to the device it must run in WDDM mode. ++ * to the device it must run in WDDM mode. + * + * It is possible to force the change to WDM (TCC) while the display is still attached with a force flag (nvmlFlagForce). + * This should only be done if the host is subsequently powered down and the display is detached from the device -+ * before the next reboot. ++ * before the next reboot. + * + * This operation takes effect after the next reboot. -+ * ++ * + * Windows driver model may only be set to WDDM when running in DEFAULT compute mode. + * -+ * Change driver model to WDDM is not supported when GPU doesn't support graphics acceleration or ++ * Change driver model to WDDM is not supported when GPU doesn't support graphics acceleration or + * will not support it after reboot. See \ref nvmlDeviceSetGpuOperationMode. + * + * See \ref nvmlDriverModel_t for details on available driver models. @@ -4158,8 +4393,8 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param driverModel The target driver model + * @param flags Flags that change the default behavior -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if the driver model has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a driverModel is invalid @@ -4167,7 +4402,7 @@ index 00000000..778b4bfb + * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error -+ * ++ * + * @see nvmlDeviceGetDriverModel() + */ +nvmlReturn_t DECLDIR nvmlDeviceSetDriverModel(nvmlDevice_t device, nvmlDriverModel_t driverModel, unsigned int flags); @@ -4176,7 +4411,7 @@ index 00000000..778b4bfb + * Set clocks that applications will lock to. + * + * Sets the clocks that compute and graphics applications will be running at. -+ * e.g. CUDA driver requests these clocks during context creation which means this property ++ * e.g. CUDA driver requests these clocks during context creation which means this property + * defines clocks at which CUDA applications will be running unless some overspec event + * occurs (e.g. over power, over thermal or external HW brake). + * @@ -4189,9 +4424,9 @@ index 00000000..778b4bfb + * above the clock value being set. + * + * For Kepler &tm; or newer non-GeForce fully supported devices and Maxwell or newer GeForce devices. -+ * Requires root/admin permissions. ++ * Requires root/admin permissions. + * -+ * See \ref nvmlDeviceGetSupportedMemoryClocks and \ref nvmlDeviceGetSupportedGraphicsClocks ++ * See \ref nvmlDeviceGetSupportedMemoryClocks and \ref nvmlDeviceGetSupportedGraphicsClocks + * for details on how to list available clocks combinations. + * + * After system reboot or driver reload applications clocks go back to their default value. @@ -4200,13 +4435,13 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param memClockMHz Requested memory clock in MHz + * @param graphicsClockMHz Requested graphics clock in MHz -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if new settings were successfully set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized -+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a memClockMHz and \a graphicsClockMHz ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a memClockMHz and \a graphicsClockMHz + * is not a valid clock combination -+ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation ++ * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation + * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error @@ -4215,7 +4450,7 @@ index 00000000..778b4bfb + +/** + * Set new power limit of this device. -+ * ++ * + * For Kepler &tm; or newer fully supported devices. + * Requires root/admin permissions. + * @@ -4226,8 +4461,8 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param limit Power management limit in milliwatts to set -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a limit has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a defaultLimit is out of range @@ -4247,17 +4482,17 @@ index 00000000..778b4bfb + * Modes \ref NVML_GOM_LOW_DP and \ref NVML_GOM_ALL_ON are supported on fully supported GeForce products. + * Not supported on Quadro ® and Tesla &tm; C-class products. + * Requires root/admin permissions. -+ * -+ * Changing GOMs requires a reboot. ++ * ++ * Changing GOMs requires a reboot. + * The reboot requirement might be removed in the future. + * + * Compute only GOMs don't support graphics acceleration. Under windows switching to these GOMs when + * pending driver model is WDDM is not supported. See \ref nvmlDeviceSetDriverModel. -+ * ++ * + * @param device The identifier of the target device + * @param mode Target GOM -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if \a mode has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a mode incorrect @@ -4276,7 +4511,7 @@ index 00000000..778b4bfb + * This method can be used by a root/admin user to give non-root/admin access to certain otherwise-restricted APIs. + * The new setting lasts for the lifetime of the NVIDIA driver; it is not persistent. See \a nvmlDeviceGetAPIRestriction + * to query the current restriction settings. -+ * ++ * + * For Kepler &tm; or newer fully supported devices. + * Requires root/admin permissions. + * @@ -4289,7 +4524,7 @@ index 00000000..778b4bfb + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a apiType incorrect + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support changing API restrictions or the device does not support -+ * the feature that api restrictions are being set for (E.G. Enabling/disabling auto ++ * the feature that api restrictions are being set for (E.G. Enabling/disabling auto + * boosted clocks is not supported by the device) + * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible @@ -4302,7 +4537,7 @@ index 00000000..778b4bfb +/** + * @} + */ -+ ++ +/** @addtogroup nvmlAccountingStats + * @{ + */ @@ -4315,7 +4550,7 @@ index 00000000..778b4bfb + * + * @note This setting is not persistent and will default to disabled after driver unloads. + * Enable persistence mode to be sure the setting doesn't switch off to disabled. -+ * ++ * + * @note Enabling accounting mode has no negative impact on the GPU performance. + * + * @note Disabling accounting clears all accounting pids information. @@ -4327,7 +4562,7 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param mode The target accounting mode + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if the new mode has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a mode are invalid @@ -4349,8 +4584,8 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * -+ * @return -+ * - \ref NVML_SUCCESS if accounting information has been cleared ++ * @return ++ * - \ref NVML_SUCCESS if accounting information has been cleared + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device are invalid + * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature @@ -4376,10 +4611,10 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param link Specifies the NvLink link to be queried + * @param isActive \a nvmlEnableState_t where NVML_FEATURE_ENABLED indicates that -+ * the link is active and NVML_FEATURE_DISABLED indicates it ++ * the link is active and NVML_FEATURE_DISABLED indicates it + * is inactive + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a isActive has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a link is invalid or \a isActive is NULL @@ -4397,7 +4632,7 @@ index 00000000..778b4bfb + * @param link Specifies the NvLink link to be queried + * @param version Requested NvLink version + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a version has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a link is invalid or \a version is NULL @@ -4418,7 +4653,7 @@ index 00000000..778b4bfb + * @param capability Specifies the \a nvmlNvLinkCapability_t to be queried + * @param capResult A boolean for the queried capability indicating that feature is available + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a capResult has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a link, or \a capability is invalid or \a capResult is NULL @@ -4426,19 +4661,19 @@ index 00000000..778b4bfb + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ +nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkCapability(nvmlDevice_t device, unsigned int link, -+ nvmlNvLinkCapability_t capability, unsigned int *capResult); ++ nvmlNvLinkCapability_t capability, unsigned int *capResult); + +/** -+ * Retrieves the PCI information for the remote node on a NvLink link ++ * Retrieves the PCI information for the remote node on a NvLink link + * Note: pciSubSystemId is not filled in this function and is indeterminate + * + * For newer than Maxwell &tm; fully supported devices. + * + * @param device The identifier of the target device + * @param link Specifies the NvLink link to be queried -+ * @param pci \a nvmlPciInfo_t of the remote node for the specified link ++ * @param pci \a nvmlPciInfo_t of the remote node for the specified link + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a pci has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a link is invalid or \a pci is NULL @@ -4458,7 +4693,7 @@ index 00000000..778b4bfb + * @param counter Specifies the NvLink counter to be queried + * @param counterValue Returned counter value + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a counter has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a link, or \a counter is invalid or \a counterValue is NULL @@ -4477,7 +4712,7 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param link Specifies the NvLink link to be queried + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if the reset is successful + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a link is invalid @@ -4499,10 +4734,10 @@ index 00000000..778b4bfb + * @param control A reference to the \a nvmlNvLinkUtilizationControl_t to set + * @param reset Resets the counters on set if non-zero + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if the control has been set successfully + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized -+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a counter, \a link, or \a control is invalid ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a counter, \a link, or \a control is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ @@ -4520,10 +4755,10 @@ index 00000000..778b4bfb + * @param link Specifies the NvLink link to be queried + * @param control A reference to the \a nvmlNvLinkUtilizationControl_t to place information + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if the control has been set successfully + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized -+ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a counter, \a link, or \a control is invalid ++ * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a counter, \a link, or \a control is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ @@ -4544,18 +4779,18 @@ index 00000000..778b4bfb + * @param rxcounter Receive counter return value + * @param txcounter Transmit counter return value + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if \a rxcounter and \a txcounter have been successfully set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a counter, or \a link is invalid or \a rxcounter or \a txcounter are NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ -+nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkUtilizationCounter(nvmlDevice_t device, unsigned int link, unsigned int counter, ++nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkUtilizationCounter(nvmlDevice_t device, unsigned int link, unsigned int counter, + unsigned long long *rxcounter, unsigned long long *txcounter); + +/** -+ * Freeze the NVLINK utilization counters ++ * Freeze the NVLINK utilization counters + * Both the receive and transmit counters are operated on by this function + * + * For newer than Maxwell &tm; fully supported devices. @@ -4566,18 +4801,18 @@ index 00000000..778b4bfb + * @param freeze NVML_FEATURE_ENABLED = freeze the receive and transmit counters + * NVML_FEATURE_DISABLED = unfreeze the receive and transmit counters + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if counters were successfully frozen or unfrozen + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a link, \a counter, or \a freeze is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ -+nvmlReturn_t DECLDIR nvmlDeviceFreezeNvLinkUtilizationCounter (nvmlDevice_t device, unsigned int link, ++nvmlReturn_t DECLDIR nvmlDeviceFreezeNvLinkUtilizationCounter (nvmlDevice_t device, unsigned int link, + unsigned int counter, nvmlEnableState_t freeze); + +/** -+ * Reset the NVLINK utilization counters ++ * Reset the NVLINK utilization counters + * Both the receive and transmit counters are operated on by this function + * + * For newer than Maxwell &tm; fully supported devices. @@ -4586,7 +4821,7 @@ index 00000000..778b4bfb + * @param link Specifies the NvLink link to be reset + * @param counter Specifies the counter that should be reset (0 or 1) + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if counters were successfully reset + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device, \a link, or \a counter is invalid @@ -4599,7 +4834,7 @@ index 00000000..778b4bfb + +/***************************************************************************************************/ +/** @defgroup nvmlEvents Event Handling Methods -+ * This chapter describes methods that NVML can perform against each device to register and wait for ++ * This chapter describes methods that NVML can perform against each device to register and wait for + * some event to occur. + * @{ + */ @@ -4611,13 +4846,13 @@ index 00000000..778b4bfb + * + * For Fermi &tm; or newer fully supported devices. + * @param set Reference in which to return the event handle -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if the event has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a set is NULL + * - \ref NVML_ERROR_UNKNOWN on any unexpected error -+ * ++ * + * @see nvmlEventSetFree + */ +nvmlReturn_t DECLDIR nvmlEventSetCreate(nvmlEventSet_t *set); @@ -4644,15 +4879,15 @@ index 00000000..778b4bfb + * @param device The identifier of the target device + * @param eventTypes Bitmask of \ref nvmlEventType to record + * @param set Set to which add new event types -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if the event has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a eventTypes is invalid or \a set is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if the platform does not support this feature or some of requested event types + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error -+ * ++ * + * @see nvmlEventType + * @see nvmlDeviceGetSupportedEventTypes + * @see nvmlEventSetWait @@ -4669,14 +4904,14 @@ index 00000000..778b4bfb + * + * @param device The identifier of the target device + * @param eventTypes Reference in which to return bitmask of supported events -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if the eventTypes has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a eventType is NULL + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error -+ * ++ * + * @see nvmlEventType + * @see nvmlDeviceRegisterEvents + */ @@ -4688,26 +4923,26 @@ index 00000000..778b4bfb + * For Fermi &tm; or newer fully supported devices. + * + * If some events are ready to be delivered at the time of the call, function returns immediately. -+ * If there are no events ready to be delivered, function sleeps till event arrives ++ * If there are no events ready to be delivered, function sleeps till event arrives + * but not longer than specified timeout. This function in certain conditions can return before + * specified timeout passes (e.g. when interrupt arrives) -+ * ++ * + * In case of xid error, the function returns the most recent xid error type seen by the system. If there are multiple + * xid errors generated before nvmlEventSetWait is invoked then the last seen xid error type is returned for all + * xid error events. -+ * ++ * + * @param set Reference to set of events to wait on + * @param data Reference in which to return event data + * @param timeoutms Maximum amount of wait time in milliseconds for registered event -+ * -+ * @return ++ * ++ * @return + * - \ref NVML_SUCCESS if the data has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a data is NULL + * - \ref NVML_ERROR_TIMEOUT if no event arrived in specified timeout or interrupt arrived + * - \ref NVML_ERROR_GPU_IS_LOST if a GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error -+ * ++ * + * @see nvmlEventType + * @see nvmlDeviceRegisterEvents + */ @@ -4718,13 +4953,13 @@ index 00000000..778b4bfb + * + * For Fermi &tm; or newer fully supported devices. + * -+ * @param set Reference to events to be released -+ * -+ * @return ++ * @param set Reference to events to be released ++ * ++ * @return + * - \ref NVML_SUCCESS if the event has been successfully released + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_UNKNOWN on any unexpected error -+ * ++ * + * @see nvmlDeviceRegisterEvents + */ +nvmlReturn_t DECLDIR nvmlEventSetFree(nvmlEventSet_t set); @@ -4732,7 +4967,7 @@ index 00000000..778b4bfb +/** @} */ + +/***************************************************************************************************/ -+/** @defgroup nvmlZPI Drain states ++/** @defgroup nvmlZPI Drain states + * This chapter describes methods that NVML can perform against each device to control their drain state + * and recognition by NVML and NVIDIA kernel driver. These methods can be used with out-of-band tools to + * power on/off GPUs, enable robust reset scenarios, etc. @@ -4746,14 +4981,14 @@ index 00000000..778b4bfb + * this call is made. + * Must be called as administrator. + * For Linux only. -+ * ++ * + * For newer than Maxwell &tm; fully supported devices. + * Some Kepler devices supported. + * + * @param pciInfo The PCI address of the GPU drain state to be modified + * @param newState The drain state that should be entered, see \ref nvmlEnableState_t + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if counters were successfully reset + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a nvmlIndex or \a newState is invalid @@ -4768,14 +5003,14 @@ index 00000000..778b4bfb + * Query the drain state of a GPU. This method is used to check if a GPU is in a currently draining + * state. + * For Linux only. -+ * ++ * + * For newer than Maxwell &tm; fully supported devices. + * Some Kepler devices supported. + * + * @param pciInfo The PCI address of the GPU drain state to be queried + * @param currentState The current drain state for this GPU, see \ref nvmlEnableState_t + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if counters were successfully reset + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a nvmlIndex or \a currentState is invalid @@ -4789,14 +5024,14 @@ index 00000000..778b4bfb + * as long as no other processes are attached. If other processes are attached, this call will return + * NVML_ERROR_IN_USE and the GPU will be returned to its original "draining" state. Note: the + * only situation where a process can still be attached after nvmlDeviceModifyDrainState() is called -+ * to initiate the draining state is if that process was using, and is still using, a GPU before the ++ * to initiate the draining state is if that process was using, and is still using, a GPU before the + * call was made. Also note, persistence mode counts as an attachment to the GPU thus it must be disabled + * prior to this call. + * + * For long-running NVML processes please note that this will change the enumeration of current GPUs. + * For example, if there are four GPUs present and GPU1 is removed, the new enumeration will be 0-2. + * Also, device handles after the removed GPU will not be valid and must be re-established. -+ * Must be run as administrator. ++ * Must be run as administrator. + * For Linux only. + * + * For newer than Maxwell &tm; fully supported devices. @@ -4815,7 +5050,7 @@ index 00000000..778b4bfb + +/** + * Request the OS and the NVIDIA kernel driver to rediscover a portion of the PCI subsystem looking for GPUs that -+ * were previously removed. The portion of the PCI tree can be narrowed by specifying a domain, bus, and device. ++ * were previously removed. The portion of the PCI tree can be narrowed by specifying a domain, bus, and device. + * If all are zeroes then the entire PCI tree will be searched. Please note that for long-running NVML processes + * the enumeration will change based on how many GPUs are discovered and where they are inserted in bus order. + * @@ -4824,14 +5059,14 @@ index 00000000..778b4bfb + * + * Must be run as administrator. + * For Linux only. -+ * ++ * + * For newer than Maxwell &tm; fully supported devices. + * Some Kepler devices supported. + * + * @param pciInfo The PCI tree to be searched. Only the domain, bus, and device + * fields are used in this call. + * -+ * @return ++ * @return + * - \ref NVML_SUCCESS if counters were successfully reset + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a pciInfo is invalid @@ -4861,5 +5096,5 @@ index 00000000..778b4bfb + +#endif -- -2.14.2 +2.17.0 diff --git a/SOURCES/0001-smartcard-Wait-until-smartcards-are-inspected-before.patch b/SOURCES/0001-smartcard-Wait-until-smartcards-are-inspected-before.patch index 5eb3b93..36a5574 100644 --- a/SOURCES/0001-smartcard-Wait-until-smartcards-are-inspected-before.patch +++ b/SOURCES/0001-smartcard-Wait-until-smartcards-are-inspected-before.patch @@ -1,4 +1,4 @@ -From 0c5ef2671ad9e439ced820d0a5f6a26ed67cb6e8 Mon Sep 17 00:00:00 2001 +From 0665bd86221d3c9012f0391d8e4939a2d12b6417 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 9 Feb 2018 16:39:12 -0500 Subject: [PATCH 1/2] smartcard: Wait until smartcards are inspected before @@ -11,7 +11,7 @@ the smartcard's insertion status. This commit fixes the race by iterating through all smartcards at startup and checking their status explicitly. --- - plugins/smartcard/gsd-smartcard-manager.c | 61 +++++++++++++++++++++++++------ + plugins/smartcard/gsd-smartcard-manager.c | 61 ++++++++++++++++++----- 1 file changed, 49 insertions(+), 12 deletions(-) diff --git a/plugins/smartcard/gsd-smartcard-manager.c b/plugins/smartcard/gsd-smartcard-manager.c @@ -335,5 +335,5 @@ index a6245425..94ffdd90 100644 else g_task_return_new_error (task, GSD_SMARTCARD_MANAGER_ERROR, -- -2.14.3 +2.17.0 diff --git a/SOURCES/0002-Revert-sharing-Fix-function-arguments.patch b/SOURCES/0002-Revert-sharing-Fix-function-arguments.patch index c11a134..c2bba55 100644 --- a/SOURCES/0002-Revert-sharing-Fix-function-arguments.patch +++ b/SOURCES/0002-Revert-sharing-Fix-function-arguments.patch @@ -1,4 +1,4 @@ -From 12a9c6d06abcd8276612a982b98dbb757b0cd5d3 Mon Sep 17 00:00:00 2001 +From 0d732317df634f7586cf6c5e34394082ea5ea931 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Wed, 11 Oct 2017 18:10:40 +0200 Subject: [PATCH 2/3] Revert "sharing: Fix function arguments" @@ -12,7 +12,34 @@ diff --git a/plugins/sharing/gsd-sharing-manager.c b/plugins/sharing/gsd-sharing index a90df9a6..26663442 100644 --- a/plugins/sharing/gsd-sharing-manager.c +++ b/plugins/sharing/gsd-sharing-manager.c -@@ -128,6 +128,7 @@ handle_unit_cb (GObject *source_object, +@@ -101,99 +101,102 @@ static const char * const services[] = { + "vino-server", + "gnome-remote-desktop", + "gnome-user-share-webdav" + }; + + static void + handle_unit_cb (GObject *source_object, + GAsyncResult *res, + gpointer user_data) + { + GError *error = NULL; + GVariant *ret; + const char *operation = user_data; + + ret = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object), + res, &error); + if (!ret) { + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_warning ("Failed to %s service: %s", operation, error->message); + g_error_free (error); + return; + } + + g_variant_unref (ret); + + } + static void gsd_sharing_manager_handle_service (GsdSharingManager *manager, const char *method, @@ -20,7 +47,15 @@ index a90df9a6..26663442 100644 ServiceInfo *service) { char *service_file; -@@ -143,8 +144,8 @@ gsd_sharing_manager_handle_service (GsdSharingManager *manager, + + service_file = g_strdup_printf ("%s.service", service->name); + g_dbus_connection_call (manager->priv->connection, + "org.freedesktop.systemd1", + "/org/freedesktop/systemd1", + "org.freedesktop.systemd1.Manager", + method, + g_variant_new ("(ss)", service_file, "replace"), + NULL, G_DBUS_CALL_FLAGS_NONE, -1, manager->priv->cancellable, @@ -31,7 +66,12 @@ index a90df9a6..26663442 100644 g_free (service_file); } -@@ -157,7 +158,8 @@ gsd_sharing_manager_start_service (GsdSharingManager *manager, + static void + gsd_sharing_manager_start_service (GsdSharingManager *manager, + ServiceInfo *service) + { + g_debug ("About to start %s", service->name); + /* We use StartUnit, not StartUnitReplace, since the latter would * cancel any pending start we already have going from an * earlier _start_service() call */ @@ -41,7 +81,8 @@ index a90df9a6..26663442 100644 } static void -@@ -166,7 +168,8 @@ gsd_sharing_manager_stop_service (GsdSharingManager *manager, + gsd_sharing_manager_stop_service (GsdSharingManager *manager, + ServiceInfo *service) { g_debug ("About to stop %s", service->name); @@ -51,6 +92,33 @@ index a90df9a6..26663442 100644 } #ifdef HAVE_NETWORK_MANAGER + static gboolean + service_is_enabled_on_current_connection (GsdSharingManager *manager, + ServiceInfo *service) + { + char **connections; + int j; + gboolean ret; + connections = g_settings_get_strv (service->settings, "enabled-connections"); + ret = FALSE; + for (j = 0; connections[j] != NULL; j++) { + if (g_strcmp0 (connections[j], manager->priv->current_network) == 0) { + ret = TRUE; + break; + } + } + + g_strfreev (connections); + return ret; + } + #else + static gboolean + service_is_enabled_on_current_connection (GsdSharingManager *manager, + ServiceInfo *service) + { + return FALSE; + } + #endif /* HAVE_NETWORK_MANAGER */ -- -2.13.5 +2.17.0 diff --git a/SOURCES/0002-account-reshow-the-notification-when-screen-unlocks.patch b/SOURCES/0002-account-reshow-the-notification-when-screen-unlocks.patch index 1aab92b..73eb356 100644 --- a/SOURCES/0002-account-reshow-the-notification-when-screen-unlocks.patch +++ b/SOURCES/0002-account-reshow-the-notification-when-screen-unlocks.patch @@ -1,62 +1,14 @@ -From a7d9b55b339aa7b6833aa377a396157fa5a23cb1 Mon Sep 17 00:00:00 2001 +From 1a3c72c8c6abcc3c08e69c5c238636a2dc56ed2d Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 6 Nov 2017 15:49:58 -0500 Subject: [PATCH 2/3] account: reshow the notification when screen unlocks --- - data/Makefile.am | 1 + - plugins/account/gsd-account-manager.c | 48 +++++++++++++++++++++++++++++++---- - 2 files changed, 44 insertions(+), 5 deletions(-) + plugins/account/gsd-account-manager.c | 48 ++++++++++++++++++++++++--- + 1 file changed, 43 insertions(+), 5 deletions(-) -diff --git a/data/Makefile.am b/data/Makefile.am -index 06fd2b38..c34b7a9c 100644 ---- a/data/Makefile.am -+++ b/data/Makefile.am -@@ -1,41 +1,42 @@ - NULL = - - apidir = $(includedir)/gnome-settings-daemon-$(GSD_API_VERSION)/gnome-settings-daemon - api_DATA = gsd-enums.h - - gsettings_ENUM_NAMESPACE = org.gnome.settings-daemon - gsettings_ENUM_FILES = $(top_srcdir)/data/$(api_DATA) - - gsettings_SCHEMAS = \ - org.gnome.settings-daemon.peripherals.gschema.xml \ - org.gnome.settings-daemon.plugins.gschema.xml \ -+ org.gnome.settings-daemon.plugins.account.gschema.xml \ - org.gnome.settings-daemon.plugins.power.gschema.xml \ - org.gnome.settings-daemon.plugins.color.gschema.xml \ - org.gnome.settings-daemon.plugins.media-keys.gschema.xml \ - org.gnome.settings-daemon.plugins.sharing.gschema.xml \ - org.gnome.settings-daemon.plugins.xsettings.gschema.xml \ - org.gnome.settings-daemon.plugins.housekeeping.gschema.xml \ - org.gnome.settings-daemon.peripherals.wacom.gschema.xml - - @INTLTOOL_XML_NOMERGE_RULE@ - - @GSETTINGS_RULES@ - - convertdir = $(datadir)/GConf/gsettings - convert_DATA = gnome-settings-daemon.convert - - pkgconfigdir = $(libdir)/pkgconfig - pkgconfig_DATA = gnome-settings-daemon.pc - - @INTLTOOL_XML_NOMERGE_RULE@ - - EXTRA_DIST = \ - $(convert_DATA) \ - $(gsettings_SCHEMAS:.xml=.xml.in.in) \ - $(gsettings_ENUM_FILES) \ - gnome-settings-daemon.pc.in \ - $(api_DATA) \ - $(NULL) - - DISTCLEANFILES = \ - $(gsettings_SCHEMAS) \ diff --git a/plugins/account/gsd-account-manager.c b/plugins/account/gsd-account-manager.c -index 642d5bcc..948679b1 100644 +index 40b91cb6..cb37f466 100644 --- a/plugins/account/gsd-account-manager.c +++ b/plugins/account/gsd-account-manager.c @@ -11,72 +11,75 @@ @@ -315,5 +267,5 @@ index 642d5bcc..948679b1 100644 manager = GSD_ACCOUNT_MANAGER (object); -- -2.14.2 +2.17.0 diff --git a/SOURCES/0002-smartcard-handle-a-smartcard-getting-removed-very-sh.patch b/SOURCES/0002-smartcard-handle-a-smartcard-getting-removed-very-sh.patch index 66cee9d..fdb7703 100644 --- a/SOURCES/0002-smartcard-handle-a-smartcard-getting-removed-very-sh.patch +++ b/SOURCES/0002-smartcard-handle-a-smartcard-getting-removed-very-sh.patch @@ -1,4 +1,4 @@ -From 492b0d048e126b690754cb3cac29eabfa608a9d9 Mon Sep 17 00:00:00 2001 +From 3aa4de5e6f2b698abf063ddbea5008f5b732aa18 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 9 Feb 2018 16:40:53 -0500 Subject: [PATCH 2/2] smartcard: handle a smartcard getting removed very @@ -15,7 +15,7 @@ smartcard alias object that's around even if the login token isn't. Once the login token does show up it gets synchronized with it, so both object paths refer to the same underlying token. --- - plugins/smartcard/gsd-smartcard-service.c | 82 +++++++++++++++++++++++++++++++ + plugins/smartcard/gsd-smartcard-service.c | 82 +++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/plugins/smartcard/gsd-smartcard-service.c b/plugins/smartcard/gsd-smartcard-service.c @@ -380,5 +380,5 @@ index 0710334b..6969ff34 100644 RegisterNewTokenOperation *operation; SECMODModule *driver; -- -2.14.3 +2.17.0 diff --git a/SOURCES/0003-Revert-sharing-Use-systemd-to-track-running-services.patch b/SOURCES/0003-Revert-sharing-Use-systemd-to-track-running-services.patch index 55b656f..9a9265e 100644 --- a/SOURCES/0003-Revert-sharing-Use-systemd-to-track-running-services.patch +++ b/SOURCES/0003-Revert-sharing-Use-systemd-to-track-running-services.patch @@ -1,18 +1,45 @@ -From dc9f7c0adc0b65aec010586e8b9848db5f0964de Mon Sep 17 00:00:00 2001 +From 9b03a1eb04442c74dd990cda0f44ccf283413a75 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Wed, 11 Oct 2017 18:10:54 +0200 Subject: [PATCH 3/3] Revert "sharing: Use systemd to track running services" This reverts commit e0b7f4143bdd201c824499dd09159f5890a07c6a. --- - plugins/sharing/gsd-sharing-manager.c | 114 ++++++++++++++++------------------ + plugins/sharing/gsd-sharing-manager.c | 114 +++++++++++++------------- 1 file changed, 55 insertions(+), 59 deletions(-) diff --git a/plugins/sharing/gsd-sharing-manager.c b/plugins/sharing/gsd-sharing-manager.c index 26663442..b24c4814 100644 --- a/plugins/sharing/gsd-sharing-manager.c +++ b/plugins/sharing/gsd-sharing-manager.c -@@ -38,6 +38,8 @@ +@@ -11,60 +11,62 @@ + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + */ + + #include "config.h" + + #include + #include + #include + #include + #include + + #ifdef HAVE_NETWORK_MANAGER + #include + #endif /* HAVE_NETWORK_MANAGER */ + + #include "gnome-settings-profile.h" + #include "gsd-sharing-manager.h" + #include "gsd-sharing-enums.h" + + #define GSD_SHARING_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_SHARING_MANAGER, GsdSharingManagerPrivate)) + typedef struct { const char *name; GSettings *settings; @@ -21,7 +48,61 @@ index 26663442..b24c4814 100644 } ServiceInfo; struct GsdSharingManagerPrivate -@@ -104,72 +106,48 @@ static const char * const services[] = { + { + GDBusNodeInfo *introspection_data; + guint name_id; + GDBusConnection *connection; + + GCancellable *cancellable; + #ifdef HAVE_NETWORK_MANAGER + NMClient *client; + #endif /* HAVE_NETWORK_MANAGER */ + + GHashTable *services; + + char *current_network; + char *current_network_name; + char *carrier_type; + GsdSharingStatus sharing_status; + }; + + #define GSD_DBUS_NAME "org.gnome.SettingsDaemon" + #define GSD_DBUS_PATH "/org/gnome/SettingsDaemon" + #define GSD_DBUS_BASE_INTERFACE "org.gnome.SettingsDaemon" + + #define GSD_SHARING_DBUS_NAME GSD_DBUS_NAME ".Sharing" + #define GSD_SHARING_DBUS_PATH GSD_DBUS_PATH "/Sharing" + + static const gchar introspection_xml[] = + "" +@@ -77,176 +79,170 @@ static const gchar introspection_xml[] = + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + ""; + + static void gsd_sharing_manager_class_init (GsdSharingManagerClass *klass); + static void gsd_sharing_manager_init (GsdSharingManager *manager); + static void gsd_sharing_manager_finalize (GObject *object); + + G_DEFINE_TYPE (GsdSharingManager, gsd_sharing_manager, G_TYPE_OBJECT) + + static gpointer manager_object = NULL; + + static const char * const services[] = { + "rygel", + "vino-server", + "gnome-remote-desktop", + "gnome-user-share-webdav" }; static void @@ -125,10 +206,35 @@ index 26663442..b24c4814 100644 } #ifdef HAVE_NETWORK_MANAGER -@@ -202,6 +180,22 @@ service_is_enabled_on_current_connection (GsdSharingManager *manager, + static gboolean + service_is_enabled_on_current_connection (GsdSharingManager *manager, + ServiceInfo *service) + { + char **connections; + int j; + gboolean ret; + connections = g_settings_get_strv (service->settings, "enabled-connections"); + ret = FALSE; + for (j = 0; connections[j] != NULL; j++) { + if (g_strcmp0 (connections[j], manager->priv->current_network) == 0) { + ret = TRUE; + break; + } + } + + g_strfreev (connections); + return ret; + } + #else + static gboolean + service_is_enabled_on_current_connection (GsdSharingManager *manager, + ServiceInfo *service) + { + return FALSE; + } #endif /* HAVE_NETWORK_MANAGER */ - static void ++static void +gsd_sharing_manager_stop_service (GsdSharingManager *manager, + ServiceInfo *service) +{ @@ -144,11 +250,18 @@ index 26663442..b24c4814 100644 + service->started = FALSE; +} + -+static void + static void gsd_sharing_manager_sync_services (GsdSharingManager *manager) { GList *services, *l; -@@ -216,10 +210,12 @@ gsd_sharing_manager_sync_services (GsdSharingManager *manager) + + services = g_hash_table_get_values (manager->priv->services); + + for (l = services; l != NULL; l = l->next) { + ServiceInfo *service = l->data; + gboolean should_be_started = FALSE; + + if (manager->priv->sharing_status == GSD_SHARING_STATUS_AVAILABLE && service_is_enabled_on_current_connection (manager, service)) should_be_started = TRUE; @@ -165,6 +278,33 @@ index 26663442..b24c4814 100644 } g_list_free (services); } + + #ifdef HAVE_NETWORK_MANAGER + static void + properties_changed (GsdSharingManager *manager) + { + GVariantBuilder props_builder; + GVariant *props_changed = NULL; + + /* not yet connected to the session bus */ + if (manager->priv->connection == NULL) + return; + + g_variant_builder_init (&props_builder, G_VARIANT_TYPE ("a{sv}")); + + g_variant_builder_add (&props_builder, "{sv}", "CurrentNetwork", + g_variant_new_string (manager->priv->current_network)); + g_variant_builder_add (&props_builder, "{sv}", "CurrentNetworkName", + g_variant_new_string (manager->priv->current_network_name)); + g_variant_builder_add (&props_builder, "{sv}", "CarrierType", + g_variant_new_string (manager->priv->carrier_type)); + g_variant_builder_add (&props_builder, "{sv}", "SharingStatus", + g_variant_new_uint32 (manager->priv->sharing_status)); + + props_changed = g_variant_new ("(s@a{sv}@as)", GSD_SHARING_DBUS_NAME, + g_variant_builder_end (&props_builder), + g_variant_new_strv (NULL, 0)); + -- -2.13.5 +2.17.0 diff --git a/SOURCES/0003-account-display-nag-screen-periodically.patch b/SOURCES/0003-account-display-nag-screen-periodically.patch index 1d20d8e..2488442 100644 --- a/SOURCES/0003-account-display-nag-screen-periodically.patch +++ b/SOURCES/0003-account-display-nag-screen-periodically.patch @@ -1,99 +1,75 @@ -From 457ca3295017c34c6805c9dd18599b760705afc5 Mon Sep 17 00:00:00 2001 +From 0cc5343bdd13cd208e394bb430ecef43748dbc49 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 6 Nov 2017 16:39:55 -0500 Subject: [PATCH 3/3] account: display nag screen periodically This is configurable via a gsettings key. --- - configure.ac | 1 + - ...ttings-daemon.plugins.account.gschema.xml.in.in | 9 ++++ - plugins/account/gsd-account-manager.c | 55 ++++++++++++++++++++++ + data/meson.build | 1 + + ...ings-daemon.plugins.account.gschema.xml.in | 9 +++ + plugins/account/gsd-account-manager.c | 55 +++++++++++++++++++ 3 files changed, 65 insertions(+) - create mode 100644 data/org.gnome.settings-daemon.plugins.account.gschema.xml.in.in + create mode 100644 data/org.gnome.settings-daemon.plugins.account.gschema.xml.in -diff --git a/configure.ac b/configure.ac -index 5bd742e5..ed5374db 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -508,60 +508,61 @@ AC_SUBST(DEBUG_CFLAGS) - - AC_CONFIG_FILES([ - Makefile - gnome-settings-daemon/Makefile - plugins/Makefile - plugins/a11y-keyboard/Makefile - plugins/a11y-settings/Makefile - plugins/account/Makefile - plugins/clipboard/Makefile - plugins/color/Makefile - plugins/common/Makefile - plugins/datetime/Makefile - plugins/dummy/Makefile - plugins/power/Makefile - plugins/housekeeping/Makefile - plugins/keyboard/Makefile - plugins/media-keys/Makefile - plugins/media-keys/gvc/Makefile - plugins/mouse/Makefile - plugins/print-notifications/Makefile - plugins/rfkill/Makefile - plugins/screensaver-proxy/Makefile - plugins/sharing/Makefile - plugins/smartcard/Makefile - plugins/sound/Makefile - plugins/wacom/Makefile - plugins/xsettings/Makefile - data/Makefile - data/gnome-settings-daemon.pc - data/org.gnome.settings-daemon.plugins.gschema.xml.in -+data/org.gnome.settings-daemon.plugins.account.gschema.xml.in - data/org.gnome.settings-daemon.plugins.xsettings.gschema.xml.in - data/org.gnome.settings-daemon.plugins.power.gschema.xml.in - data/org.gnome.settings-daemon.plugins.color.gschema.xml.in - data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in - data/org.gnome.settings-daemon.peripherals.gschema.xml.in - data/org.gnome.settings-daemon.plugins.housekeeping.gschema.xml.in - data/org.gnome.settings-daemon.plugins.sharing.gschema.xml.in - data/org.gnome.settings-daemon.peripherals.wacom.gschema.xml.in - po/Makefile.in - tests/Makefile - ]) - AC_OUTPUT - - dnl --------------------------------------------------------------------------- - dnl - Show summary - dnl --------------------------------------------------------------------------- - - echo " - gnome-settings-daemon $VERSION - ============================= - - prefix: ${prefix} - exec_prefix: ${exec_prefix} - libdir: ${libdir} - bindir: ${bindir} - sbindir: ${sbindir} - sysconfdir: ${sysconfdir} - sysconfsubdir: ${sysconfsubdir} - localstatedir: ${localstatedir} - plugindir: ${plugindir} -diff --git a/data/org.gnome.settings-daemon.plugins.account.gschema.xml.in.in b/data/org.gnome.settings-daemon.plugins.account.gschema.xml.in.in +diff --git a/data/meson.build b/data/meson.build +index 5c4fb507..37eea875 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -1,36 +1,37 @@ + data_inc = include_directories('.') + + schemas = [ + 'org.gnome.settings-daemon.peripherals.gschema.xml', + 'org.gnome.settings-daemon.peripherals.wacom.gschema.xml', + 'org.gnome.settings-daemon.plugins.gschema.xml', ++ 'org.gnome.settings-daemon.plugins.account.gschema.xml', + 'org.gnome.settings-daemon.plugins.color.gschema.xml', + 'org.gnome.settings-daemon.plugins.housekeeping.gschema.xml', + 'org.gnome.settings-daemon.plugins.media-keys.gschema.xml', + 'org.gnome.settings-daemon.plugins.power.gschema.xml', + 'org.gnome.settings-daemon.plugins.sharing.gschema.xml', + 'org.gnome.settings-daemon.plugins.xsettings.gschema.xml' + ] + + schema_conf = configuration_data() + schema_conf.set('GETTEXT_PACKAGE', meson.project_name()) + + foreach schema: schemas + configure_file( + input: schema + '.in', + output: schema, + configuration: schema_conf, + install: true, + install_dir: gsd_schemadir + ) + endforeach + + enums_header = files('gsd-enums.h') + + gnome.mkenums( + 'org.gnome.settings-daemon.enums.xml', + sources: enums_header, + comments: '', + fhead: '', + vhead: ' <@type@ id="org.gnome.settings-daemon.@EnumName@">', + vprod: ' ', +diff --git a/data/org.gnome.settings-daemon.plugins.account.gschema.xml.in b/data/org.gnome.settings-daemon.plugins.account.gschema.xml.in new file mode 100644 index 00000000..0b3a9d97 --- /dev/null -+++ b/data/org.gnome.settings-daemon.plugins.account.gschema.xml.in.in ++++ b/data/org.gnome.settings-daemon.plugins.account.gschema.xml.in @@ -0,0 +1,9 @@ + + + + 1440 -+ <_summary>Time before repeated warning about account password expiration -+ <_description>If a user's account is expiring, a notification will get displayed periodically after the specified number of minutes ++ Time before repeated warning about account password expiration ++ If a user's account is expiring, a notification will get displayed periodically after the specified number of minutes + + + diff --git a/plugins/account/gsd-account-manager.c b/plugins/account/gsd-account-manager.c -index 948679b1..f6db04f8 100644 +index cb37f466..ff054edd 100644 --- a/plugins/account/gsd-account-manager.c +++ b/plugins/account/gsd-account-manager.c @@ -20,126 +20,135 @@ @@ -471,5 +447,5 @@ index 948679b1..f6db04f8 100644 g_return_if_fail (object != NULL); -- -2.14.2 +2.17.0 diff --git a/SOURCES/gnome-settings-daemon-python3.patch b/SOURCES/gnome-settings-daemon-python3.patch new file mode 100644 index 0000000..5eddeed --- /dev/null +++ b/SOURCES/gnome-settings-daemon-python3.patch @@ -0,0 +1,16 @@ +--- gnome-settings-daemon-3.28.1/meson_post_install.py.python3 2018-04-12 19:08:48.000000000 +0200 ++++ gnome-settings-daemon-3.28.1/meson_post_install.py 2018-05-16 22:30:01.512877876 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!/usr/bin/env python + + import os + import subprocess +--- gnome-settings-daemon-3.28.1/gnome-settings-daemon/codegen.py.python3 2018-04-12 19:08:48.000000000 +0200 ++++ gnome-settings-daemon-3.28.1/gnome-settings-daemon/codegen.py 2018-05-16 22:30:21.080876549 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!/usr/bin/env python + + ''' + FIXME diff --git a/SOURCES/org.gnome.settings-daemon.plugins.power.gschema.override b/SOURCES/org.gnome.settings-daemon.plugins.power.gschema.override new file mode 100644 index 0000000..17c223f --- /dev/null +++ b/SOURCES/org.gnome.settings-daemon.plugins.power.gschema.override @@ -0,0 +1,3 @@ +[org.gnome.settings-daemon.plugins.power] +sleep-inactive-ac-timeout=0 +sleep-inactive-battery-timeout=0 diff --git a/SPECS/gnome-settings-daemon.spec b/SPECS/gnome-settings-daemon.spec index 92aa10f..490a535 100644 --- a/SPECS/gnome-settings-daemon.spec +++ b/SPECS/gnome-settings-daemon.spec @@ -1,19 +1,20 @@ %global glib2_version 2.53.0 %global gtk3_version 3.15.3 -%global gnome_desktop_version 3.11.1 +%global gnome_desktop_version 3.27.90 %global libgweather_version 3.9.5 %global gsettings_desktop_schemas_version 3.23.3 %global geocode_glib_version 3.10.0 %global geoclue_version 2.3.1 Name: gnome-settings-daemon -Version: 3.26.2 -Release: 9%{?dist} +Version: 3.28.1 +Release: 2%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications License: GPLv2+ URL: https://download.gnome.org/sources/%{name} -Source0: https://download.gnome.org/sources/%{name}/3.26/%{name}-%{version}.tar.xz +Source0: https://download.gnome.org/sources/%{name}/3.28/%{name}-%{version}.tar.xz +Source1: org.gnome.settings-daemon.plugins.power.gschema.override Patch0: 0001-Revert-Revert-plugins-Work-around-startup-deadlock.patch Patch1: 0002-Revert-sharing-Fix-function-arguments.patch @@ -24,13 +25,16 @@ Patch11: 0002-account-reshow-the-notification-when-screen-unlocks.patch Patch12: 0003-account-display-nag-screen-periodically.patch Patch20: 0001-housekeeping-Add-a-GPU-memory-usage-notification.patch -Patch21: 0001-common-Ensure-screen-integrated-devices-get-remapped.patch Patch40: 0001-smartcard-Wait-until-smartcards-are-inspected-before.patch Patch41: 0002-smartcard-handle-a-smartcard-getting-removed-very-sh.patch -BuildRequires: autoconf automake libtool gnome-common -BuildRequires: git +Patch50: gnome-settings-daemon-python3.patch + +BuildRequires: cups-devel +BuildRequires: gettext +BuildRequires: meson +BuildRequires: perl BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(colord) >= 1.0.2 BuildRequires: pkgconfig(fontconfig) @@ -56,13 +60,7 @@ BuildRequires: pkgconfig(upower-glib) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xtst) -BuildRequires: gettext intltool -BuildRequires: cups-devel -%if 0%{?fedora} BuildRequires: pkgconfig(wayland-client) -%endif -BuildRequires: libxslt -BuildRequires: docbook-style-xsl %ifnarch s390 s390x BuildRequires: pkgconfig(libwacom) >= 0.7 BuildRequires: pkgconfig(xorg-wacom) @@ -84,11 +82,14 @@ Obsoletes: %{name}-updates < 3.13.1 Obsoletes: drwright < 3.5.0-3 Obsoletes: gnome-settings-daemon-devel < 3.23.1 +# The "org.gnome.SettingsDaemon.A11yKeyboard" has been been removed, now +# handled in gnome-shell/mutter instead; this conflict here makes sure not to +# break older gdm and gnome-session releases that expect the functionality +Conflicts: gdm < 1:3.27.90 +Conflicts: gnome-session < 3.27.90 # The orientation and xrandr plugins were removed in 3.25.4 and their # functionality was moved to mutter; this conflict here makes sure not to break # older gdm, gnome-session and gnome-shell releases that expect the functionality -Conflicts: gdm < 1:3.25.4.1 -Conflicts: gnome-session < 3.25.4 Conflicts: gnome-shell < 3.25.4 %description @@ -104,19 +105,16 @@ The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep -%autosetup -S git - -autoreconf -f -i +%autosetup -p1 %build -%configure --disable-static \ - --enable-profiling -make %{?_smp_mflags} - +%meson +%meson_build %install -%make_install -find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' +%meson_install + +cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas %find_lang %{name} --with-gnome @@ -142,9 +140,6 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : # list daemons explicitly, so we notice if one goes missing # some of these don't have a separate gschema -%{_libexecdir}/gsd-a11y-keyboard -%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.A11yKeyboard.desktop - %{_libexecdir}/gsd-account %{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Account.desktop %{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.account.gschema.xml @@ -177,6 +172,7 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %{_libexecdir}/gsd-power %{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Power.desktop %{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.xml +%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.override %{_libexecdir}/gsd-print-notifications %{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.PrintNotifications.desktop @@ -235,6 +231,14 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %{_libexecdir}/gsd-test-input-helper %changelog +* Thu Jul 26 2018 Ray Strode - 3.28.1-2 +- Fix account schema + Resolves: #1597353 + +* Thu Apr 12 2018 Kalev Lember - 3.28.1-1 +- Update to 3.28.1 +- Resolves: #1568621 + * Wed Feb 14 2018 Bastien Nocera - 3.26.2-9 + gnome-settings-daemon-3.26.2-9 - Revert automatic suspend after inactivity, it was rejected