您尚未登录。

#1 2024-05-12 20:32:42

Arrebol
会员
注册时间: 2024-05-12
帖子: 4

[已解决]optimus-manager 启动失败,nvidia驱动无法运行

自从安装好optimus-manager 之后我就一直没有更改过它,但今天我发现optimus-manager 的图标在状态栏消失了,手动重启optimus-manager 时报了这样的错误:

ERROR: the latest GPU setup attempt failed at Xorg pre-start hook.
Log at /var/log/optimus-manager/switch/switch-20240512T192654.log
Cannot execute command because of previous errors.

其指向的log文件是这样的:

[31] INFO: # Xorg pre-start hook
[32] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'integrated', 'current_mode': None}
[32] INFO: Requested mode is: integrated
[54] INFO: Available modules: ['nouveau']
[54] INFO: Loading module bbswitch
[54] ERROR: Cannot load bbswitch. Continuing anyways. Error is: module bbswitch is not available for current kernel. Is the corresponding package installed ?
[54] INFO: Setting GPU power to OFF via bbswitch
[54] ERROR: Xorg pre-start setup error
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/optimus_manager/kernel.py", line 296, in _set_bbswitch_state
    with open("/proc/acpi/bbswitch", "w") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/proc/acpi/bbswitch'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.12/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.12/site-packages/optimus_manager/kernel.py", line 25, in setup_kernel_state
    _nvidia_down(config)
  File "/usr/lib/python3.12/site-packages/optimus_manager/kernel.py", line 106, in _nvidia_down
    nvidia_power_down(config, available_modules)
  File "/usr/lib/python3.12/site-packages/optimus_manager/kernel.py", line 60, in nvidia_power_down
    _set_bbswitch_state("OFF")
  File "/usr/lib/python3.12/site-packages/optimus_manager/kernel.py", line 299, in _set_bbswitch_state
    raise KernelSetupError("Cannot open /proc/acpi/bbswitch") from e
optimus_manager.kernel.KernelSetupError: Cannot open /proc/acpi/bbswitch
[63] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[63] INFO: Writing state {'type': 'pre_xorg_start_failed', 'switch_id': '20240512T192654', 'requested_mode': 'integrated'}

nvidia-smi

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

我尝试完全卸载重新安装,但还是启动不了,也尝试过https://bbs.archlinux.org/viewtopic.php?id=255752这里的解决方法,但都没有效果。
uname -a:

Linux arch 6.8.9-zen1-2-zen #1 ZEN SMP PREEMPT_DYNAMIC Tue, 07 May 2024 22:06:02 +0000 x86_64 GNU/Linux

最近编辑记录 Arrebol (2024-05-13 17:57:15)

离线

#2 2024-05-12 20:58:05

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,698
个人网站

Re: [已解决]optimus-manager 启动失败,nvidia驱动无法运行

你重新安装了啥?
modinfo nvidia 和 pacman -Qs nvidia 看看?

离线

#3 2024-05-12 21:14:30

Arrebol
会员
注册时间: 2024-05-12
帖子: 4

Re: [已解决]optimus-manager 启动失败,nvidia驱动无法运行

依云 说:

你重新安装了啥?
modinfo nvidia 和 pacman -Qs nvidia 看看?

我重新安装了optimus-manager和optimus-manager-qt

modinfo nvidia:

modinfo: ERROR: Module nvidia not found.

pacman -Qs nvidia:

local/egl-wayland 2:1.1.13-1
    EGLStream-based Wayland external platform
local/lib32-nvidia-utils 550.78-1
    NVIDIA drivers utilities (32-bit)
local/libvdpau 1.5-2
    Nvidia VDPAU library
local/libxnvctrl 550.78-1
    NVIDIA NV-CONTROL X extension
local/nvidia 550.78-2
    NVIDIA drivers for linux
local/nvidia-prime 1.0-4
    NVIDIA Prime Render Offload configuration and utilities
local/nvidia-settings 550.78-1
    Tool for configuring the NVIDIA graphics driver
local/nvidia-utils 550.78-1
    NVIDIA drivers utilities

应该是内核的问题,我刚刚切换了一下内核,发现又可以用了....   :|
我刚刚试了一下,linux-zen、linux-lts都不能运行,linux 6.8.9.arch1-2就没有问题。

最近编辑记录 Arrebol (2024-05-12 21:19:35)

离线

#4 2024-05-12 23:27:30

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,698
个人网站

Re: [已解决]optimus-manager 启动失败,nvidia驱动无法运行

你只装了 nvidia,这个就是给 linux 包用的。-lts 需要装 nvidia-lts。-zen 不提供编译好的 nvidia 模块。你可以装 nvidia-dkms 但就是每次它们更新会在你本地编译。

离线

#5 2024-05-13 17:55:00

Arrebol
会员
注册时间: 2024-05-12
帖子: 4

Re: [已解决]optimus-manager 启动失败,nvidia驱动无法运行

依云 说:

你只装了 nvidia,这个就是给 linux 包用的。-lts 需要装 nvidia-lts。-zen 不提供编译好的 nvidia 模块。你可以装 nvidia-dkms 但就是每次它们更新会在你本地编译。

真的可以了,感谢大佬 tongue

离线

页脚