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.
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! )
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:
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.