ubuntu18.04下nvidia-settings无法保存设置
生活随笔
收集整理的這篇文章主要介紹了
ubuntu18.04下nvidia-settings无法保存设置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
問題
ubuntu18.04下nvidia-settings無法保存設置
解決方法
打開終端執行
nvidia-settings點擊 Save to X Configuration File 提示 Unable to open X config file ‘/etc/X11/xorg.conf’ for writing
看終端輸出
Package xorg-server was not found in the pkg-config search path. Perhaps you should add the directory containing `xorg-server.pc' to the PKG_CONFIG_PATH environment variable No package 'xorg-server' found Package xorg-server was not found in the pkg-config search path. Perhaps you should add the directory containing `xorg-server.pc' to the PKG_CONFIG_PATH environment variable No package 'xorg-server' found Error accessing /usr/share/screen-resolution-extra/nvidia-polkit: No such file or directoryERROR: Unable to open X config file '/etc/X11/xorg.conf' for writing.發現沒有 /usr/share/screen-resolution-extra/nvidia-polkit 文件
進入目錄cd /usr/share/screen-resolution-extra && ls
發現存在nvidia-polkit.py
于是為其創建軟鏈接,并賦予可執行權限
此時,執行Save to X Configuration File,若終端輸出
Package xorg-server was not found in the pkg-config search path. Perhaps you should add the directory containing `xorg-server.pc' to the PKG_CONFIG_PATH environment variable No package 'xorg-server' found Traceback (most recent call last):File "/usr/share/screen-resolution-extra/nvidia-polkit", line 20, in <module>import sys, dbus, logging, os, re ImportError: No module named dbusERROR: Unable to open X config file '/etc/X11/xorg.conf' for writing.可能是因為pyhon版本問題
切換系統默認python版本至python3
可看到當前選擇python3
python - auto modelink best version is /usr/bin/python3link currently points to /usr/bin/python3link python is /usr/bin/python /usr/bin/python2 - priority 100 /usr/bin/python3 - priority 150此時,Save to X Configuration File應執行成功
總結
以上是生活随笔為你收集整理的ubuntu18.04下nvidia-settings无法保存设置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: IDEA Plugins中搜索不到插件解
- 下一篇: ubuntu安装ROS进行到rosdep