[FAILED] failed to start pkgfile database update

No, I switched to bash (laugh)

Its just because pkgfile is being installed by default. Maybe manjaro could add a choose bash/zsh/fish/other shell option in calamares?

1 Like

I still have this issue. The manual update via systemctl start pkgfile-update.service makes the error disappear for a few days but that’s it. Should I uninstall zsh and friends this way and reinstall it some other way?

I think that manjaro architect has a choice for a shell option, that’s how I installed zsh in the first place.

Now KDE and GNOME all use zsh as default, you can only uninstall pkgfile.

Or you can uninstall all things related by zsh and reinstall zsh only, then use bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" to install oh-my-zsh

1 Like

You can disable pkgfile services.

sudo systemctl stop pkgfile-update.service
sudo systemctl disable pkgfile-update.service
sudo systemctl stop pkgfile-update.timer
sudo systemctl disable pkgfile-update.timer
1 Like

really? Arch and Deabian with KDE Plasma still use bash as defult(At Auguest I use them).

You can install a Manjaro KDE just now. In LiveCD it uses bash but after installation it uses zsh.

Also, zsh is installed by default so if Manjaro use bash as default pkgfile will still run.

This works for me. pkgfile as a depend of manjaro-zsh-condif and octopi(two insalled by default). Diable it will cause any loss?? Hope nothing

pkgfile is like pacman. But zsh and zsh-theme-powerlevel10k have nothing to do with pkgfile.
manjaro-zsh-config is Manjaro theme for zsh including (all) zsh-features/dependencies.
If you want to custom your own theme of zsh, then uninstall manjaro-zsh-config and pkgfile, then install zsh, some useful zsh-features and powerlevel10k for zsh theme.


Edit: Oh, you are using octopi that need pkgfile. You can use pamac instead of octopi?

It is very nice of you to make a reply. :blush: I use bash more in VS Code. Pamac and Octopi are both installed by default( octopi with a cache cleaner) . In most case, use pamac is pretty fine.

Thanks for you advise. I’ll uninstall these three thing. :heart:

Oh interestingly I get manjaro-zsh-config (though I switched to bash for my own $USER)…

$ pacman -Qi pkgfile | grep Required #
Required By     : manjaro-zsh-config

(ran into this thread because I get the exact same mysterious failures)

In case it's helpful, there's this audit line in my `dmesg` at the same time that this happens (and this seems to happen whenever my laptop lid opens):
$ dmesg --human --follow
# snipped
[  +0.000821] CPU6 is up
[  +0.000137] smpboot: Booting Node 0 Processor 7 APIC 0x7
[  +0.000875] CPU7 is up
[  +0.002581] ACPI: PM: Waking up from system sleep state S3
[  +0.101062] ACPI: EC: interrupt unblocked
[  +1.475455] ACPI: EC: event unblocked
[  +0.003377] i915 0000:00:02.0: [drm] [ENCODER:94:DDI A/PHY A] is disabled/in DSI mode with an ungated DDI clock, gate it
[  +0.000011] i915 0000:00:02.0: [drm] [ENCODER:102:DDI B/PHY B] is disabled/in DSI mode with an ungated DDI clock, gate it
[  +0.000008] i915 0000:00:02.0: [drm] [ENCODER:118:DDI C/PHY C] is disabled/in DSI mode with an ungated DDI clock, gate it
[  +0.002038] usb usb3: root hub lost power or was reset
[  +0.000003] usb usb4: root hub lost power or was reset
[  +0.003753] nvme nvme0: Shutdown timeout set to 10 seconds
[  +0.002260] nvme nvme0: 8/0/0 default/read/poll queues
[  +0.017576] usb 2-3: Disable of device-initiated U1 failed.
[  +0.003607] usb 2-3: Disable of device-initiated U2 failed.
[  +0.192936] usb 2-3: reset SuperSpeed USB device number 2 using xhci_hcd
[  +0.146448] usb 1-8: reset high-speed USB device number 3 using xhci_hcd
[  +0.263853] usb 1-7: reset full-speed USB device number 2 using xhci_hcd
[  +0.151818] OOM killer enabled.
[  +0.000005] Restarting tasks ... 
[  +0.000103] pci_bus 0000:04: Allocating resources
[  +0.000040] pci_bus 0000:3a: Allocating resources
[  -0.000003] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[  +0.001500] Bluetooth: hci0: Bootloader revision 0.0 build 26 week 38 2015
[  +0.000173] pci_bus 0000:04: Allocating resources
[  +0.000035] pci_bus 0000:3a: Allocating resources
[  +0.000526] Bluetooth: hci0: Device revision is 16
[  +0.000010] Bluetooth: hci0: Secure boot is enabled
[  +0.000004] Bluetooth: hci0: OTP lock is enabled
[  +0.000005] Bluetooth: hci0: API lock is enabled
[  +0.000004] Bluetooth: hci0: Debug lock is disabled
[  +0.000005] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[  +0.000627] Bluetooth: hci0: Found device firmware: intel/ibt-12-16.sfi
[  +0.010353] done.
[  +0.018177] audit: type=1334 audit(1638228047.403:486): prog-id=67 op=LOAD
[  +0.011288] audit: type=1130 audit(1638228047.413:487): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=shadow comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  +0.049762] audit: type=1131 audit(1638228047.463:488): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=shadow comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  +0.005695] PM: suspend exit
[  +0.111957] audit: type=1130 audit(1638228047.579:489): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=pkgfile-update comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'

Simply change the timer to suit. For my use case, it is sufficient to activate once only, 5 mins after boot.

/usr/lib/systemd/system/pkgfile-update.timer

[Unit]
Description=pkgfile database update timer

[Timer]
OnBootSec=5min

[Install]
WantedBy=multi-user.target

@Chrysostomus’s version gave error at boot and shutdown when no internet connection (because too soon, or too late):
[FAILED] failed to start pkgfile database update

That was on a fresh install, so I imagine a novice user would be disconcerted by that!

Wouldnt something like

[Unit]
Description=pkgfile database update timer

[Timer]
OnCalendar=daily
AccuracySec=6h
Persistent=true
RandomizedDelaySec=300

[Install]
WantedBy=timers.target

(taken from original, added randomdelay, and most importantly replacing the WantedBy line)
work too, and be preferred ?

4 Likes

Er, I think so yes. That would be a more generalised solution, since it activates daily between boots.

Have you tried it? Were you seeing the error at boot and shutdown?

No… I dont use zsh or pkgfile.
I was just here pointing out the issue and the possible solution of forcing the pkgfile upgrade a year ago or so now:

And since you pointed to the timer being at fault I looked at the source (which is 6 years old :sweat_smile:) and applied some sane-to-me changes.

2 Likes

Well, submit a pull request then. :stuck_out_tongue_winking_eye:

EDIT: There’s already one open with a different approach:

2 Likes

@cscs 's approach seems to work, at least for boot:

    ~  systemctl --failed                                                                                ✔ 
  UNIT LOAD ACTIVE SUB DESCRIPTION
0 loaded units listed.
    ~  systemctl status pkgfile-update.timer                                                             ✔ 
● pkgfile-update.timer - pkgfile database update timer
     Loaded: loaded (/usr/lib/systemd/system/pkgfile-update.timer; enabled; vendor preset: disabled)
     Active: active (waiting) since Thu 2021-12-16 19:18:38 GMT; 13min ago
    Trigger: Fri 2021-12-17 00:04:28 GMT; 4h 32min left
   Triggers: ● pkgfile-update.service

Dec 16 19:18:38 ********* systemd[1]: Started pkgfile database update timer.
    ~  systemctl status pkgfile-update.service                                                           ✔ 
○ pkgfile-update.service - pkgfile database update
     Loaded: loaded (/usr/lib/systemd/system/pkgfile-update.service; static)
     Active: inactive (dead) since Thu 2021-12-16 19:21:57 GMT; 12min ago
TriggeredBy: ● pkgfile-update.timer
    Process: 1853 ExecStart=/usr/bin/pkgfile -u (code=exited, status=0/SUCCESS)
   Main PID: 1853 (code=exited, status=0/SUCCESS)
        CPU: 1.677s

Dec 16 19:21:41 ********* systemd[1]: Starting pkgfile database update...
Dec 16 19:21:57 ********* systemd[1]: pkgfile-update.service: Deactivated successfully.
Dec 16 19:21:57 ********* systemd[1]: Finished pkgfile database update.
Dec 16 19:21:57 ********* systemd[1]: pkgfile-update.service: Consumed 1.677s CPU time.
    ~                                                                                                  3 ✘ 

Edit: no error message on shutdown (reboot) either.

The wait for online may be better really…

I agree.

This is awesome! It seems to be work. It has been 1 day after I set this and I have never seen the [FAILED] failed to start pkgfile database update again.