Optimus switched to nvidia breaks kernel compiling?

Hi, its been 3 times that my OS breaks after updating.
let me tell you about my spec:
its an acer f5-573g laptop with this configs:

Ram : 16GB 2400mhz
CPU : core i5-6200u with intel HD 520 iGPU
GPU: nvidia gtx 940 4GB, GDDR5 version

here’s what i do everytime i reinstall the OS :
after clean installing, i upgrade system with sudo pacman -Syu and after its done, i reboot and first thing i do is i install this https://github.com/Askannz/optimus-manager . after installing this package, i create a custom config to run nvidia on boot, because i want everything to run with my nvidia.
everything works fine and there is no problem until the point that i upgrade system, everything breaks and on the boot it says " failed to load kernel modules ". ( i’ve created a dedicated thread for this problem but even here, we couldnt fix it no matter what ( reinstalling kernel, recompiling it etc etc) and i had to do a fresh install )
now as the title says, my question is that custom config is the thing breaks everything? and if yes, is there any better way for handling apps with nvidia ? (mostly steam and games like csgo) cuz im really tired of reinstalling and configuring everything every months or so
i cant provide any logs since i have deleted that partition.

Could you show the output of:

  pacman -Qs nvidia
1 Like

i’ve deleted OS partition
im gonna install it again and post it here

local/egl-wayland 1.1.6-1
    EGLStream-based Wayland external platform
local/libvdpau 1.4-1
    Nvidia VDPAU library
local/nvidia-dkms 460.67-1
    NVIDIA drivers - module sources
local/nvidia-installer-db 2.4.23-1
    Database for the script to setup nvidia drivers in EndeavourOS
local/nvidia-installer-dkms 3.3.8-3
    Script to setup nvidia drivers (dkms version) in EndeavourOS
local/nvidia-utils 460.67-1
    NVIDIA drivers utilities

Where did you get the nvidia packages? Their versions are newer than in Arch testing…

i just installed OS using offline installer

Can you show your /etc/pacman.conf?

# /etc/pacman.conf
# See the pacman.conf(5) manpage for option and repository directives

# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
HoldPkg     = pacman glibc
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta    = 0.7
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
# We cannot check disk space from within a chroot environment

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

#Include = /etc/pacman.d/mirrorlist

Include = /etc/pacman.d/mirrorlist

Include = /etc/pacman.d/mirrorlist

#Include = /etc/pacman.d/mirrorlist

Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

#Include = /etc/pacman.d/mirrorlist

Include = /etc/pacman.d/mirrorlist

SigLevel = PackageRequired
Include = /etc/pacman.d/endeavouros-mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

Strange. On Arch page nvidia packages have version 465.31.

it was like this for the last 3 updates i did and it broke and everytime, when compiling i saw errors about nvidia modules
im updating as we are talking, the weird thing is everytime i install, first update is ok but just the update after optimus config breaks. im gonna try without it this time tho

i also saw this after pacman -Syu :

:: Starting full system upgrade...
:: Replace libcanberra-pulse with extra/libcanberra? [Y/n] 
:: Replace virtualbox-guest-dkms with community/virtualbox-guest-utils? [Y/n] n
:: Replace virtualbox-guest-dkms with community/virtualbox-guest-utils-nox? [Y/n] n
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: smbclient will be installed before its cifs-utils dependency
warning: dependency cycle detected:
warning: mesa will be installed before its libglvnd dependency
warning: dependency cycle detected:
warning: nvidia-utils will be installed before its egl-wayland dependency
warning: dependency cycle detected:
warning: nvidia-utils will be installed before its libglvnd dependency
warning: dependency cycle detected:

Usually those cycles are not problems.

Are you running this in a virtual machine?

no i dont

Disk /dev/sda: 223.57 GiB, 240057409536 bytes, 468862128 sectors
Disk model: KINGSTON SUV400S
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 209C5668-4D7A-2A40-84AB-EF56DE6E90F1

Device       Start       End   Sectors   Size Type
/dev/sda1     4096   1052671   1048576   512M EFI System
/dev/sda2  1052672 468857024 467804353 223.1G Linux filesystem

Disk /dev/sdb: 28.93 GiB, 31067209728 bytes, 60678144 sectors
Disk model: FLASH DRIVE     
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 077F1191-8BA6-4C82-A53C-5C3E7CB14867

Device     Start      End  Sectors  Size Type
/dev/sdb1   2048 60678110 60676063 28.9G Microsoft basic data

Then you should uninstall all virtualbox-guest-utils related packages.

1 Like

ok i’ll do it, btw update is finished now and my driver version is 465.31 now
installing nvidia-prime and running apps with prime-run is safe?
afraid of doing all those optimus thing one more time

Should be safe, but tbh I’ve never used them, so not 100% sure.
Maybe someone else here can answer better.

1 Like

ok, thank you for your responses!
i’ll do some research until then

1 Like