Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: PackageKit (Package Updater) hanging at boot/re-boot for several minutes

  1. #1

    Default PackageKit (Package Updater) hanging at boot/re-boot for several minutes

    I have recently installed the latest Tumbleweed version on my Dell XPS9550 laptop. Generally the impressions are positive, except for one nagging issue, a deal breaker from my perspective. The problem I'm having is that Package Updater (PackageKit) hangs at boot/re-boot for 2-3 minutes, I presume trying to connect to the server. I know my internet / wifi connection is active, as I can open up a web browser and surf in the meantime. My usual routine other (with other Linux distros) has been to update all packages right away on boot to minimize my my exposure to zero-day exploits. While Package Updater/PackageKit is trying to connect, with this 2-3 minute lag, I cannot use zypper to do a command line update. I get an error message that PackageKit is running. "Ask PackageKit to Quit" does not work. (It doesn't quit.) I have exactly the same problem on two laptops: Dell (current one) and Lenovo. Is there something that can be done to resolve this problem? Otherwise, I may have to ditch Opensuse, as this situation is not acceptable.

    My repositories are (1) Main Repository (NON-OSS), (2) Main Repository (OSS) and (3) Main Update Repository.

  2. #2
    Join Date
    Jun 2008
    Location
    East of Podunk
    Posts
    32,922
    Blog Entries
    15

    Default Re: PackageKit (Package Updater) hanging at boot/re-boot for several minutes

    Quote Originally Posted by leemc71 View Post
    I have recently installed the latest Tumbleweed version on my Dell XPS9550 laptop. Generally the impressions are positive, except for one nagging issue, a deal breaker from my perspective. The problem I'm having is that Package Updater (PackageKit) hangs at boot/re-boot for 2-3 minutes, I presume trying to connect to the server. I know my internet / wifi connection is active, as I can open up a web browser and surf in the meantime. My usual routine other (with other Linux distros) has been to update all packages right away on boot to minimize my my exposure to zero-day exploits. While Package Updater/PackageKit is trying to connect, with this 2-3 minute lag, I cannot use zypper to do a command line update. I get an error message that PackageKit is running. "Ask PackageKit to Quit" does not work. (It doesn't quit.) I have exactly the same problem on two laptops: Dell (current one) and Lenovo. Is there something that can be done to resolve this problem? Otherwise, I may have to ditch Opensuse, as this situation is not acceptable.

    My repositories are (1) Main Repository (NON-OSS), (2) Main Repository (OSS) and (3) Main Update Repository.
    Hi and welcome to the Forum
    It could be an issue with the mirror your connecting to depending on your locale. I use mirrorcache, but also don't have packagekit running as I prefer to manually update via zypper dup. Have a read here as mirrorcache may work better https://en.opensuse.org/MirrorCache
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    3,694
    Blog Entries
    1

    Default Re: PackageKit (Package Updater) hanging at boot/re-boot for several minutes

    Purge PackageKit. It's excluded from all my openSUSE installations.
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 15.3, TW, 15.1 & 13.1 on Haswell
    Secondary: eComStation (OS/2) &15.2 on i965P w/ Radeon
    Tertiary: Debian, Fedora, Mageia, more on Rocket Lake & older Intel, AMD, NVidia &&&&&

  4. #4
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    3,685

    Default Re: PackageKit (Package Updater) hanging at boot/re-boot for several minutes

    Quote Originally Posted by leemc71 View Post
    I have recently installed the latest Tumbleweed version on my Dell XPS9550 laptop. Generally the impressions are positive, except for one nagging issue, a deal breaker from my perspective. The problem I'm having is that Package Updater (PackageKit) hangs at boot/re-boot for 2-3 minutes, I presume trying to connect to the server. I know my internet / wifi connection is active, as I can open up a web browser and surf in the meantime. My usual routine other (with other Linux distros) has been to update all packages right away on boot to minimize my my exposure to zero-day exploits. While Package Updater/PackageKit is trying to connect, with this 2-3 minute lag, I cannot use zypper to do a command line update. I get an error message that PackageKit is running. "Ask PackageKit to Quit" does not work. (It doesn't quit.) I have exactly the same problem on two laptops: Dell (current one) and Lenovo. Is there something that can be done to resolve this problem? Otherwise, I may have to ditch Opensuse, as this situation is not acceptable.

    My repositories are (1) Main Repository (NON-OSS), (2) Main Repository (OSS) and (3) Main Update Repository.
    Packagekit services are static. Presumably they are invoked by an applet. Go to system tray and disable.

    Users may want to enable background operation:
    Code:
    erlangen:~ # systemctl list-unit-files pack* 
    UNIT FILE                         STATE   VENDOR PRESET
    packagekit-background.service     static  -            
    packagekit-offline-update.service static  -            
    packagekit.service                static  -            
    packagekit-background.timer       enabled disabled     
    
    4 unit files listed. 
    erlangen:~ #
    Code:
    erlangen:~ # zypper lr -E 
    #  | Alias                | Enabled | GPG Check | Priority | URI 
    ---+----------------------+---------+-----------+----------+--------------------------------------------------------------------------------------------- 
     6 | Packman              | Yes     | (r ) Yes  |   90     | https://ftp.fau.de/packman/suse/openSUSE_Tumbleweed/ 
    17 | non-oss              | Yes     | (r ) Yes  |   99     | https://mirrorcache-eu.opensuse.org/tumbleweed/repo/non-oss/ 
    19 | oss                  | Yes     | (r ) Yes  |   99     | https://mirrorcache-eu.opensuse.org/tumbleweed/repo/oss/ 
    26 | update               | Yes     | (r ) Yes  |   99     | https://mirrorcache-eu.opensuse.org/update/tumbleweed/ 
     8 | chrome               | Yes     | (r ) Yes  |  100     | https://dl.google.com/linux/chrome/rpm/stable/x86_64 
    12 | home_kukuk_qmapshack | Yes     | (r ) Yes  |  100     | https://mirrorcache-eu.opensuse.org/repositories/home:/kukuk:/qmapshack/openSUSE_Tumbleweed/ 
    13 | jalbum               | Yes     | (  ) No   |  100     | https://jalbum.net/download/software/yumrepo/ 
    16 | myrepo               | Yes     | (  ) No   |  100     | dir:/home/karl/Downloads/myrepo 
    erlangen:~ #
    packagekit-background readily runs "pkcon get-updates" and notifies by mail. Testing and troubleshooting is straight forward:
    Code:
    erlangen:~ # time pkcon get-updates  
    Getting updates               [=========================]          
    Querying                      [=========================]          
    Refreshing software list      [=========================]          
    Finished                      [=========================]          
    Enhancement     openSUSE-release-20220507-1598.1.x86_64 (oss)                   openSUSE Tumbleweed 
    Enhancement     openSUSE-release-appliance-custom-20220507-1598.1.x86_64 (oss)  openSUSE Tumbleweed 
    
    real    0m2.262s 
    user    0m0.009s 
    sys     0m0.002s 
    erlangen:~ #
    Your mileage may vary.


    One of my machines is configured to automatically update the system by running "pkcon update". No fancy GUI applets involved.
    i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), 5600X (2022) openSUSE Tumbleweed, KDE Plasma

  5. #5
    Join Date
    Sep 2012
    Posts
    7,484

    Default Re: PackageKit (Package Updater) hanging at boot/re-boot for several minutes

    Quote Originally Posted by leemc71 View Post
    Package Updater (PackageKit)
    PackageKit is not Package Updater. It is engine that does the job as requested by actual Package Updater.
    hangs at boot/re-boot for 2-3 minutes
    How do you determine that it "hangs" as opposed to doing something like refreshing repositories or downloading updates? Does it "hang" if you do not log in in GUI?
    update all packages right away on boot to minimize my my exposure to zero-day exploits
    Which leaves any program that is already started using zero-day code running. If you are so concerned about this issue, the only clean and safe way is to reboot immediately after installing updates.
    Is there something that can be done to resolve this problem?
    Configure your desktop environment to not start update program when you log in.
    I may have to ditch Opensuse, as this situation is not acceptable.
    E-h-h ... so you want to update as soon as possible after boot but when system attempts to do exactly that you find it unacceptable? Interesting logic. And starting with threats is probably not the most efficient way to handle it.

  6. #6
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    3,685

    Default Re: PackageKit (Package Updater) hanging at boot/re-boot for several minutes

    Quote Originally Posted by arvidjaar View Post
    PackageKit is not Package Updater. It is engine that does the job as requested by actual Package Updater.
    Yep. E.g. enabling KDE > System Tray > Software Updates results in:
    Code:
    erlangen:~ # journalctl --since 7:50 -u pack* 
    May 10 07:51:02 erlangen systemd[1]: Starting PackageKit Daemon... 
    May 10 07:51:02 erlangen PackageKit[25714]: daemon start
    May 10 07:51:02 erlangen systemd[1]: Started PackageKit Daemon. 
    May 10 07:51:02 erlangen PackageKit[25714]: uid 1000 is trying to obtain org.freedesktop.packagekit.system-sources-refresh auth (only_trusted:0) 
    May 10 07:51:02 erlangen PackageKit[25714]: uid 1000 obtained auth for org.freedesktop.packagekit.system-sources-refresh 
    May 10 07:51:04 erlangen PackageKit[25714]: refresh-cache transaction /1_dcbcacad from uid 1000 finished with success after 2230ms
    May 10 07:51:07 erlangen PackageKit[25714]: get-updates transaction /2_ebcadbaa from uid 1000 finished with success after 2500ms
    May 10 07:51:27 erlangen PackageKit[25714]: daemon quit
    May 10 07:51:27 erlangen systemd[1]: packagekit.service: Deactivated successfully. 
    May 10 07:51:27 erlangen systemd[1]: packagekit.service: Consumed 1.192s CPU time. 
    erlangen:~ #
    Clicking install results in:
    Code:
    erlangen:~ # journalctl --since 7:55 -u pack*  
    May 10 07:59:51 erlangen systemd[1]: Starting PackageKit Daemon... 
    May 10 07:59:51 erlangen PackageKit[27514]: daemon start
    May 10 07:59:51 erlangen systemd[1]: Started PackageKit Daemon. 
    May 10 07:59:51 erlangen PackageKit[27514]: new update-packages transaction /1_cedccedb scheduled from uid 1000
    May 10 07:59:55 erlangen PackageKit[27514]: in /1_cedccedb for update-packages package openSUSE-release;20220506-1597.1;x86_64;installed was updating for uid 1000
    May 10 07:59:55 erlangen PackageKit[27514]: in /1_cedccedb for update-packages package openSUSE-release-appliance-custom;20220506-1597.1;x86_64;installed was updating for uid 1000
    May 10 07:59:55 erlangen PackageKit[27514]: in /1_cedccedb for update-packages package openSUSE-release;20220507-1598.1;x86_64;oss was installing for uid 1000
    May 10 07:59:55 erlangen PackageKit[27514]: in /1_cedccedb for update-packages package openSUSE-release-appliance-custom;20220507-1598.1;x86_64;oss was installing for uid 1000
    May 10 07:59:55 erlangen PackageKit[27514]: update-packages transaction /1_cedccedb from uid 1000 finished with success after 3479ms
    May 10 07:59:55 erlangen PackageKit[27514]: uid 1000 is trying to obtain org.freedesktop.packagekit.system-update auth (only_trusted:1) 
    May 10 07:59:55 erlangen PackageKit[27514]: new update-packages transaction /2_aeedaced scheduled from uid 1000
    May 10 07:59:55 erlangen PackageKit[27514]: uid 1000 obtained auth for org.freedesktop.packagekit.system-update 
    May 10 07:59:57 erlangen [RPM][28340]: Transaction ID 6279ff5d started
    May 10 07:59:57 erlangen [RPM][28340]: erase openSUSE-release-appliance-custom-20220506-1597.1.x86_64: success
    May 10 07:59:57 erlangen [RPM][28340]: install openSUSE-release-appliance-custom-20220507-1598.1.x86_64: success
    May 10 07:59:57 erlangen [RPM][28340]: erase openSUSE-release-appliance-custom-20220506-1597.1.x86_64: success
    May 10 07:59:57 erlangen [RPM][28340]: install openSUSE-release-appliance-custom-20220507-1598.1.x86_64: success
    May 10 07:59:57 erlangen [RPM][28340]: Transaction ID 6279ff5d finished: 0
    May 10 07:59:57 erlangen [RPM][28341]: Transaction ID 6279ff5d started
    May 10 07:59:57 erlangen [RPM][28341]: erase openSUSE-release-20220506-1597.1.x86_64: success
    May 10 07:59:57 erlangen [RPM][28341]: install openSUSE-release-20220507-1598.1.x86_64: success
    May 10 07:59:57 erlangen [RPM][28341]: erase openSUSE-release-20220506-1597.1.x86_64: success
    May 10 07:59:57 erlangen [RPM][28341]: Transaction ID 6279ff5d finished: 0
    May 10 07:59:58 erlangen PackageKit[27514]: in /2_aeedaced for update-packages package openSUSE-release-appliance-custom;20220507-1598.1;x86_64;oss was installing for uid 1000
    May 10 07:59:58 erlangen PackageKit[27514]: in /2_aeedaced for update-packages package openSUSE-release;20220507-1598.1;x86_64;oss was installing for uid 1000
    May 10 07:59:58 erlangen PackageKit[27514]: update-packages transaction /2_aeedaced from uid 1000 finished with success after 3534ms
    May 10 08:00:01 erlangen PackageKit[27514]: get-updates transaction /3_cccdcdac from uid 1000 finished with success after 2279ms
    erlangen:~ #
    Users decide on which option they want to use. I disabled Software Updates, enabled background checks and mail notification. Most of the time I postpone updates until the machine is idle and go with "zypper dup --allow-vendor-change".
    i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), 5600X (2022) openSUSE Tumbleweed, KDE Plasma

  7. #7

    Default Re: PackageKit (Package Updater) hanging at boot/re-boot for several minutes

    Quote Originally Posted by arvidjaar View Post
    PackageKit is not Package Updater. It is engine that does the job as requested by actual Package Updater.

    How do you determine that it "hangs" as opposed to doing something like refreshing repositories or downloading updates? Does it "hang" if you do not log in in GUI?

    Which leaves any program that is already started using zero-day code running. If you are so concerned about this issue, the only clean and safe way is to reboot immediately after installing updates.

    Configure your desktop environment to not start update program when you log in.

    E-h-h ... so you want to update as soon as possible after boot but when system attempts to do exactly that you find it unacceptable? Interesting logic. And starting with threats is probably not the most efficient way to handle it.
    Takes about 3 minutes for the system to update. I can tell when it's hung up (polling the server I suppose) because the built-in Package Updater app (which has a GUI) shows about 50% progress and stays there. Eventually it does run its course after several minutes. Typically there are no updates to download, so why should it take that long if there's nothing there? I would understand if it's downloading actual updates.

  8. #8

    Default Re: PackageKit (Package Updater) hanging at boot/re-boot for several minutes

    Maybe this isn't the most efficient solution, but I created a BASH script ("update.sh") with the following. (Made the script executable of course.) I launch the terminal window after boot and run this script from the command line. It seems to work fine.

    sudo systemctl disable --now packagekit
    sudo zypper refresh
    sudo zypper update
    sudo systemctl start packagekit

    After I ran "update.sh" I went into Package Updater (GUI app) to see what it does, and it was no longer "stuck" at ~50% progress as before. I could click on "update" and it worked normally. Virtually no lag.

  9. #9

    Default Re: PackageKit (Package Updater) hanging at boot/re-boot for several minutes

    Quote Originally Posted by leemc71 View Post
    Maybe this isn't the most efficient solution, but I created a BASH script ("update.sh") with the following. (Made the script executable of course.) I launch the terminal window after boot and run this script from the command line. It seems to work fine.

    sudo systemctl disable --now packagekit
    sudo zypper refresh
    sudo zypper update
    sudo systemctl start packagekit

    After I ran "update.sh" I went into Package Updater (GUI app) to see what it does, and it was no longer "stuck" at ~50% progress as before. I could click on "update" and it worked normally. Virtually no lag.
    I also added the #!/bin/sh as the header (first line) and put the file in the /usr/local/bin directory, which is in the PATH by default. The shell file then can be run from the default home directory (or any other directory) in a terminal window just by typing the filename.

  10. #10
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    3,685

    Default Re: PackageKit (Package Updater) hanging at boot/re-boot for several minutes

    Quote Originally Posted by leemc71 View Post
    I also added the #!/bin/sh as the header (first line) and put the file in the /usr/local/bin directory, which is in the PATH by default. The shell file then can be run from the default home directory (or any other directory) in a terminal window just by typing the filename.
    Thanks for the feedback. Do you still need to run this script? Applet "Software Updates" was fixed in 2019. I am doing fine here with frequently updating Tumbleweed since then and never encountered any problems. As a quick check you may show this:
    Code:
    erlangen:~ # pkcon update 
    Getting updates               [=========================]          
    Finished                      [=========================]          
    No packages require updating to newer versions. 
    erlangen:~ #
    i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), 5600X (2022) openSUSE Tumbleweed, KDE Plasma

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •