Should I reboot after getting this error?

Currently on a fresh install of EndeavourOS Gnome DE, with both the current and LTS kernels installed, on a hybrid intel/nvidia laptop setup ( Acer Aspire i5 E5-576G-5762 ). I did my best to follow the wiki on installing nvidia drivers and getting optimus to use the nvidia drivers as default, since the intel graphics chip makes Gnome feel sluggish since its not powerful enough. The wiki was a bit confusing since what was in the wiki wasn’t exactly what was showing on my system so I kind of had to improvise. The wiki in particular that I may have messed up following is this one: https://discovery.endeavouros.com/nvidia/nvidia-optional-enhancements-and-troubleshooting/2021/03/

Currently my system is working, but a recent kernel update came out today and after a quick update at the very end in the terminal I got an error:

==> ERROR: Failed to read configuration `/etc/mkinitcpio.conf'
error: command failed to execute correctly
(5/5) Check if user should be informed about rebooting after certain system package upgrades.

I still have the terminal open I’ll post a screenshot below if that helps.
Screenshot from 2021-07-26 12-12-08

But now I’m afraid if I reboot, perhaps my system won’t boot and I won’t be a fan of that lol. But it’s a fresh install, so it wouldn’t be the end of the world if I had to redo this all over again. But if that can be avoided that’d sure be nice!

In the wiki, I had to edit the /etc/default/grub and /etc/mkinitcpio.conf
I’m assuming because of the above error, I must’ve mad a slight misstep with one of both of the files I edited above. So if anyone could help me verify what comment I did wrong or what I need to change. I’m sure it’s a simple fix, I’m just not sure what to change. I’ll post my outputs of the relevant files below and if anyone can compare it to theirs and how it should look I’d appreciate it.

My edited /etc/default/grub

  GNU nano 5.8                    /etc/default/grub                              
# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="EndeavourOS"
GRUB_CMDLINE_LINUX_DEFAULT="nvidia-drm.modeset=1 quiet loglevel=3 nowatchdog"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

The only thing I did here was add "nvidia-drm.modeset=1", the line that was already there was "quiet loglevel=3 nowatchdog" so I just kept it after it, in the wiki it also had "resume=UUID=..." after their nvidia-drm.modeset=1, but I assumed I didn’t need to add that since it felt like it was just the end of their file. Please let me know if I can leave this as is or if I need to change anything, thank you.

My edited /etc/mkinitcpio.conf ( what I suspect is the culprit! )

Screenshot from 2021-07-26 13-04-59

Below is just a full detail of the mkinitcpio.conf file from what the screenshot is able to show, but the screenshot is the only part that I had edited, hence why I showed it.


   GNU nano 5.8                                                                         /etc/mkinitcpio.conf                                                                                    
 #
 # SPDX-License-Identifier: GPL-3.0-or-later
 
 # 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="nvidia nvidia_modeset nvidia_uvm nvidia_drm""
 
 # 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=""
 
 # 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 keyboard keymap filesystems fsck"
 
 # 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=()

For this file, in the top where it says # MODULES=“piix ide_disk reiserfs” the wiki has this is quotes “” but by default mine showed # MODULES=(piix ide_disk reiserfs), so I don’t know if that matters at all or not, but I’ve left it with parentheses () for now.
I’m not sure exactly what the file showed before by default, but in one of the top lines I added > MODULES=“nvidia nvidia_modeset nvidia_uvm nvidia_drm”" and I know there’s two quotes “” at the end of it, not sure if that’s ok to leave or I need to fix that, please let me know, thank you.

After I had edited this file, when I go to save it and rebuild the kernel image with sudo mkinitcpio -P, I got this error:

Screenshot from 2021-07-26 12-48-36

For the the part on the wiki with Enhancement avoid screen tearing, it says to add some FullCompositingPipeline line to the file /etc/X11/xorg.conf.d/20-nvidia.conf which when I go to sudo nano that file, it was completely empty (hope that’s normal?), so I just dumped the what the wiki said into that file and saved it.

At the end of the wiki it says “Use a hook to make sure you do get kernel images rebuilded on updates:”
Now I think I must’ve missed this or forgotten, I never did finish that step and I do wonder what I really need to do next to attempt to fix this. Like I said, I think it’s probably I simple issue, but because it’s a long post and so much is involved I have gotten a little lost in the sauce so to speak! If anyone made it this far in checking out my post I greatly appreciate your time and hope we can resolve this little issue together! If you need anymore info from me please let me know. Thank you kindly and await any replies.

No, you shouldn’t reboot while having mkinitcpio error (unless you’re comfortable with TTY)

First it’s a good idea to find error probably some syntax…probably it’s somewhere in:

/etc/mkinitcpio.conf

@dalto perhaps could help further

P.S. Oh you’ve posted it, just wrap in as codeblock, not as quote it’s little hard to read that way
Use

```
code here
```
1 Like

No worries, thanks for the quick reply and I just went back and edited the post so it’s more readable like you said. Thanks!

1 Like

Found it
/etc/mkinitcpio.conf

MODULES="nvidia nvidia_modeset nvidia_uvm nvidia_drm""

Double quotes in the end, remove one and try again :upside_down_face:

Oh and btw it’s old syntax, you should use () instead of "" double quotes for all options…that should work still, but just make sure you follow all the changes of .pacnew files in pacdiff so it won’t make a mess in the future :slight_smile:

Also you may want to comment out that line:

COMPRESSION="xz"

This will default to current zstd compression, which will make creating mkinitcpio much faster

3 Likes

The example default grub in the wiki is an example so you are correct you only need to add

nvidia-drm.modeset=1

Did you do ALL of the enhancements for nvidia including either adding the hook manually or installing the nvidia-hook package from the repo? Then you install optimus-manager after.

@keybreak has found your error. Hopefully that is all.

I have this setup on mine although it’s on a desktop so i have no hybrid graphics to deal with. It works very well if set up properly and i have had no issues with nvidia drivers installing and or updating.

1 Like

You definitely shouldn’t reboot in that state. That error probably means there is a typo in your mkinitcpio.conf

and chroot’ing :nerd_face:

3 Likes

Okay, got rid of the double quotes and when you say comment out, that means adding a hashtag # in front of the comment correct? Cuz that’s what I went ahead and did, saved the file, re-ran sudo mkinitcpio -P and got the following output (one without scary errors! :stuck_out_tongue: ), which I think looks good, it does show a few “warnings” but if I’m not mistaken I think the warnings below can be safely ignored, correct? Thanks very much for your help btw!! @keybreak

[scott@endeavourOS ~]$ sudo mkinitcpio -P
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'default'
  -> -k /boot/vmlinuz-linux-lts -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-lts.img
==> Starting build: 5.10.53-1-lts
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux-lts.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'fallback'
  -> -k /boot/vmlinuz-linux-lts -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-lts-fallback.img -S autodetect
==> Starting build: 5.10.53-1-lts
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux-lts-fallback.img
==> Image generation successful
==> 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: 5.13.5-arch1-1
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> 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: 5.13.5-arch1-1
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful

Greetings @ricklinux I just installed the nvidia-hook package from the repo right in the middle of posting this, so I do have it now yes (thanks to the devs btw for including that in the repos). I have the optimus-manager installed from the wikis too. It wasn’t opening before, but after fixing the error above, and re-running sudo mkinitcpio -P I can now start up the optimus-manager. I take it when I set it to use the nvidia gpu only, whenever I do a reboot it will remember that setting?

2 Likes

Yes, exactly :slight_smile:

Output looks good now, warnings are totally fine as long as you really don’t have those firmwares :laughing:

2 Likes

I’m not sure if it remembers the setting or not. I really don’t have any experience using optimus-manager. I just know how to set it up and get it working most times. Not all hybrid hardware works the same or co-operates at times. :wink:

1 Like

Good to know thank you! Looks like I might just have to do a reboot soon and watch how “things just work” heh heh. Thanks again for the help. @ricklinux I’m gonna do a reboot soon to see. I wanna assume it remembers your last setting and always sets that as the default. Hopefully that’s the case. But I’ll soon find out! I’ll leave an edit when I know for sure too for future reference. Thanks lovely people for the help!

Hopefully… :sweat_smile:

But you know…Some reading on TTY and chroot might not be useless :rofl:

Always keep a live USB handy as well, always better safe than broken :wink:

1 Like

Reboot was 100% successful on the current and LTS kernels, job well job mates! Also, when I restarted it did not use nvidia gpu by default, it defaulted to integrated graphics. Luckily the optimus-manager has a setting for startup mode where you can set this to your preference. So I was able to change it to nvidia, and rebooted one more time to confirm it was still the nvidia gpu and for sure it was so I am officially good to go on EndeavourOS! Here’s a quick screenshot of the settings to set for “Startup mode” btw.
Screenshot from 2021-07-26 14-14-06

Thanks again everyone for your help, very much appreciated! Feels great having a working install now!

2 Likes

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