Latest version not functioning; fails at pre-xorg-start hook.
See original GitHub issueDescribe the bug Post reboot after installing optimus-manager-git via the AUR, the package is not usable and the nvidia gpu seems to be powered off. All commands return the error posted below:
ERROR: the latest GPU setup attempt failed at Xorg pre-start hook.
Log at /var/log/optimus-manager/switch/switch-20220219T221409.log
Cannot execute command because of previous errors.
System info Please include :
- Arch, kernel 5.16.10.
- KDE 5.24.1
- SDDM
- Hp Envy 15 ep1020 – intel tigerlake iGPU, Nvidia RTX 3060 dGPU. Notably, this has a 4k OLED screen, which has been a stumbling block for linux until fairly recently.
- optimus-manager-git (because optimus-manager itself prevents me from even logging in!)
- no configuration performed.
Logs The log mentioned in the error given is as follows:
[14] INFO: # Xorg pre-start hook
[14] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'integrated', 'current_mode': None}
[14] INFO: Requested mode is: integrated
[1037] INFO: Available modules: ['nouveau', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[1038] INFO: Unloading modules ['nvidia_drm', 'nvidia_modeset', 'nvidia_uvm', 'nvidia'] (if loaded)
[1041] INFO: Cannot unload modules: None
[1042] INFO: Waiting 1s and retrying.
[2049] INFO: Cannot unload modules: None
[2049] INFO: Waiting 1s and retrying.
[3057] INFO: Cannot unload modules: None
[3057] INFO: Waiting 1s and retrying.
[4066] INFO: Cannot unload modules: None
[4066] INFO: Waiting 1s and retrying.
[5074] INFO: Cannot unload modules: None
[5075] INFO: Waiting 1s and retrying.
[6083] INFO: Max tries (6) exceeded
[6084] ERROR: Xorg pre-start setup error
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 269, in _unload_modules
subprocess.check_call(
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/optimus_manager/hooks/pre_xorg_start.py", line 51, in main
setup_kernel_state(config, prev_state, requested_mode)
File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 25, in setup_kernel_state
_nvidia_down(config)
File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 104, in _nvidia_down
_unload_nvidia_modules(available_modules)
File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 214, in _unload_nvidia_modules
_unload_modules(available_modules, ["nvidia_drm", "nvidia_modeset", "nvidia_uvm", "nvidia"])
File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 277, in _unload_modules
raise KernelSetupError(f"Cannot unload modules {modules_to_unload}: {e.stderr}") from e
optimus_manager.kernel.KernelSetupError: Cannot unload modules ['nvidia_drm', 'nvidia_modeset', 'nvidia_uvm', 'nvidia']: None
[6084] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[6084] INFO: Writing state {'type': 'pre_xorg_start_failed', 'switch_id': '20220219T221409', 'requested_mode': 'integrated'}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:7
Top Results From Across the Web
GPU setup was initiated but Xorg post-start hook did not run
Hello! I've been optimus-manager for a couple of months now with no issues, but lately I can't seem to be able to switch...
Read more >Git pre-commit hook is not running on Windows - Stack Overflow
Just tried that and now it comes up with an error when I try to commit: "error: cannot spawn .git/hooks/pre-commit: no such file...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this problem happens to me too, i solve it like this Every time you update the kernel, you need to update the nvidia packages. (It can happen to you even if you use the lts kernel.)
prime-offload
run this commandlinux
andlinux-headers
sudo mkinitcpio -p linux
If you do not want to do all these operations, you should install the dkms packages. For example nvidia-390xx-dkms When the kernel is updated it will automatically introduce the nvidia kernel modules.
If you don’t want to install the dkms package, you can create a hook file
/etc/pacman.d/hooks/nvidia.hook
When the kernel is updated, it will automatically reinstall the packages.
If you are using an old card like mine, you will get this error every time you update the kernel. I was currently using kernel version 5.15, I’m updating my kernel to show you 😃
If you don’t understand anything from what I wrote, check these resources
<del>I updated the kernel, now I will restart my computer and take a screenshot. I’ll have edited my answer again in 2 minutes 😄 Please wait</del>
it works ,hope it helps you too .
None of that is relevant. There is no issue with the drivers, the issue is with the switchers pre-hook (not pacmans hooks) and lack of actual docs for running with no greeter.