You can write an xrandr startup script, but it won’t apply to the login screen/greeter, and the display will probably blank out/flicker as soon as you log in. This method is distro/driver/GPU agnostic, as long as you’re running X.
The alternative is to write up an xorg.conf file. Adubs’ solution is an easy way to do this, as long as you’re running the proprietary Nvidia drivers. If you’re running Nouveau or AMD/Intel, you can write the config file by hand but it’s labor-intensive. However, it will apply to the greeter and won’t cause flickering on login. Like an xrandr script, the conf file method is distro/driver/GPU agnostic, but only applies to X.
In case somebody besides OP finds this post, here’s how it’s done:
Create the file /etc/X11/xorg.conf.d/10-video.conf. You can give it a different name, but the number determines the order it’s loaded in, and the .conf ending is required.
For one monitor, you need a Device section, a Monitor section, and a Screen section. In X11 lingo, a Device is a GPU or display adapter, a Monitor is the physical device that makes the pretty pictures, and a Screen is framebuffer that gets rendered into by the Device, then pushed to a Monitor.
A Mode is a resolution and refresh rate for a Monitor, complete with timings and voltage polarities. To have a Monitor default to a particular Mode, use the PreferredMode option in the Monitor section. You can use xrandr command to list your connected Monitors and their Modes; make sure the name matches exactly.
There’s a good template to start with in the Fedora documentation. Scroll down to “C.3.3.6. The Monitor section” (Device and Screen are immediately after). Archwiki’s xorg.conf article is useless, but they have a real template on their multihead page (multihead = multi-monitor). Their extreme multihead page is also helpful, but it’s not necessary to split your config into multiple files. Both are overkill for a single-monitor setup, but all the information you need is in there.
So…yeah, definitely use the Nvidia control panel if it’s an option.
I did a 10-video.conf according to a fairly popular youtube channel. The problem is, while it looks like I did everything correctly, he didn’t exactly explain how any other setup aside from his own would be configured. It didn’t throw any errors, but it also didn’t work. Luckily the nvidia panel works.