我认为我的笔记本电脑 Asus Rog Zephyrus G G4502 无法正确切换显卡prime-select
。我正尝试关闭 nvidia gpu 以延长电池寿命
编辑1:运行后耗电量sudo prime-select nvidia && reboot
为降低比跑步sudo prime-select intel && reboot
。
软件和更新可识别 Nvidia 卡和驱动程序。Nvidia 设置目前提供以下内容:
(nvidia-settings:11339): GLib-GObject-CRITICAL **: 14:27:26.898: g_object_unref: assertions 'G_IS_OBJECT (object)' failed
** Message: PRIME: No offloading required. Abort
** Message: PRIME: is it supported? no
我尝试过十几次清除并重新安装 nvidia 驱动程序(甚至是全新安装)。
如果没有xorg.conf
文件,nvidia-settings 将显示空白屏幕。有了这个文件,它会显示一些有关 gpu 的信息,但没有 PRIME 配置文件选项卡。
编辑2:输出lspci -k | grep -EA3 'VGA|3D|Display'
:
victor7095@victor7095-Zephyrus-G-GU502DU-GA502DU:~$ lspci -k | grep -EA3 'VGA|3D|Display'
01:00.0 VGA compatible controller: NVIDIA Corporation TU116M [GeForce GTX 1660 Ti Mobile] (rev a1)
Subsystem: ASUSTeK Computer Inc. TU116M [GeForce GTX 1660 Mobile]
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
--
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso (rev c1)
Subsystem: ASUSTeK Computer Inc. Picasso
Kernel driver in use: amdgpu
Kernel modules: amdgpu
--
05:00.7 Non-VGA unclassified device: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/Renoir Non-Sensor Fusion Hub KMDF driver
Subsystem: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/Renoir Non-Sensor Fusion Hub KMDF driver
Kernel driver in use: i2c_amd_mp2
Kernel modules: i2c_amd_mp2_pci
输出mokutil --sb-state
:
victor7095@victor7095-Zephyrus-G-GU502DU-GA502DU:~$ mokutil --sb-state
SecureBoot enabled
编辑3:输出glxinfo | grep OpenGL
:
victor7095@victor7095-Zephyrus-G-GU502DU-GA502DU:~$ glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 1660 Ti with Max-Q Design/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 440.44
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 440.44
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 440.44
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
编辑4:输出xrandr --listproviders
:
victor7095@victor7095-Zephyrus-G-GU502DU-GA502DU:~$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x1e8 cap: 0x1, Source Output crtcs: 4 outputs: 2 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x45 cap: 0x6, Sink Output, Source Offload crtcs: 4 outputs: 2 associated providers: 1 name:modesetting
编辑5:根据@Pilot6 的建议,我发布了新的输出。
输出nvidia-smi
:
victor7095@victor7095-Zephyrus-G-GU502DU-GA502DU:~$ 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.
输出nvidia-settings
:
victor7095@victor7095-Zephyrus-G-GU502DU-GA502DU:~$ nvidia-settings
ERROR: NVIDIA driver is not loaded
ERROR: Unable to load info from any available system
(nvidia-settings:4070): GLib-GObject-CRITICAL **: 15:58:56.780: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 15:58:56.784: PRIME: No offloading required. Abort
** Message: 15:58:56.784: PRIME: is it supported? no
输出glxinfo | grep OpenGL
:
victor7095@victor7095-Zephyrus-G-GU502DU-GA502DU:~$ glxinfo | grep OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: AMD RAVEN (DRM 3.33.0, 5.3.0-24-generic, LLVM 9.0.0)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.2.1
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.5 (Compatibility Profile) Mesa 19.2.1
编辑6:输出dkms status
:
victor7095@victor7095-Zephyrus-G-GU502DU-GA502DU:~$ dkms status
nvidia, 440.44, 5.3.0-24-generic, x86_64: installed
rtl8821ce, 5.2.5.2.1.30816.20190425, 5.3.0-24-generic, x86_64: installed
编辑6:一些 bbswitch 命令的输出:
victor7095@victor7095-Zephyrus-G-GU502DU-GA502DU:/proc/acpi$ sudo cat /proc/acpi/bbswitch
cat: /proc/acpi/bbswitch: No such file or directory
victor7095@victor7095-Zephyrus-G-GU502DU-GA502DU:/proc/acpi$ sudo tee /proc/acpi/bbswitch <<<OFF
tee: /proc/acpi/bbswitch: No such file or directory
OFF
victor7095@victor7095-Zephyrus-G-GU502DU-GA502DU:/proc/acpi$ sudo modprobe bbswitch
modprobe: ERROR: could not insert 'bbswitch': No such device
输出dmesg | tail
:
victor7095@victor7095-Zephyrus-G-GU502DU-GA502DU:/proc/acpi$ dmesg | tail
[ 1153.397538] bbswitch: version 0.8
[ 1153.397556] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.GPP0.PEGP
[ 1153.397561] bbswitch: Found discrete VGA device 0000:05:00.0: \_SB_.PCI0.GP17.VGA_
[ 1153.397593] bbswitch: failed to evaluate \_SB_.PCI0.GP17.VGA_._DSM {0xF8,0xD8,0x86,0xA4,0xDA,0x0B,0x1B,0x47,0xA7,0x2B,0x60,0x42,0xA6,0xB5,0xBE,0xE0} 0x100 0x0 {0x00,0x00,0x00,0x00}: AE_NOT_FOUND
[ 1153.397605] bbswitch: failed to evaluate \_SB_.PCI0.GP17.VGA_._DSM {0xA0,0xA0,0x95,0x9D,0x60,0x00,0x48,0x4D,0xB3,0x4D,0x7E,0x5F,0xEA,0x12,0x9F,0xD4} 0x102 0x0 {0x00,0x00,0x00,0x00}: AE_NOT_FOUND
[ 1153.397606] bbswitch: No suitable _DSM call found.
输出dmesg | grep bbswitch
:
victor7095@victor7095-Zephyrus-G-GU502DU-GA502DU:/proc/acpi$ dmesg | grep bbswitch
[ 1153.397538] bbswitch: version 0.8
[ 1153.397556] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.GPP0.PEGP
[ 1153.397561] bbswitch: Found discrete VGA device 0000:05:00.0: \_SB_.PCI0.GP17.VGA_
[ 1153.397593] bbswitch: failed to evaluate \_SB_.PCI0.GP17.VGA_._DSM {0xF8,0xD8,0x86,0xA4,0xDA,0x0B,0x1B,0x47,0xA7,0x2B,0x60,0x42,0xA6,0xB5,0xBE,0xE0} 0x100 0x0 {0x00,0x00,0x00,0x00}: AE_NOT_FOUND
[ 1153.397605] bbswitch: failed to evaluate \_SB_.PCI0.GP17.VGA_._DSM {0xA0,0xA0,0x95,0x9D,0x60,0x00,0x48,0x4D,0xB3,0x4D,0x7E,0x5F,0xEA,0x12,0x9F,0xD4} 0x102 0x0 {0x00,0x00,0x00,0x00}: AE_NOT_FOUND
[ 1153.397606] bbswitch: No suitable _DSM call found.
输出dmesg | grep acpi
:
victor7095@victor7095-Zephyrus-G-GU502DU-GA502DU:/proc/acpi$ dmesg | grep acpi
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] high edge lint[0x1])
[ 0.132087] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[ 0.160775] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI HPX-Type3]
[ 0.160932] acpi PNP0A08:00: _OSC: platform does not support [SHPCHotplug LTR]
[ 0.161083] acpi PNP0A08:00: _OSC: OS now controls [PCIeHotplug PME AER PCIeCapability]
[ 0.161094] acpi PNP0A08:00: [Firmware Info]: MMCONFIG for domain 0000 [bus 00-3f] only partially covers this bridge
[ 0.188199] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[ 0.343322] acpi_cpufreq: overriding BIOS provided _PSD data
[ 0.433812] acpi device:19: registered as cooling_device8