[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1065653: bookworm-pu: package nvidia-modprobe/535.161.07-1~deb12u1



Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian.org@packages.debian.org
Usertags: pu

[ Reason ]
In preparation to switching bookworm from the nvidia-graphics-drivers
525.* series (production branch, EoL) to the 535.* series (long term
support branch, receives updates until July 2026), we need to update
nvidia-modprobe again. We already have a 535 release in bookworm, but
there was recently a new option being added.

[ Impact ]
nvidia-modprobe differing in features from the upstream version shipped
with the corresponding nvidia driver version.

[ Tests ]
Testing the new option would require a Grace Hopper chip.

[ Risks ]
Low. Adds a new option, other codepaths unaffected.

[ Checklist ]
  [*] *all* changes are documented in the d/changelog
  [*] I reviewed all changes and I approve them
  [*] attach debdiff against the package in (old)stable
  [*] the issue is verified as fixed in unstable

[ Changes ]
No additional packaging changes.

[ Other info ]
This is a rebuild of the package from sid with no further changes.

Andreas
diff --git a/debian/changelog b/debian/changelog
index dcd403b..7d25e6a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+nvidia-modprobe (535.161.07-1~deb12u1) bookworm; urgency=medium
+
+  * Rebuild for bookworm.
+
+ -- Andreas Beckmann <anbe@debian.org>  Fri, 08 Mar 2024 09:26:40 +0100
+
+nvidia-modprobe (535.161.07-1) unstable; urgency=medium
+
+  * New upstream release.
+
+ -- Andreas Beckmann <anbe@debian.org>  Thu, 07 Mar 2024 14:36:38 +0100
+
 nvidia-modprobe (535.54.03-1~deb12u1) bookworm; urgency=medium
 
   * Rebuild for bookworm.
diff --git a/debian/copyright b/debian/copyright
index 26ebb3f..e65d0a5 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -27,7 +27,7 @@ License: Expat
 
 Files: debian/*
 Copyright:
- © 2014-2023 Andreas Beckmann <anbe@debian.org>
+ © 2014-2024 Andreas Beckmann <anbe@debian.org>
 License: Expat
 
 License: Expat
diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml
index 33c3a64..8424db4 100644
--- a/debian/salsa-ci.yml
+++ b/debian/salsa-ci.yml
@@ -1,4 +1,3 @@
 ---
 include:
-  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
-  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml
diff --git a/modprobe-utils/nvidia-modprobe-utils.c b/modprobe-utils/nvidia-modprobe-utils.c
index 1a2144f..a0b7e3d 100644
--- a/modprobe-utils/nvidia-modprobe-utils.c
+++ b/modprobe-utils/nvidia-modprobe-utils.c
@@ -1059,4 +1059,45 @@ int nvidia_cap_get_file_state(const char* cap_file_path)
                                  cap_file_path, uid, gid, mode);
 }
 
+/*
+ * Attempt to enable auto onlining mode online_movable
+ */
+int nvidia_enable_auto_online_movable(const int print_errors)
+{
+    int fd;
+    const char path_to_file[] = "/sys/devices/system/memory/auto_online_blocks";
+    const char str[] = "online_movable";
+    ssize_t write_count;
+
+    fd = open(path_to_file, O_RDWR, 0);
+    if (fd < 0)
+    {
+        if (print_errors)
+        {
+            fprintf(stderr,
+                    "NVIDIA: failed to open `%s`: %s.\n",
+                    path_to_file, strerror(errno));
+        }
+        return 0;
+    }
+
+    write_count = write(fd, str, sizeof(str));
+    if (write_count != sizeof(str))
+    {
+        if (print_errors)
+        {
+            fprintf(stderr,
+                    "NVIDIA: unable to write to `%s`: %s.\n",
+                    path_to_file, strerror(errno));
+        }
+
+        close(fd);
+        return 0;
+    }
+
+    close(fd);
+
+    return 1;
+}
+
 #endif /* NV_LINUX */
diff --git a/modprobe-utils/nvidia-modprobe-utils.h b/modprobe-utils/nvidia-modprobe-utils.h
index ebc01e1..dff221d 100644
--- a/modprobe-utils/nvidia-modprobe-utils.h
+++ b/modprobe-utils/nvidia-modprobe-utils.h
@@ -85,6 +85,7 @@ int nvidia_cap_mknod(const char* cap_file_path, int *minor);
 int nvidia_cap_get_file_state(const char* cap_file_path);
 int nvidia_get_chardev_major(const char *name);
 int nvidia_msr_modprobe(void);
+int nvidia_enable_auto_online_movable(const int print_errors);
 
 #endif /* NV_LINUX */
 
diff --git a/nvidia-modprobe.1.m4 b/nvidia-modprobe.1.m4
index 4f15e50..aba284e 100644
--- a/nvidia-modprobe.1.m4
+++ b/nvidia-modprobe.1.m4
@@ -28,7 +28,7 @@ nvidia\-modprobe \- Load the NVIDIA kernel module and create NVIDIA character de
 .SH DESCRIPTION
 The
 .B nvidia\-modprobe
-utility is used by user-space NVIDIA driver components to make sure the NVIDIA kernel module is loaded and that the NVIDIA character device files are present.  These facilities are normally provided by Linux distribution configuration systems such as udev.  When possible, it is recommended to use your Linux distribution's native mechanisms for managing kernel module loading and device file creation.  This utility is provided as a fallback to work out-of-the-box in a distribution-independent way.
+utility is used by user-space NVIDIA driver components to make sure the NVIDIA kernel module is loaded, the NVIDIA character device files are present and configure certain runtime settings in the kernel.  These facilities are normally provided by Linux distribution configuration systems such as udev.  When possible, it is recommended to use your Linux distribution's native mechanisms for managing kernel module loading, device file creation and kernel runtime config settings.  This utility is provided as a fallback to work out-of-the-box in a distribution-independent way.
 .PP
 When installed
 .B by nvidia\-installer
diff --git a/nvidia-modprobe.c b/nvidia-modprobe.c
index d8be7b0..050ad99 100644
--- a/nvidia-modprobe.c
+++ b/nvidia-modprobe.c
@@ -97,6 +97,7 @@ int main(int argc, char *argv[])
     int modeset = FALSE;
     int nvswitch = FALSE;
     int nvlink = FALSE;
+    int enable_auto_online_movable = FALSE;
     int unused;
 
     while (1)
@@ -157,6 +158,9 @@ int main(int argc, char *argv[])
                     exit(1);
                 }
                 break;
+            case 'a':
+                enable_auto_online_movable = TRUE;
+                break;
             default:
                 nv_error_msg("Invalid commandline, please run `%s --help` "
                              "for usage information.\n", argv[0]);
@@ -222,6 +226,15 @@ int main(int argc, char *argv[])
             }
         }
     }
+    else if (enable_auto_online_movable)
+    {
+        /* Enable auto onlining mode online_movable */
+        ret = nvidia_enable_auto_online_movable(0);
+        if (!ret)
+        {
+            goto done;
+        }
+    }
     else
     {
         /* Load the kernel module. */
diff --git a/option-table.h b/option-table.h
index 6092485..191fe3d 100644
--- a/option-table.h
+++ b/option-table.h
@@ -72,5 +72,13 @@ static const NVGetoptOption __options[] = {
       "/proc file path. This option can be specified multiple times to create "
       "multiple NVIDIA capability device files." },
 
+    { "auto-online-movable",
+      'a',
+       0,
+       NULL,
+       "Enable the online_movable auto onlining kernel setting for "
+       "platforms (like Grace Hopper) that add and online GPU memory "
+       "to the kernel" },
+
     { NULL, 0, 0, NULL, NULL },
 };
diff --git a/version.mk b/version.mk
index bc5d21a..772455f 100644
--- a/version.mk
+++ b/version.mk
@@ -1,4 +1,4 @@
-NVIDIA_VERSION = 535.54.03
+NVIDIA_VERSION = 535.161.07
 
 # This file.
 VERSION_MK_FILE := $(lastword $(MAKEFILE_LIST))

Reply to: