[Bug 1637180] Re: "The computer needs to restart" dialog constantly eats CPU

Thomas Waldmann twaldmann at thinkmo.de
Thu Jul 20 20:28:55 UTC 2017


this is the easiest way to fix the issue (not perfect though, dialog box
looks slightly different afterwards):

--- UpdateManager.py.orig	2017-07-20 22:23:11.643707331 +0200
+++ UpdateManager.py	2017-07-20 22:24:03.048405983 +0200
@@ -88,9 +88,10 @@
         self.set_icon_name("system-software-update")
         self.set_position(Gtk.WindowPosition.CENTER)
 
-        # Keep window at a constant size
-        ctx = self.get_style_context()
-        ctx.connect("changed", lambda ctx: self.resize_to_standard_width())
+        # commented as this causes high cpu load
+        ## Keep window at a constant size
+        #ctx = self.get_style_context()
+        #ctx.connect("changed", lambda ctx: self.resize_to_standard_width())
 
         # Signals
         self.connect("delete-event", self._on_close)


I suspect that the resize_to_standard_width method causes a changed signal, which causes it being called again (and again and again ...).

Guess this should be pretty easy to fix for someone who has a clue about
gtk (= not me).

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

Title:
  "The computer needs to restart" dialog constantly eats CPU

Status in One Hundred Papercuts:
  Confirmed
Status in update-manager package in Ubuntu:
  Confirmed
Status in update-manager source package in Artful:
  Confirmed

Bug description:
  After installing certain updates (kernel, system libraries, etc.), the
  "The computer needs to restart" dialog appears periodically, prompting
  the user to restart the system.

  That dialog eats a constant 8-10% of CPU time. That's the issue. (Yes,
  update-manager is niced to 10, but why consuming *any* CPU at all for
  showing a static dialog?)

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: update-manager 1:16.04.4
  ProcVersionSignature: Ubuntu 4.4.0-38.57-generic 4.4.19
  Uname: Linux 4.4.0-38-generic x86_64
  NonfreeKernelModules: nvidia_uvm nvidia_modeset nvidia
  ApportVersion: 2.20.1-0ubuntu2.1
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Thu Oct 27 14:07:11 2016
  ExecutablePath: /usr/bin/update-manager
  GsettingsChanges:
   b'com.ubuntu.update-manager' b'show-details' b'true'
   b'com.ubuntu.update-manager' b'window-height' b'766'
   b'com.ubuntu.update-manager' b'first-run' b'false'
   b'com.ubuntu.update-manager' b'window-width' b'939'
   b'com.ubuntu.update-manager' b'launch-time' b'1477544773'
  InstallationDate: Installed on 2016-04-22 (188 days ago)
  InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
  InterpreterPath: /usr/bin/python3.5
  PackageArchitecture: all
  SourcePackage: update-manager
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/hundredpapercuts/+bug/1637180/+subscriptions



More information about the foundations-bugs mailing list