NEW (JAN 4):
I’ve noticed that the 5.10.4 update is out according to “yay”, so I installed it. Upon reboot, the GPU works (but not the audio as per previous thread). Alright, nothing funky so far.
So I’ve downgraded to 5.10.3 again to test. This time, the GPU doesn’t work despite working earlier! (Audio doesn’t work as normal) I’d like to speculate that Optimus Manager can only detect the latest kernel installed, but is unable to “roll back” to earlier nvidia
modules?
For now, I’m staying on 5.9.14 as I’m prioritizing having audio over the GPU. Hopefully I’ll get to use both soon!
Reinstalling nvidia nvidia-settings nvidia-utils lib32-nvidia-utils optimus-manager-git
while on 5.9.14 then rebooting doesn’t work either.
Just started my computer, and realized that my Nvidia GPU isn’t being utilized. I initially inferred this from my lack of frame rate while gaming. I then tried to manually specify Optimus Manager to use it, and got this:
optimus-manager --switch nvidia
ERROR: the latest GPU setup attempt failed at Xorg pre-start hook.
Log at /var/log/optimus-manager/switch/switch-20210103T234311.log
Config parsing : error in option "startup_auto_battery_mode" in section [optimus] : invalid value "intel"
Cannot execute command because of previous errors.
Here’s the relevant entry within /etc/optimus-manager/optimus-manager.conf
# GPU mode to use at computer startup. Possible values: nvidia, intel, hybrid, >
# "auto" is a special mode that auto-detects if the computer is running on batt>
# and selects a proper GPU mode. See the other options below.
startup_mode=auto
# GPU mode to select when startup_mode=auto and the computer is running on batt>
# Possible values: nvidia, intel, hybrid
startup_auto_battery_mode=intel
# GPU mode to select when startup_mode=auto and the computer is running on exte>
# Possible values: nvidia, intel, hybrid
startup_auto_extpower_mode=nvidia
Here is the relevant log file:
[32] INFO: # Xorg pre-start hook
[32] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': None}
[32] INFO: Requested mode is: nvidia
[32] INFO: Checking for GDM display servers
[52] ERROR: Config parsing : error in option "startup_auto_battery_mode" in section [optimus] : invalid value "intel"
[52] INFO: Falling back to default value "integrated"
[214] INFO: Available modules: ['nouveau']
[214] INFO: Unloading modules ['nouveau'] (if loaded)
[218] INFO: switching=none, nothing to do
[297] INFO: Loading module nvidia
[297] ERROR: Xorg pre-start setup error
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/optimus_manager/hooks/pre_xorg_start.py", line 45, in main
setup_kernel_state(config, prev_state, requested_mode)
File "/usr/lib/python3.9/site-packages/optimus_manager/kernel.py", line 22, in setup_kernel_state
_nvidia_up(config, hybrid=(requested_mode == "hybrid"))
File "/usr/lib/python3.9/site-packages/optimus_manager/kernel.py", line 91, in _nvidia_up
_load_nvidia_modules(config, available_modules)
File "/usr/lib/python3.9/site-packages/optimus_manager/kernel.py", line 134, in _load_nvidia_modules
_load_module(available_modules, "nvidia", options="NVreg_UsePageAttributeTable=%d" % pat_value)
File "/usr/lib/python3.9/site-packages/optimus_manager/kernel.py", line 234, in _load_module
raise KernelSetupError(
optimus_manager.kernel.KernelSetupError: module nvidia is not available for current kernel. Is the corresponding package installed ?
[298] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[298] INFO: Writing state {'type': 'pre_xorg_start_failed', 'switch_id': '20210103T234311', 'requested_mode': 'nvidia'}
Then, I decided to directly specify the Nvidia GPU instead like such, thus potentially bypassing whatever issue there is on the “Intel” end:
# GPU mode to use at computer startup. Possible values: nvidia, intel, hybrid, >
# "auto" is a special mode that auto-detects if the computer is running on batt>
# and selects a proper GPU mode. See the other options below.
startup_mode=nvidia
# GPU mode to select when startup_mode=auto and the computer is running on batt>
# Possible values: nvidia, intel, hybrid
#startup_auto_battery_mode=intel
# GPU mode to select when startup_mode=auto and the computer is running on exte>
# Possible values: nvidia, intel, hybrid
#startup_auto_extpower_mode=nvidia
I then rebooted my laptop immediately, but the issue persists. Here’s the new output from my next attempt at optimus-manager --switch nvidia
:
ERROR: the latest GPU setup attempt failed at Xorg pre-start hook.
Log at /var/log/optimus-manager/switch/switch-20210104T000811.log
Cannot execute command because of previous errors.
Here is the new, relevant log file:
[40] INFO: # Xorg pre-start hook
[40] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': None}
[40] INFO: Requested mode is: nvidia
[40] INFO: Checking for GDM display servers
[178] INFO: Available modules: ['nouveau']
[178] INFO: Unloading modules ['nouveau'] (if loaded)
[182] INFO: switching=none, nothing to do
[204] INFO: Loading module nvidia
[204] ERROR: Xorg pre-start setup error
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/optimus_manager/hooks/pre_xorg_start.py", line 45, in main
setup_kernel_state(config, prev_state, requested_mode)
File "/usr/lib/python3.9/site-packages/optimus_manager/kernel.py", line 22, in setup_kernel_state
_nvidia_up(config, hybrid=(requested_mode == "hybrid"))
File "/usr/lib/python3.9/site-packages/optimus_manager/kernel.py", line 91, in _nvidia_up
_load_nvidia_modules(config, available_modules)
File "/usr/lib/python3.9/site-packages/optimus_manager/kernel.py", line 134, in _load_nvidia_modules
_load_module(available_modules, "nvidia", options="NVreg_UsePageAttributeTable=%d" % pat_value)
File "/usr/lib/python3.9/site-packages/optimus_manager/kernel.py", line 234, in _load_module
raise KernelSetupError(
optimus_manager.kernel.KernelSetupError: module nvidia is not available for current kernel. Is the corresponding package installed ?
[204] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[204] INFO: Writing state {'type': 'pre_xorg_start_failed', 'switch_id': '20210104T000811', 'requested_mode': 'nvidia'}
So in both log files, it doesn’t recognize the module “nvidia”! They were working fine up until today. (Might it be potentially caused by me downgrading kernels in my previous post at https://forum.endeavouros.com/t/no-sound-from-laptop-speakers-and-mic-not-working-too/10928/16?)
Update: Upon switching back to Linux kernel 5.10.3 (so, undoing changes from the previous thread above) has restored GPU functionality as normal. But the audio is no longer working then!