每次重启都会丢失 NVIDIA X 服务器设置

kgi*_*dov 34 nvidia xorg

我在 Z87 Gigabyte 主板和双引导 Windows 8.1 Pro 和 Ubuntu 12.04.3 LTS 上运行 GeForce GTX 770。除了 Ubuntu 中的视频和 3D 性能外,设置总体运行流畅。我曾经遇到过臭名昭著的闪烁问题,并找到了解决方法。这与 NVidia 卡进入低功耗模式有关,然后视频和 3D 效果会出现撕裂和卡顿现象。解决方法是转到 nvidia 设置并将电源模式从“自动”更改为“首选最高性能”。问题是这只在我重新启动之前有效。重启后设置被清除,问题仍然存在,所以我必须为当前会话再次手动设置。我试过 gksu-ing 并设置它,但它没有用。我试图编辑 etc/X11/xorg.conf,但它是空的 - 该文件中有零行。

TL;DR:重新启动后会重置 NVidia 设置,并尝试了我在 Internet 上能找到的所有方法,但都没有效果。

如果有人知道在这种情况下该怎么做,请分享!

谢谢!

编辑 [1]:我做了一些进一步的挖掘,似乎没有明显或安全的解决方案。有些人尝试手动设置性能级别,但报告说它不安全并且可能会杀死 GPU。不过还是有希望的。我认为这可以通过 nvidia-settings 提供的 NVidia 配置文件选项来完成。问题是人们需要知道有问题的键和这个键接受的值。

I could have put a screenshot here, but I need rep => 10...
Run Code Online (Sandbox Code Playgroud)

我找不到可能的键或任何键值的列表......我猜没有运气。

有人可以提供链接或列出一些有用的链接吗?

谢谢!

编辑[2]:终于!感谢大家的帮助!我在vegard torvund这个线程的帮助下找到了解决方案。并感谢Ubuntu Google+ 社区的传播!

veg*_*und 19

  1. 通过以下方式创建 xorg.conf 文件:

    sudo nvidia-xconfig
    
    Run Code Online (Sandbox Code Playgroud)
  2. 在 xorg.conf 文件中查找“设备”部分并在该部分中添加以下行:

    Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3322"
    
    Run Code Online (Sandbox Code Playgroud)

保存并重新启动您的机器。

附注。如果添加更多参数,;在0x3322之后添加


fal*_*ner 16

来自官方用户指南

"4. 自动加载设置

The NVIDIA X driver does not preserve values set with nvidia-settings
between runs of the X server (or even between logging in and logging
out of X, with xdm, gdm, or kdm).  This is intentional, because
different users may have different preferences, thus these settings
are stored on a per user basis in a configuration file stored in
the user's home directory.

The configuration file is named "~/.nvidia-settings-rc".  You can
specify a different configuration file name with the "--config"
commandline option.

After you have run nvidia-settings once and have generated a
configuration file, you can then run:

    nvidia-settings --load-config-only

at any time in the future to upload these settings to the X
server again.  For example, you might place the above command in
your ~/.xinitrc file so that your settings are applied automatically
when you log in to X.

Your .xinitrc file, which controls what X applications should
be started when you log into X (or startx), might look something
like this:

    nvidia-settings --load-config-only &
    xterm &
    evilwm

or:

    nvidia-settings --load-config-only &
    gnome-session

If you do not already have an ~/.xinitrc file, then chances are that
xinit is using a system-wide xinitrc file.  This system wide file
is typically here:

    /etc/X11/xinit/xinitrc

To use it, but also have nvidia-settings upload your settings,
you could create an ~/.xinitrc with the contents:

    nvidia-settings --load-config-only &
    . /etc/X11/xinit/xinitrc

System administrators may choose to place the nvidia-settings load
command directly in the system xinitrc script.

Please see the xinit(1) manpage for further details of configuring
your ~/.xinitrc file.
Run Code Online (Sandbox Code Playgroud)


Dom*_*ano 6

我能够在我的系统上解决这个问题:

  1. 导航到“nvidia-settings 配置”选项卡。
  2. 取消选中“在配置文件中包含 X 显示名称”
  3. 保存当前配置

事实证明,设置正在加载,但显示名称(看起来正确)阻止了它们的设置。这是在基本的双显示系统上。


在此输入图像描述


Ini*_*Ini 5

您可以做的是创建一个如下所示的脚本并在启动时运行它。

#!/bin/bash
nvidia-settings --assign CurrentMetaMode=<display_settings>
Run Code Online (Sandbox Code Playgroud)

您替换<display_settings>为您的显示设置。显示设置可能如下所示:

"DVI-D-0: nvidia-auto-select +0+0, DP-0.1: nvidia-auto-select +1920+0, DP-0.8: nvidia-auto-select +0+0, HDMI-0: nvidia-auto-select +1920+0" 
Run Code Online (Sandbox Code Playgroud)

您可以从“X 配置文件”中获取显示设置。

您可以通过“启动应用程序首选项”程序在启动时运行它。

您可以通过gnome-session-properties终端启动“启动应用程序首选项” 。