You are not logged in.

#1 2018-09-04 11:19:04

gripped
Member
From: UK
Registered: 2013-03-15
Posts: 13
Website

[Solved] Nvidia KMS - mkinitcpio not looking in /lib/modules/extram...

Following the instructions at https://wiki.archlinux.org/index.php/NV … de_setting I added KMS to GRUB which seems to work

[    2.940718] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  396.54  Tue Aug 14 23:08:44 PDT 2018
[    2.942175] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver

I added the hooks mentioned (nvidia, nvidia_modeset, nvidia_uvm and nvidia_drm) to /etc/mkinitcpio.conf

cat /etc/mkinitcpio.conf
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
MODULES=""

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=""

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES="/etc/modprobe.d/byebyehdmi.conf"

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   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 block filesystems"
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS="base udev block filesystems"
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS="base udev block mdadm encrypt filesystems"
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS="base udev block lvm2 filesystems"
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS="base udev autodetect modconf block filesystems keyboard fsck nvidia nvidia_modeset nvidia_uvm nvidia_drm"

# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=""

When I run /usr/bin/mkinitcpio -p linux

==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 4.18.5-arch1-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> ERROR: Hook 'nvidia' cannot be found
==> ERROR: Hook 'nvidia_modeset' cannot be found
==> ERROR: Hook 'nvidia_uvm' cannot be found
==> ERROR: Hook 'nvidia_drm' cannot be found
==> Generating module dependencies
==> Creating lz4-compressed initcpio image: /boot/initramfs-linux.img
==> WARNING: errors were encountered during the build. The image may not be complete.
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 4.18.5-arch1-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: wd719x
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> ERROR: Hook 'nvidia' cannot be found
==> ERROR: Hook 'nvidia_modeset' cannot be found
==> ERROR: Hook 'nvidia_uvm' cannot be found
==> ERROR: Hook 'nvidia_drm' cannot be found
==> Generating module dependencies
==> Creating lz4-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> WARNING: errors were encountered during the build. The image may not be complete.

the linux preset

# mkinitcpio preset file for the 'linux' package

ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"

PRESETS=('default' 'fallback')

#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux.img"
#default_options=""

#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-linux-fallback.img"
fallback_options="-S autodetect"

uname and pacman -Qi linux

uname -a 
Linux upstairs 4.18.5-arch1-1-ARCH #1 SMP PREEMPT Fri Aug 24 12:48:58 UTC 2018 x86_64 GNU/Linux

pacman -Q linux
linux 4.18.5.arch1-1

The modules are found fine by the kernel but not, it seems, by mkinitcpio ?

lsmod
Module                  Size  Used by
fuse                  118784  3
joydev                 24576  0
mousedev               24576  0
snd_hda_codec_hdmi     57344  1
ext4                  737280  2
nvidia_drm             45056  6
nvidia_modeset       1093632  24 nvidia_drm
crc16                  16384  1 ext4
mbcache                16384  1 ext4
jbd2                  126976  1 ext4
nls_iso8859_1          16384  1
nls_cp437              20480  1
hid_roccat_kovaplus    16384  0
fscrypto               32768  1 ext4
nvidia              14061568  1290 nvidia_modeset
vfat                   24576  1
hid_roccat             16384  1 hid_roccat_kovaplus
hid_roccat_common      16384  1 hid_roccat_kovaplus
hid_generic            16384  0
fat                    81920  1 vfat
intel_rapl             24576  0
x86_pkg_temp_thermal    16384  0
intel_powerclamp       16384  0
coretemp               16384  0
kvm_intel             233472  0
usbhid                 57344  0
kvm                   737280  1 kvm_intel
eeepc_wmi              16384  0
asus_wmi               32768  1 eeepc_wmi
sparse_keymap          16384  1 asus_wmi
rfkill                 28672  3 asus_wmi
irqbypass              16384  1 kvm
wmi_bmof               16384  0
crct10dif_pclmul       16384  0
iTCO_wdt               16384  0
crc32_pclmul           16384  0
ghash_clmulni_intel    16384  0
gpio_ich               16384  0
mxm_wmi                16384  0
iTCO_vendor_support    16384  1 iTCO_wdt
drm_kms_helper        200704  1 nvidia_drm
snd_hda_codec_realtek   110592  1
pcbc                   16384  0
snd_hda_codec_generic    86016  1 snd_hda_codec_realtek
drm                   479232  9 drm_kms_helper,nvidia_drm
raid1                  45056  1
snd_hda_intel          45056  4
md_mod                167936  2 raid1
snd_hda_codec         151552  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
aesni_intel           200704  0
aes_x86_64             20480  1 aesni_intel
crypto_simd            16384  1 aesni_intel
cryptd                 28672  3 crypto_simd,ghash_clmulni_intel,aesni_intel
glue_helper            16384  1 aesni_intel
agpgart                49152  1 drm
ipmi_devintf           20480  0
snd_hda_core           94208  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
ipmi_msghandler        65536  2 ipmi_devintf,nvidia
intel_cstate           16384  0
snd_hwdep              16384  1 snd_hda_codec
syscopyarea            16384  1 drm_kms_helper
intel_uncore          135168  0
snd_pcm               131072  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
input_leds             16384  0
sysfillrect            16384  1 drm_kms_helper
intel_rapl_perf        16384  0
pcspkr                 16384  0
snd_timer              36864  1 snd_pcm
sysimgblt              16384  1 drm_kms_helper
led_class              16384  2 input_leds,asus_wmi
i2c_i801               32768  0
evdev                  20480  15
fb_sys_fops            16384  1 drm_kms_helper
snd                    98304  16 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm
mac_hid                16384  0
e1000e                282624  0
rtc_cmos               24576  1
mei_me                 45056  0
soundcore              16384  1 snd
mei                   106496  1 mei_me
wmi                    28672  3 asus_wmi,wmi_bmof,mxm_wmi
pcc_cpufreq            16384  0
ie31200_edac           16384  0
lpc_ich                28672  0
vboxnetflt             32768  0
vboxnetadp             28672  0
vboxpci                28672  0
nfsd                  421888  13
auth_rpcgss            73728  1 nfsd
vboxdrv               487424  3 vboxpci,vboxnetadp,vboxnetflt
uhid                   20480  3
nfs_acl                16384  1 nfsd
hid                   139264  7 hid_roccat_kovaplus,usbhid,hid_generic,hid_roccat,uhid
lockd                 118784  1 nfsd
grace                  16384  2 nfsd,lockd
sunrpc                430080  17 nfsd,auth_rpcgss,lockd,nfs_acl
sg                     40960  0
crypto_user            16384  0
ip_tables              28672  0
x_tables               45056  1 ip_tables
btrfs                1372160  1
libcrc32c              16384  1 btrfs
crc32c_generic         16384  0
xor                    24576  1 btrfs
zstd_decompress        81920  1 btrfs
zstd_compress         184320  1 btrfs
xxhash                 16384  2 zstd_compress,zstd_decompress
raid6_pq              122880  1 btrfs
sr_mod                 28672  0
cdrom                  69632  1 sr_mod
sd_mod                 61440  8
serio_raw              16384  0
atkbd                  32768  0
libps2                 16384  1 atkbd
ahci                   40960  5
libahci                40960  1 ahci
xhci_pci               16384  0
libata                278528  2 libahci,ahci
ehci_pci               16384  0
xhci_hcd              266240  1 xhci_pci
ehci_hcd               94208  1 ehci_pci
crc32c_intel           24576  3
scsi_mod              258048  4 sd_mod,libata,sg,sr_mod
usbcore               294912  6 xhci_hcd,ehci_pci,usbhid,hid_roccat_common,ehci_hcd,xhci_pci
usb_common             16384  1 usbcore
i8042                  32768  0
serio                  28672  4 serio_raw,atkbd,i8042

Any ideas ?

Edit

ls -al /lib/modules

total 0
drwxr-xr-x 1 root root     72 Aug 27 14:17 .
drwxr-xr-x 1 root root 202242 Sep  4 11:44 ..
drwxr-xr-x 1 root root    380 Sep  4 11:44 4.18.5-arch1-1-ARCH
drwxr-xr-x 1 root root    142 Sep  4 11:44 extramodules-ARCH

ls -al /lib/modules/extramodules-ARCH/

total 9320
drwxr-xr-x 1 root root     142 Sep  4 11:44 .
drwxr-xr-x 1 root root      72 Aug 27 14:17 ..
-rw-r--r-- 1 root root   24552 Aug 24 15:38 nvidia-drm.ko.gz
-rw-r--r-- 1 root root 8600298 Aug 24 15:38 nvidia.ko.gz
-rw-r--r-- 1 root root  496052 Aug 24 15:38 nvidia-modeset.ko.gz
-rw-r--r-- 1 root root  413250 Aug 24 15:38 nvidia-uvm.ko.gz
-rw-r--r-- 1 root root      20 Aug 24 13:47 version

Last edited by gripped (2018-09-04 13:39:23)

Offline

#2 2018-09-04 11:42:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: [Solved] Nvidia KMS - mkinitcpio not looking in /lib/modules/extram...

Those are kernelmodules, not hooks, add them to the MODULES array. It mentiones that you could create a pacman hook (pacman hooks != mkinitcpio hooks) to make sure mkinitcpio is properly invoked on nvidia updates. That said, it is unlikely to really benefit you and usually setting the kernel parameter is sufficient. As the nvidia driver doesn't support a hires terminal framebuffer the benefit of adding them to your initramfs isn't really high and it adds an additional step to think about during kernel/nvidia updates

Offline

#3 2018-09-04 13:37:49

gripped
Member
From: UK
Registered: 2013-03-15
Posts: 13
Website

Re: [Solved] Nvidia KMS - mkinitcpio not looking in /lib/modules/extram...

Cheers. I sort of guessed i was doing some very wrong but was having one of my regular "Can't see the wood for the trees" moments.

All is now well smile

Last edited by gripped (2018-09-04 13:39:49)

Offline

Board footer

Powered by FluxBB