📅 September 15, 2017
“How can I make Linux Mint default to 100Hz for my fancy ultrawide monitor?”
If you are using a high-end monitor with Linux, such as the Acer Predator X34, that supports refresh rates higher than 60Hz, then you have probably noticed that Linux Mint defaults to a high refresh rate (100Hz if overclocked) at the login screen, but returns to a lower refresh rate (50Hz or 60Hz) after showing the desktop.
Sure, you can change the refresh rate to 100Hz manually using the Nvidia control panel, but this is a minor inconvenience that must be performed upon each boot.
“Is there a way to make the change persistent across reboots so I can always startup with, say, 80Hz?”
Yes. This article shows how to set a default refresh rate in Linux Mint 18.2 with the proprietary Nvidia drivers installed. The change is persistent across reboots. While this article uses the Acer Predator X34 overclocked to 100Hz, the same method should apply to any other monitor if using Nvidia drivers.
This article is based around an Nvidia-based graphics card with the Nvidia proprietary driver installed (version 384.69 as of the time of this writing). nvidia-settings is also installed.
For the Predator X34, it has been overclocked to 100Hz from the monitor’s menu, so it will support any refresh rate up to 100Hz. The monitor is connected to an Nvidia graphics card via the DisplayPort.
Step 1. Open nvidia-settings as root
This opens the NVIDIA X Server Settings.
Select X Server Display Configuration from the left menu so the Layout panel appears as shown.
Look at the Resolution field. It will probably be set to Auto. We need to change this to a manual resolution. Change the resolution here at your desired resolution. In this case, it is 3440×1440 for the Predator X34.
To the right of the resolution setting is the refresh rate. Change this rate to the refresh rate you want. In this case, 80Hz was chosen because that rate removes the dreaded scanline effect that the X34 exhibits at lower resolutions. Higher rates, such as 100Hz will also work. The setting you choose will be the refresh rate used after you log in to the desktop.
You can click Apply now to test and change the rate.
Step 2. Save to xorg.conf
While still at the same panel, click Save to X Configuration File. We need to save the changes made here to xorg.conf located at /etc/X11/xorg.conf. Since this is a system-level file, we need root permission to access it, which is why we opened nvidia-settings as root earlier. If not, you will be prompted for the root password.
Go ahead an overwrite xorg.conf. If there is anything you need to preserve or if you are concerned that you might make errors leading to a terminal boot, then make a backup copy of xorg.conf first.
After xorg.conf is updated, you might need to make further edits for other hardware in xorg.conf. For example, if you are using an M.M.O.7 mouse, then you must add the proper InputClass to avoid the unresponsive button issue that still plagues this mouse when used with Linux. Be sure to remove the default mouse entries from xorg.conf.
If you look at xorg.conf, the line that changes the default resolution is located within Section “Screen”
Option "metamodes" "3440x1440_80 +0+0"
The 3440x1440_80 sets the refresh rate to 80Hz. You could change this to other rates, such as 3440x1440_100 for 100Hz. If you only need to change the refresh rate, you could edit this line manually in order to avoid making additional changes to xorg.conf for custom hardware like the M.M.O.7. Otherwise, it is probably best to use nvidia-settings to alter xorg.conf.
Step 2. Change the Display Settings
Open the Linux Mint System Settings and select Display. The Display dialog appears.
Check that the resolution is set to match the xorg.conf/nvidia-settings resolution made in step 1. In this case, it is 3440×1440. Click Apply.
For some unknown reason, the refresh rate would not persistent between reboots until applied from the Display dialog. This seems to affect another display setting elsewhere. For my system, editing xorg.conf was not enough. I also had to apply the resolution from Display as described.
Now, Linux Mint 18.2 should automatically set the refresh rate to 80Hz (or whatever refresh rate was chosen) between reboots. There is no longer any need to manually change the refresh rate upon each boot.
If you need to adjust the refresh rate to something else, follow these steps again.
If xorg.conf contains errors or invalid settings, then you will boot to a terminal. No GUI. This is why you should make a backup of your existing xorg.conf first (if it exists).
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
You can then backup to the known good xorg.conf file if problems occur.
sudo cp /etc/X11/xorg.conf.bak /etc/X11/xorg.conf
You can also make changes to xorg.conf from the terminal using nano.
sudo nano /etc/X11/xorg.cong