Software & AppsOperating SystemLinux

Fixing NVIDIA X Server Settings Reset on Reboot in Ubuntu

Ubuntu 20

In this article, we will explore various solutions to fix the issue of NVIDIA X Server settings resetting after every reboot in Ubuntu. This issue is commonly faced by many Ubuntu users and can be quite frustrating. The solutions presented here will help you save your NVIDIA X Server settings persistently, so they remain the same even after a system reboot.

Understanding the Issue

NVIDIA X Server Settings is a graphical interface to configure NVIDIA graphic cards. However, in Ubuntu, users often face an issue where these settings reset to their default values after every system reboot. This means that any changes you make to the settings, such as power mode or display configurations, are not saved and you have to reconfigure them after every reboot.

Solution 1: Using the xorg.conf File

The first solution involves creating and editing an xorg.conf file. This file is used by the X Window System used in Linux for configuring the graphics settings.

  1. Open a terminal and run the command sudo nvidia-xconfig. This command creates an xorg.conf file if it doesn’t already exist.
  2. Edit the xorg.conf file by running sudo gedit /etc/X11/xorg.conf.
  3. Look for the “Device” section in the file. Inside this section, add the following line:
    Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3322"
    Here, PowerMizerEnable=0x1 enables the PowerMizer (NVIDIA’s power management technology), and PerfLevelSrc=0x3322 sets the performance level source.
  4. Save the file and reboot your machine to see if the settings persist.

Solution 2: Using Startup Applications Preferences

The second solution involves using the Startup Applications Preferences program to load the NVIDIA settings at startup.

  1. Open the NVIDIA X Server Settings program and make the desired changes to the settings.
  2. Open the Startup Applications Preferences program. This program allows you to manage applications that run at startup.
  3. Add a new startup application with the command nvidia-settings --load-config-only. This command loads the NVIDIA settings configuration.
  4. Save the changes and reboot your machine to see if the settings persist.

Solution 3: Using a Startup Script

The third solution involves creating a startup script that assigns the desired display settings at startup.

  1. Create a script with the following content:
    #!/bin/bash
    nvidia-settings --assign CurrentMetaMode=<display_settings>
    Replace <display_settings> with your desired display settings.
  2. Save the script and make it executable using the command chmod +x <script_name>.
  3. Open the Startup Applications Preferences program and add a new startup application with the command to run the script.
  4. Save the changes and reboot your machine to see if the settings persist.

Solution 4: Using NVIDIA Settings Configuration

The fourth solution involves tweaking the NVIDIA Settings Configuration itself.

  1. Open the NVIDIA X Server Settings program.
  2. Go to the “nvidia-settings Configuration” tab.
  3. Uncheck the “Include X Display Names in the Config File” option. This option can sometimes cause issues with saving the settings.
  4. Save the current configuration and reboot your machine to see if the settings persist.

Conclusion

These are some of the solutions that have been suggested by various users and have different levels of success depending on your system configuration. It’s recommended to try them one by one and see which one works best for you. By following these steps, you should be able to fix the issue of NVIDIA X Server settings resetting on every reboot in Ubuntu.

Why do NVIDIA X Server settings reset after every reboot in Ubuntu?

This issue occurs because the default configuration does not save the changes made to the NVIDIA X Server settings.

Can I fix the NVIDIA X Server settings reset issue in Ubuntu?

Yes, there are several solutions provided in this article that can help you fix the issue and save your settings persistently.

How can I create an xorg.conf file?

You can create an xorg.conf file by running the command sudo nvidia-xconfig in the terminal. This command creates the file if it doesn’t already exist.

What does the “RegistryDwords” option do in the xorg.conf file?

The "RegistryDwords" option allows you to specify additional registry key-value pairs for configuring NVIDIA settings. In this case, it enables PowerMizer and sets the performance level source.

How can I use the Startup Applications Preferences program to load NVIDIA settings at startup?

To use the Startup Applications Preferences program, open it and add a new startup application with the command nvidia-settings --load-config-only. This command loads the NVIDIA settings configuration.

How can I create a startup script to assign display settings at startup?

To create a startup script, create a script file with the desired display settings and make it executable. Then, add a new startup application in the Startup Applications Preferences program to run the script at startup.

What should I do if the NVIDIA settings configuration option causes issues?

If the "Include X Display Names in the Config File" option causes issues, it’s recommended to uncheck it in the NVIDIA X Server Settings program. This may help in saving the settings correctly.

Which solution should I try first?

It is recommended to try the solutions in the order they are presented in this article. Start with Solution 1 and proceed to the others if the issue persists.

Are these solutions guaranteed to fix the issue?

The effectiveness of these solutions may vary depending on your system configuration. It’s recommended to try them one by one and see which one works best for you.

Leave a Comment

Your email address will not be published. Required fields are marked *