日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

ubuntu18.04下nvidia-settings无法保存设置

發布時間:2024/1/8 Ubuntu 61 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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
于是為其創建軟鏈接,并賦予可執行權限

sudo ln -s nvidia-polkit.py nvidia-polkit sudo chmod +x nvidia-polkit

此時,執行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

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100 sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150 sudo update-alternatives --display python

可看到當前選擇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无法保存设置的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。