Mkinitcpio.conf correct hooks and syntax

To be clear, I only removed the amdgpu module, not the kms hook.

Right, but placing only kms relies on that hook to load the modules you want and early.
I dont know if it does that 100% of the time in every instance.
And having amdgpu in modules cant hurt if you actually use amdgpu.

But sure, use without, should work too.

( of note - SDDM still suggests placing amdgpu, plus a number of other related modules on the line to help make sure SDDM shows up when using the wayland or x11-user (rootless) backends )

This is another thing with having systemd instead of base and udev: you don’t really need the autodetect hook, because that’s exactly what the systemd hook does, i.e. it takes the configuration of your already running system and adds all that is needed to the initcpio.

That’s why you also don’t need to add the usr hook if you have /usr on a separate partition, i.e. the systemd hook will automatically add the usr hook without that it needs to be specified in /etc/mkinitcpio.conf.

By that argument you dont need modules, autodetect, or kms? Just the systemd hook?
I might be a bit more suspicious of that claim. But if it works for you it works I suppose.

(also, none of this ‘kms is all you need’ is purported to work for out-of-tree, so for nvidia and the like it is supposed to still be needed to be iterated on the modules line)

Well, no, it does not apply to everything. But in and of itself, it does do a certain amount of autodetection, or rather, it sources your running system for a number of things. It looks at your /etc/fstab — or perhaps better put: at the on-the-fly systemd mounts that it creates from your /etc/fstab at boot time — and when used in conjunction with sd-vconsole, it also looks at the configuration of your local console, i.e. your keymap, console font and primary display.

The latter may of course not be ideal for people who use multiple different keyboard layouts.

For what it’s worth, I just downloaded the latest ISO and installed it on a VM to check. No kms. It also installed with the quote mark syntax.

~% grep "^HOOKS" /etc/mkinitcpio.conf
HOOKS="base udev autodetect modconf block keyboard keymap consolefont plymouth filesystems"

Then I installed all waiting updates. No change, no pacnew.

1 Like

I’m curious. You still have him listed in your HOOKS line you posted earlier:

My HOOKS line looks like this now… :point_down:

HOOKS=(systemd autodetect modconf kms block keyboard sd-vconsole filesystems)

See my reply to @cscs. :wink:

Besides, if you look at the HOOKS when the initramfs is actually being built — either because of a kernel update or because you ran “mkinitcpio -P” — then you will see that autodetect is not part of the fallback image.

1 Like

Ah okay. :slight_smile: Didn’t see that.

@craywolf

Thanks for testing immediately and reporting here. :slight_smile:

Is this another Calamares issue? (Not talking about the quote mark syntax but rather the missing ‘kms’) I’m relieved it’s not just me but rather something wrong with the installation in general.

1 Like

Thanks for the feedback. Apparently Calamares is behind as kms has been default since last October with v33.

I’ll let @philm know.

@mkb @craywolf
We actually already cleared that. The default hooks on install are the calamares hooks. From time to time (every couple of months for example), there is a pacnew, esp. On mkinitcpio package update. If you installed after that of if you switch branches, you may miss the pacnew with the arch hooks.

I find that approach pretty messy, but it is up to manjaro developers to change it and unify the hooks among all the userbase by modifying calamares. So far they do not really care, judging by this thread.

As for kms, i removed it (i have no discrete graphics). There was no difference in log text size, the only visible difference is the timing, with kms the screen switches modes (blinks) very early, after the first couple of line of text appear (i use nosplash), without it - right before the login screen appears.

Gee, thanks @Teo . I really appreciate your feedback. Obviously complaining and blaming others solves issues. :roll_eyes:

Just to clarify, it’s not a complaint from my end. I’m honestly just happy to know it’s not my fault and that I understand why ‘kms’ is missing. :smiley:

I think I have another thread you’ll like guys…

1 Like

I was replying to @Teo, not you. :wink:

1 Like

Joining the band for one set only; there’s no pacnew with these lyrics, also composed today:

# vim:set ft=sh
# MODULES
...
#     MODULES=(usbhid xhci_hcd)
MODULES=""

# BINARIES
...
BINARIES=()

# FILES
...
FILES=""

# HOOKS
...
##   This setup specifies all modules in the MODULES setting above.
##   No RAID, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
HOOKS="base udev autodetect modconf block keyboard keymap consolefont plymouth filesystems fsck"

# COMPRESSION
...
#COMPRESSION_OPTIONS=()

# MODULES_DECOMPRESS
...
#MODULES_DECOMPRESS="yes"

Just in case y’all missed it.

Even though mkinitcpio has defined the arrays using () → Calamares installer rewrites using “”

That has now changed upstream - with this commit to the v3.3 development branch.

We only have to wait for this to be included with Manjaro Calamares.

Which hooks is correct is a matter of system configuration - it is impossible to cater for each and every end user which may install Manjaro.

Manjaro uses a sane set of defaults - if your system and your preference is another - then change them.

2 Likes

That is a nice beginning, but only affecting new installations and we are still not talking about the hooks, only about the brackets?

You mean calamares. There are no manjaro defaults. There are calamares defaults and manjaro pacnews (from time to time).

Make sure amd-ucode is installed or you won’t be able to boot, no matter if ‘amdgpu’ in the modules line is actually needed or not. Found out when cleaning up the system after an initially problem-free move of an ssd from Athlon/radeon to Intel/nvidia hardware…

1 Like

Sharing some trivia: Years ago, I typically installed both amd-ucode and intel-ucode (or their equivilents) when wanting a certain amount of portability with a Linux installation (the OS was in a removable caddy).

I doubt I’d recommend that anymore though, especially with a rolling release such as Manjaro.