Nvidia hook issue?

Hej hej fellow EOSers!
After a week away from teh interwebs I am blowing out the cobwebs with yay…and watch this fly by:

[2021-09-16T11:32:21+1200] [ALPM] transaction completed
[2021-09-16T11:32:21+1200] [ALPM] running '20-systemd-sysusers.hook'...
[2021-09-16T11:32:21+1200] [ALPM] running '30-systemd-daemon-reload.hook'...
[2021-09-16T11:32:21+1200] [ALPM] running '30-systemd-udev-reload.hook'...
[2021-09-16T11:32:21+1200] [ALPM] running '30-systemd-update.hook'...
[2021-09-16T11:32:21+1200] [ALPM] running '70-dkms-install.hook'...
[2021-09-16T11:32:21+1200] [ALPM-SCRIPTLET] ==> dkms install --no-depmod -m bbswitch -v 0.8 -k 5.14.3-arch1-1
[2021-09-16T11:32:24+1200] [ALPM-SCRIPTLET] ==> dkms install --no-depmod -m nvidia -v 470.63.01 -k 5.10.64-1-lts
[2021-09-16T11:33:08+1200] [ALPM-SCRIPTLET] ==> dkms install --no-depmod -m nvidia -v 470.63.01 -k 5.14.3-arch1-1
[2021-09-16T11:33:53+1200] [ALPM-SCRIPTLET] ==> dkms install --no-depmod -m bbswitch -v 0.8 -k 5.10.64-1-lts
[2021-09-16T11:33:55+1200] [ALPM-SCRIPTLET] ==> depmod 5.14.3-arch1-1
[2021-09-16T11:33:57+1200] [ALPM-SCRIPTLET] ==> depmod 5.10.64-1-lts
[2021-09-16T11:34:04+1200] [ALPM] running '90-packagekit-refresh.hook'...
[2021-09-16T11:34:04+1200] [ALPM] running 'eos-reboot-required.hook'...
[2021-09-16T11:34:04+1200] [ALPM-SCRIPTLET] Reboot is recommended because of recent core system package upgrades.
[2021-09-16T11:34:04+1200] [ALPM] running 'nvidia.hook'...
[2021-09-16T11:34:04+1200] [ALPM-SCRIPTLET] -P’: line 1: ‘/usr/bin/mkinitcpio: No such file or directory
[2021-09-16T11:34:04+1200] [ALPM] running 'rebuild-detector.hook'...
[2021-09-16T11:34:05+1200] [ALPM] running 'update-desktop-database.hook'...
[2021-09-16T13:11:01+1200] [PACKAGEKIT] synchronizing package lists
[2021-09-16T13:16:14+1200] [PACMAN] Running 'pacman -U --noconfirm --config /etc/pacman.conf -- /home/onyx/.cache/yay/optimus-manager/optimus-manager-1.4-2-a>
[2021-09-16T13:16:14+1200] [ALPM] transaction started
[2021-09-16T13:16:14+1200] [ALPM] installed optimus-manager (1.4-2)
[2021-09-16T13:16:14+1200] [ALPM-SCRIPTLET] optimus-manager : enabling optimus-manager.service
[2021-09-16T13:16:14+1200] [ALPM-SCRIPTLET] ^[[1m^[[31mPlease reboot your computer before using optimus-manager^[(B^[[m
[2021-09-16T13:16:14+1200] [ALPM] transaction completed
[2021-09-16T13:16:14+1200] [ALPM] running '30-systemd-daemon-reload.hook'...
[2021-09-16T13:16:14+1200] [ALPM] running '30-systemd-update.hook'...

So having been recently burned with the nvidia reinstallation, what does this part mean?

[2021-09-16T11:34:04+1200] [ALPM] running 'nvidia.hook'...
[2021-09-16T11:34:04+1200] [ALPM-SCRIPTLET] -P’: line 1: ‘/usr/bin/mkinitcpio: No such file or directory

Especially when which mkinitcpio
/usr/bin/mkinitcpio
is true?

Should I risk the reboot required, knowing nvidia may again be borked? Should I find my percussive maintenance tool and fix it for good?

I don’t have an nvidia system. Can you share the contents of nvidia.hook? It will either be in /usr/share/libalpm/hooks or /etc/pacman.d/hooks

1 Like

@dalto
After Dolphin flipped out I restarted anyway without any ill effects…

[onyx@onyx-rogstrixg531gt ~]$ cat /etc/pacman.d/hooks/nvidia.hook 
[Trigger]
Operation=Install
Operation=Upgrade
Operation=Remove
Type=Package
Target=nvidia-dkms
[Action]
Depends=mkinitcpio
When=PostTransaction
Exec=/bin/sh -c ‘/usr/bin/mkinitcpio -P’

That is broken. Those should be normal single or double quotes but they appear to be something else.

If it happens again you can run sudo mkinitcpio -P manually.

4 Likes

Where does that hook file originate? (and so where did the incorrect quote marks get introduced?)

^^ right here, bottom of page. They are back ticks?

3 Likes

File: /usr/share/libalpm/hooks/eos-nvidia-fix.hook

[Trigger]
Operation = Install
Operation = Upgrade
Operation = Remove
Type = Package
Target = nvidia-dkms
Target = nvidia
Target = nvidia-lts

[Action]
Depends = mkinitcpio
When = PostTransaction
Exec = /usr/bin/mkinitcpio -P

What i got with the package nvidia-hook …
I just updated the wiki page seems it was not updated.

4 Likes

Ah, yes, Wordpress trying to he “helpful”. The default Discourse settings do the same thing and re-format normal quote marks as fancy quote marks (which is fine for most sites, but less than ideal when it’s altering syntax).

(This forum, like most sensible forums, has disabled that option → ’ " " ’ )

1 Like

here is using the Preformatted text option. Which is </> in the menu or triple back ticks before and after text

Preformatted text `  `  should show up as back ticks

In my humble opinion, all code and linux command examples should use the preformatted text option.

Pudge

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.