所以显然这是一个常见问题,但是我已经在谷歌上搜索了这个问题一个星期,似乎无法解决它。powertop
在没有运行任何程序时报告约 30W 的功率,这太高了。我这样做了,sudo prime-select intel
但这并没有降低功耗。我重新启动了,但系统在登录前冻结了,我不得不prime-select nvidia
从恢复中恢复才能让它重新工作。我还向 bbswitch 发出了 OFF 的回声(即使我没有安装 bumblebee),但它重置为开启:
$ sudo bash -c "echo OFF > /proc/acpi/bbswitch"
$ echo /proc/acpi/bbswitch
0000:01:00.0 ON
以下是更多信息:
uname -a
Linux HOSTNAME 4.15.0-29-generic #31~16.04.1-Ubuntu SMP Wed Jul 18 08:54:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ sudo prime-select nvidia
Info: the current GL alternatives in use are: ['nvidia-410-prime', 'nvidia-410-prime']
Info: the current EGL alternatives in use are: ['nvidia-410-prime', 'nvidia-410-prime']
Info: selecting nvidia-410 for the nvidia profile
update-alternatives: using /usr/lib/nvidia-410/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-410/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-410/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-410/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_EGL.conf (i386-linux-gnu_egl_conf) in manual mode
$ sudo prime-select intel
Info: the current GL alternatives in use are: ['nvidia-410', 'nvidia-410']
Info: the current EGL alternatives in use are: ['nvidia-410', 'nvidia-410']
Info: selecting nvidia-410-prime for the intel profile
update-alternatives: using /usr/lib/nvidia-410-prime/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-410-prime/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-410-prime/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-410-prime/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_EGL.conf (i386-linux-gnu_egl_conf) in manual mode
$ ls /usr/lib/nvidia*
/usr/lib/nvidia:
pre-install
/usr/lib/nvidia-410:
alt_ld.so.conf libGLESv2_nvidia.so.2 libnvcuvid.so.1 libnvidia-fatbinaryloader.so.410.78 libnvidia-rtcore.so.410.78
bin libGLESv2_nvidia.so.410.78 libnvcuvid.so.410.78 libnvidia-fbc.so libnvidia-tls.so.410.78
ld.so.conf libGLESv2.so libnvidia-cbl.so.410.78 libnvidia-fbc.so.1 libnvidia-wfb.so.1
libEGL_nvidia.so.0 libGLESv2.so.2 libnvidia-cfg.so libnvidia-fbc.so.410.78 libnvidia-wfb.so.410.78
libEGL_nvidia.so.410.78 libGLESv2.so.2.1.0 libnvidia-cfg.so.1 libnvidia-glcore.so.410.78 libnvoptix.so.1
libEGL.so libGL.so libnvidia-cfg.so.410.78 libnvidia-glsi.so.410.78 libnvoptix.so.410.78
libEGL.so.1 libGL.so.1 libnvidia-compiler.so libnvidia-glvkspirv.so.410.78 libOpenGL.so
libEGL.so.1.1.0 libGL.so.1.7.0 libnvidia-compiler.so.1 libnvidia-ifr.so libOpenGL.so.0
libEGL.so.410.78 libGL.so.410.78 libnvidia-compiler.so.410.78 libnvidia-ifr.so.1 tls
libGLdispatch.so.0 libGLX_indirect.so.0 libnvidia-eglcore.so.410.78 libnvidia-ifr.so.410.78 vdpau
libGLESv1_CM_nvidia.so.1 libGLX_nvidia.so.0 libnvidia-egl-wayland.so.1 libnvidia-ml.so xorg
libGLESv1_CM_nvidia.so.410.78 libGLX_nvidia.so.410.78 libnvidia-egl-wayland.so.1.1.0 libnvidia-ml.so.1
libGLESv1_CM.so libGLX.so libnvidia-encode.so libnvidia-ml.so.410.78
libGLESv1_CM.so.1 libGLX.so.0 libnvidia-encode.so.1 libnvidia-ptxjitcompiler.so.1
libGLESv1_CM.so.1.2.0 libnvcuvid.so libnvidia-encode.so.410.78 libnvidia-ptxjitcompiler.so.410.78
/usr/lib/nvidia-410-prime:
alt_ld.so.conf ld.so.conf
$ lspci -k | grep -EA2 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
DeviceName: Onboard IGD
Subsystem: Dell Device 07e1
--
01:00.0 3D controller: NVIDIA Corporation Device 1c8d (rev a1)
Subsystem: Dell Device 07e1
Kernel driver in use: nvidia
我使用的是戴尔 Inspiron 笔记本电脑,配备 i7 7700HQ 和 GTX 1050 移动卡。我也试过nvidia-430
驱动程序(也许较新的驱动程序问题较少),但 X 根本无法启动。所以我又恢复了nvidia-410
。
我还阅读了一些其他链接,例如这和这个有一个经过修改的 prime-select 脚本,但到目前为止,这些都对我没有任何帮助。
我还注意到,glxinfo
在切换到英特尔驱动程序后(重启前),该功能不起作用。它失败并显示以下输出
name of display: :0
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Error: couldn't find RGB GLX visual or fbconfig
132 GLX Visuals
<Long GLX Listings>
215 GLXFBConfigs:
<Longer GLXFB Listings>
我但这可能与 prime 无关。可能根本nvidia-410
无法与 prime 配合使用,我需要其他版本的 GTX 1050m 驱动程序。我已经这样做了几个星期,怀念我的笔记本电脑的英特尔显卡和 Linux 上的电池寿命。任何帮助都将不胜感激。
答案1
你好像被一种讨厌的虫子咬了:
最好的修复似乎是评论#46中提供的补丁,您sudo prime-select intel
无需重新启动即可使用:
请阅读在决定最佳补救措施之前,请仔细阅读整个错误报告。
总结
该错误不会影响我,因为:
- 我使用的是 16.04,似乎没有受到影响
- 我有一台 GTX 970M,18.04 补丁可以工作,但你的 1050 没有修复
我已经使用 nvidia384.130
很长时间了,这里没有出现任何问题:
$ sudo prime-select query
nvidia
$ sudo prime-select intel
Info: the current GL alternatives in use are: ['nvidia-384', 'nvidia-384']
Info: the current EGL alternatives in use are: ['nvidia-384', 'nvidia-384']
Info: selecting nvidia-384-prime for the intel profile
update-alternatives: using /usr/lib/nvidia-384-prime/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-384-prime/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-384-prime/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-384-prime/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_EGL.conf (i386-linux-gnu_egl_conf) in manual mode
$ sudo prime-select nvidia
Info: the current GL alternatives in use are: ['nvidia-384-prime', 'nvidia-384-prime']
Info: the current EGL alternatives in use are: ['nvidia-384-prime', 'nvidia-384-prime']
Info: selecting nvidia-384 for the nvidia profile
update-alternatives: using /usr/lib/nvidia-384/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-384/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-384/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-384/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_EGL.conf (i386-linux-gnu_egl_conf) in manual mode
我的系统与您的系统类似的其他细节:
$ cat /proc/acpi/bbswitch
0000:01:00.0 ON
$ uname -a
Linux alien 4.14.114-0414114-generic #201904270558 SMP Sat Apr 27 10:01:11 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ lspci -k | grep -EA2 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
DeviceName: Onboard IGD
Subsystem: Dell Skylake Integrated Graphics
--
01:00.0 3D controller: NVIDIA Corporation GM204M [GeForce GTX 970M] (rev a1)
Subsystem: Dell GM204M [GeForce GTX 970M]
Kernel driver in use: nvidia