web-dev-qa-db-ja.com

Nvidia Xサーバー-pythonインポートエラーのため、IntelからGPUに切り替えることができません

NVIDIA PRIME PROFILES

NVIDIAに切り替えようとすると、次のようになります。

ERROR: Traceback (most recent call last):
       File "/usr/share/screen-resolution-extra/nvidia-prime.py", line 22, in
       <module>
       import sys, dbus, logging
       ImportError: No module named 'dbus'

それが役立つ場合、別のエラーがあります:

** Message: PRIME: Requires offloading
** Message: PRIME: is it supported? yes

ERROR: nvidia-settings could not find the registry key file. This file should
       have been installed along with this driver at
       /usr/share/nvidia/nvidia-application-profiles-key-documentation. The
       application profiles will continue to work, but values cannot be
       prepopulated or validated, and will not be listed in the help text.
       Please see the README for possible values and descriptions.

多くのgtkテーマ解析エラーとともに。

GT 635M GPUを使用しており、gnomeデスクトップがインストールされたubuntu 16.04 LTSを実行しています。

助けてください :/

編集1:私は実行してみました

Sudo apt-get install python-dbus

そして得た

python-dbus is already the newest version (1.2.0-3).

GPUを切り替えても同じエラーが発生します。

編集2:私はスニーターが示唆したようにnvidia-prime.pyを編集しました。 nvidia-settingsを実行してもsys.versionとsys.pathは出力されませんが、スクリプトを直接実行した場合の出力です。

bp@ubuntu:~$ python /usr/share/screen-resolution-extra/nvidia-prime.py 
2.7.11+ (default, Apr 17 2016, 14:00:29) 
[GCC 5.3.1 20160413]
['/usr/share/screen-resolution-extra', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client']
Usage: /usr/share/screen-resolution-extra/nvidia-prime.py nvidia|intel
4
BBPP20

だから私は最終的に問題を修正しました。最新のnvidiaドライバー(367)をインストールし、UEFIでセーフブートを無効にする必要がありました。突然動作します。

1
BBPP20

同じエラーが発生しました。 Sudo nvidia-settingsの代わりにnvidia-settingsを実行して修正しました。これにより、アプリケーションを起動するために必要な特権が追加されます。

3
Jesse

ターミナルを使用してGPUを切り替えてみてください。その場合、エラーは発生しません。

NVIDIA GPUに切り替えるには:

Sudo prime-select nvidia

統合されたインテルGPUに切り替えるには:

Sudo prime-select intel
0
Amey Kasar