[Bug 2150181] Re: Drivers can not be listed in software-properties-gtk

Charles 2150181 at bugs.launchpad.net
Fri Apr 24 10:59:25 UTC 2026


** Description changed:

- I opened Additional Drivers to check the driver version I'm using, but it got stuck at 'Searching for available drivers'. So I went to the terminal and tried to launch Additional Drivers, and got the following output:
- moubread233 at MB23-Inspiron-15-7510:~$ gio launch /usr/share/applications/software-properties-drivers.desktop 
- moubread233 at MB23-Inspiron-15-7510:~$ Exception in thread Thread-1 (detect_drivers):
- Traceback (most recent call last):
-   File "/usr/lib/python3.14/threading.py", line 1082, in _bootstrap_inner
-     self._context.run(self.run)
-     ~~~~~~~~~~~~~~~~~^^^^^^^^^^
-   File "/usr/lib/python3.14/threading.py", line 1024, in run
-     self._target(*self._args, **self._kwargs)
-     ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 1458, in detect_drivers
-     self.search_process.start()
-     ~~~~~~~~~~~~~~~~~~~~~~~~~^^
-   File "/usr/lib/python3.14/multiprocessing/process.py", line 121, in start
-     self._popen = self._Popen(self)
-                   ~~~~~~~~~~~^^^^^^
-   File "/usr/lib/python3.14/multiprocessing/context.py", line 230, in _Popen
-     return _default_context.get_context().Process._Popen(process_obj)
-            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
-   File "/usr/lib/python3.14/multiprocessing/context.py", line 306, in _Popen
-     return Popen(process_obj)
-   File "/usr/lib/python3.14/multiprocessing/popen_forkserver.py", line 35, in __init__
-     super().__init__(process_obj)
-     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
-   File "/usr/lib/python3.14/multiprocessing/popen_fork.py", line 20, in __init__
-     self._launch(process_obj)
-     ~~~~~~~~~~~~^^^^^^^^^^^^^
-   File "/usr/lib/python3.14/multiprocessing/popen_forkserver.py", line 47, in _launch
-     reduction.dump(process_obj, buf)
-     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
-   File "/usr/lib/python3.14/multiprocessing/reduction.py", line 60, in dump
-     ForkingPickler(file, protocol).dump(obj)
-     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
- TypeError: cannot pickle 'SoftwarePropertiesGtk' object
- when serializing tuple item 0
- when serializing method reconstructor arguments
- when serializing method object
- when serializing dict item '_target'
- when serializing softwareproperties.gtk.SoftwarePropertiesGtk.Process state
- when serializing softwareproperties.gtk.SoftwarePropertiesGtk.Process object
+ [ Impact ]
  
- ProblemType: Bug
- DistroRelease: Ubuntu 26.04
- Package: software-properties-gtk 0.120
- ProcVersionSignature: Ubuntu 7.0.0-14.14-generic 7.0.0
- Uname: Linux 7.0.0-14-generic x86_64
- ApportVersion: 2.34.0-0ubuntu2
- Architecture: amd64
- CasperMD5CheckResult: pass
- CurrentDesktop: ubuntu:GNOME
- Date: Fri Apr 24 11:05:29 2026
- ExecutablePath: /usr/bin/software-properties-gtk
- InstallationDate: Installed on 2026-02-01 (82 days ago)
- InstallationMedia: Ubuntu 25.10 "Questing Quokka" - Release amd64 (20251007)
- InterpreterPath: /usr/bin/python3.14
- LocalLibraries: /home/moubread233/Projects/Pulled/vulkansdk/1.4.335.0/x86_64/lib/libvulkan.so.1.4.335
- PackageArchitecture: all
- Python3Details: /usr/bin/python3.14, Python 3.14.4, python3-minimal, 3.14.3-0ubuntu2
- PythonDetails: N/A
- SourcePackage: software-properties
- UpgradeStatus: Upgraded to resolute on 2026-04-24 (0 days ago)
+ The "Additional Drivers" tab in software-properties-gtk is completely
+ broken on Ubuntu 26.04 (Resolute). When a user opens the Additional
+ Drivers UI, it gets stuck on "Searching for available drivers..." and
+ never completes. The underlying error is a TypeError in the driver
+ detection thread.
+ 
+ Python 3.14 changed the default multiprocessing start method from
+ 'fork' to 'forkserver'. The 'forkserver' method requires that the
+ Process object, its target function, and all arguments be
+ picklable. The detect_drivers code passes a bound method
+ (self.wrapper_system_device_drivers) as the process target and
+ pickling a bound method requires pickling the bound instance, which is
+ a SoftwarePropertiesGtk object containing GTK widgets that cannot be
+ pickled. Additionally, the apt_pkg.Cache argument is a C extension
+ object that also cannot be pickled.
+ 
+ The fix makes wrapper_system_device_drivers a @staticmethod (removing the
+ unpicklable SoftwarePropertiesGtk instance from the serialization path)
+ and moves apt cache creation into the subprocess itself rather than
+ passing it as an argument.
+ 
+ [ Test Plan ]
+ 
+ 1. Install software-properties-gtk on Ubuntu 26.04 (with Python 3.14).
+ 2. Launch Additional Drivers:
+      software-properties-gtk --open-tab=4
+    or:
+      gio launch /usr/share/applications/software-properties-drivers.desktop
+ 3. Before the fix: the UI shows "Searching for available drivers..."
+    indefinitely, and the terminal prints:
+      TypeError: cannot pickle 'SoftwarePropertiesGtk' object
+ 4. After the fix: the driver search completes and available drivers are
+    listed (or "No additional drivers available" is shown, depending on
+    hardware).
+ 5. If drivers are listed, verify that selecting a different driver and
+    applying the change still works correctly.
+ 6. Verify the Cancel button works during a search, and that Retry works
+    after cancellation.
+ 
+ [ Where problems could occur ]
+ 
+ The subprocess now creates its own apt_pkg.Cache instead of reusing the
+ parent's. If the apt cache state on disk is somehow inconsistent or
+ changes between when the parent reads it and when the subprocess reads
+ it, the subprocess could see a different set of packages. In practice
+ this is not a meaningful risk since the cache is only used for driver
+ detection, which is read-only, and the window between the two reads is
+ negligible.
+ 
+ The wrapper_system_device_drivers function now calls apt_pkg.init_config
+ and apt_pkg.init_system in the subprocess. If these behave differently
+ when called in a forkserver child versus a forked child (e.g. reading
+ different configuration), driver detection results could differ. These
+ functions are designed to be safe to call in fresh processes and are used
+ this way elsewhere in the codebase (init_apt_cache).
+ 
+ [ Other Info ]
+ 
+ The Qt frontend (software-properties-qt) calls
+ detect.system_device_drivers directly in a thread without using
+ multiprocessing, so it is not affected by this bug.
+ 
+ This is a compatibility fix for the Python 3.14 multiprocessing
+ behaviour change. After the 3.14 migration, no one had tested this tab
+ it seems (or had time to report a bug).

** Summary changed:

- Drivers can not be listed in software-properties-gtk
+ [SRU] software-properties-gtk driver detection fails with Python 3.14 (cannot pickle SoftwarePropertiesGtk)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to software-properties in Ubuntu.
https://bugs.launchpad.net/bugs/2150181

Title:
  [SRU] software-properties-gtk driver detection fails with Python 3.14
  (cannot pickle SoftwarePropertiesGtk)

Status in software-properties package in Ubuntu:
  Confirmed

Bug description:
  [ Impact ]

  The "Additional Drivers" tab in software-properties-gtk is completely
  broken on Ubuntu 26.04 (Resolute). When a user opens the Additional
  Drivers UI, it gets stuck on "Searching for available drivers..." and
  never completes. The underlying error is a TypeError in the driver
  detection thread.

  Python 3.14 changed the default multiprocessing start method from
  'fork' to 'forkserver'. The 'forkserver' method requires that the
  Process object, its target function, and all arguments be
  picklable. The detect_drivers code passes a bound method
  (self.wrapper_system_device_drivers) as the process target and
  pickling a bound method requires pickling the bound instance, which is
  a SoftwarePropertiesGtk object containing GTK widgets that cannot be
  pickled. Additionally, the apt_pkg.Cache argument is a C extension
  object that also cannot be pickled.

  The fix makes wrapper_system_device_drivers a @staticmethod (removing the
  unpicklable SoftwarePropertiesGtk instance from the serialization path)
  and moves apt cache creation into the subprocess itself rather than
  passing it as an argument.

  [ Test Plan ]

  1. Install software-properties-gtk on Ubuntu 26.04 (with Python 3.14).
  2. Launch Additional Drivers:
       software-properties-gtk --open-tab=4
     or:
       gio launch /usr/share/applications/software-properties-drivers.desktop
  3. Before the fix: the UI shows "Searching for available drivers..."
     indefinitely, and the terminal prints:
       TypeError: cannot pickle 'SoftwarePropertiesGtk' object
  4. After the fix: the driver search completes and available drivers are
     listed (or "No additional drivers available" is shown, depending on
     hardware).
  5. If drivers are listed, verify that selecting a different driver and
     applying the change still works correctly.
  6. Verify the Cancel button works during a search, and that Retry works
     after cancellation.

  [ Where problems could occur ]

  The subprocess now creates its own apt_pkg.Cache instead of reusing the
  parent's. If the apt cache state on disk is somehow inconsistent or
  changes between when the parent reads it and when the subprocess reads
  it, the subprocess could see a different set of packages. In practice
  this is not a meaningful risk since the cache is only used for driver
  detection, which is read-only, and the window between the two reads is
  negligible.

  The wrapper_system_device_drivers function now calls apt_pkg.init_config
  and apt_pkg.init_system in the subprocess. If these behave differently
  when called in a forkserver child versus a forked child (e.g. reading
  different configuration), driver detection results could differ. These
  functions are designed to be safe to call in fresh processes and are used
  this way elsewhere in the codebase (init_apt_cache).

  [ Other Info ]

  The Qt frontend (software-properties-qt) calls
  detect.system_device_drivers directly in a thread without using
  multiprocessing, so it is not affected by this bug.

  This is a compatibility fix for the Python 3.14 multiprocessing
  behaviour change. After the 3.14 migration, no one had tested this tab
  it seems (or had time to report a bug).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/2150181/+subscriptions





More information about the foundations-bugs mailing list