How to change resolution before logging in?

I’ve struggled a lot with messing with the conf files in /usr/share/X11/xorg.conf.d/ quite a bit, but one change I’d very much like to make to my system is changing my monitors pre-login, since my monitors show in 1920x1080, 640x350, 640x350 with the last one seeming to be primary at the time. How do I set my monitor’s display in a conf file? I assume I need to use modeline, but last time I attempted that I lost a graphical display. Here’s my system info from inxi --admin --verbosity=7 --filter --no-host --width:

Graphics:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics
    vendor: Micro-Star MSI driver: i915 v: kernel ports: active: none
    empty: DP-1, HDMI-A-1, HDMI-A-2, HDMI-A-3, VGA-1 bus-ID: 00:02.0
    chip-ID: 8086:0412 class-ID: 0380
  Device-2: NVIDIA GP104 [GeForce GTX 1070 Ti] vendor: Micro-Star MSI
    driver: nvidia v: 510.68.02 alternate: nouveau,nvidia_drm non-free: 515.xx+
    status: current (as of 2022-05) arch: Pascal pcie: gen: 3 speed: 8 GT/s
    lanes: 16 bus-ID: 01:00.0 chip-ID: 10de:1b82 class-ID: 0300
  Display: x11 server: X.Org v: 21.1.3 compositor: kwin_x11 driver: X:
    loaded: nvidia gpu: i915,nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3968x1080 s-dpi: 91 s-size: 1105x301mm (43.50x11.85")
    s-diag: 1145mm (45.09")
  Monitor-1: DP-4 pos: primary,top-left res: 1920x1080 hz: 60 dpi: 93
    size: 527x296mm (20.75x11.65") diag: 604mm (23.8") modes: N/A
  Monitor-2: DVI-D-0 pos: bottom-r res: 1024x768 hz: 75 dpi: 87
    size: 300x230mm (11.81x9.06") diag: 378mm (14.88") modes: N/A
  Monitor-3: HDMI-0 pos: bottom-c res: 1024x768 hz: 75 dpi: 87
    size: 300x230mm (11.81x9.06") diag: 378mm (14.88") modes: N/A
  OpenGL: renderer: NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2
    v: 4.6.0 NVIDIA 510.68.02 direct render: Yes

And here’s xrandr:

DVI-D-0 connected 1024x768+2944+156 (normal left inverted right x axis y axis) 300mm x 230mm
   640x350       70.10 +
   1920x1080     59.94  
   1280x720      59.94  
   1024x768      75.03*   70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x480       59.94    59.94  
   640x480       75.00    72.81    59.94  
HDMI-0 connected 1024x768+1920+156 (normal left inverted right x axis y axis) 300mm x 230mm
   640x350       70.10 +
   1920x1080     59.94  
   1280x720      59.94  
   1024x768      75.03*   70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x480       59.94    59.94  
   640x480       75.00    72.81    59.94
DP-4 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
   1920x1080     60.00*+  59.94    50.00  
   1680x1050     59.95  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    59.94    59.93

im not sure what exactly do you want to do… also you didnt mentioned what desktop are you using and what is the display manager …

Ah, my apologies. My goal is to have my resolution changed before my login. As of this moment, my login screen is always the resolution of a fresh Manjaro install. I believe xrandr/xorg things can fix it, but I don’t understand enough of it to solve this. If I understand correctly, I need to make a file called 10-monitors.conf? My system info:
OS: Manjaro Linux x86_64
Kernel: 5.15.38-1-MANJARO
DE: Plasma 5.24.5
CPU: Intel i7-4790K (8) @ 4.400GHz
GPU: NVIDIA GeForce GTX 1070 Ti
GPU: Intel HD Graphics
Display Manager? It’s X11, if that is a display manager.

i still dont understand what you mean …what is your current resolution and to what do you want to change it
provide output from:
inxi -xxS

System:
  Host: NaginiBox Kernel: 5.15.38-1-MANJARO arch: x86_64 bits: 64
    compiler: gcc v: 11.2.0 Desktop: KDE Plasma v: 5.24.5 tk: Qt v: 5.15.3
    wm: kwin_x11 dm: SDDM Distro: Manjaro Linux base: Arch Linux

When I’m on my desktop, my resolution is 1920x1080 (primary), 1024x768, 1024x768. When I boot my computer, and hit my login screen, my resolution is 1920x1080, 640x350, 640x350 (primary?). It is gross.

so your login screen resolution is different then your resolution after you log in?

Correct

so your resolution gets normal after you enter your password?

Yes. I don’t like the look of my displays when I am at my login, so I wish to change it

Research has brought me to the point where I believe this is close to the solution, but I still don’t quite understand. Modeline is full of numbers I don’t understand the purpose of. Here’s a 10-monitors.conf I quickly made, with editorial question marks. I don’t know how to use Modeline without destroying my Graphical Interface. I don’t know if PreferredMode modes what I need. I also do not know if I can just place this in /usr/share/X11/xorg.conf.d/ or if Manjaro uses a different file for conf

Section "Monitor"
    Identifier  "DP-4"
    Option      "Primary" "true"
EndSection

Section "Monitor"
    Identifier  "HDMI-0"
    Modeline    "1024x768" ? ? ? ?
    Option      "PreferredMode?" "1024x768"
    Option      "RightOf" "DP-4"
EndSection

Section "Monitor"
    Identifier  "DVI-D-0"
    Modeline    "1024x768" ? ? ? ?
    Option      "PreferredMode?" "1024x768"
    Option      "RightOf" "HDMI-0"
EndSection

ok i dont know how to set it up, i thouth you wanted to do something else… and do you need to have the login at startup, i have it disabled…

I suppose doing that would be an easy and surefire fix. It’s a bit of a basic security risk, but I’ll consider it

you could try this:
go to /etc/mkinitcpio.conf and edit the modules section to look like this:
MODULES=(i915)
if there are already some modules ad the i915 to them, dont remove any of them
then run this:
sudo mkinitcpio -P
reboot and check if you have normal resolution

That does not appear to have solved it. Should I change it back?

yes, change it back, i thought early loading of the graphic driver might help…

It is purely calculated. You do it like this:

cvt 1024 768

Then just copy&paste it. However this normally not needed if xorg detects the correct modline itself.

What do you mean by that? Just put it in the Modeline part, like this:

Section "Monitor"
    Identifier  "DP-4"
    Option      "Primary" "true"
EndSection

Section "Monitor"
    Identifier  "HDMI-0"
    Modeline    "1024x768" cvt 1024 768
    Option      "PreferredMode" "1024x768"
    Option      "RightOf" "DP-4"
EndSection

Section "Monitor"
    Identifier  "DVI-D-0"
    Modeline    "1024x768" cvt 1024 768
    Option      "PreferredMode" "1024x768"
    Option      "RightOf" "HDMI-0"
EndSection

Also, if I just put the file 10-monitors.conf into /usr/share/X11/xorg.conf.d and reboot it should configure my monitors pre-login, right?

      ModeLine  "name" mode-description
              This  entry  is  a more compact version of the Mode entry, and it also can be used to specify video modes for the monitor.  This is a
              single line format for specifying video modes.  In most cases this isn't necessary because the built-in set of  VESA  standard  modes
              will be sufficient.
man xorg.conf

cvt is command on the terminal which prints the modeline. Alsoupper and lowercase is important, so it ModeLine and not Modeline

yes

Thanks for the help! So, as a final check, this won’t cause me any problem, right?

Section "Monitor"
    Identifier  "DP-4"
    Option      "Primary" "true"
EndSection

Section "Monitor"
    Identifier  "HDMI-0"
    ModeLine    "1024x768" cvt 1024 768
    Option      "PreferredMode" "1024x768"
    Option      "RightOf" "DP-4"
EndSection

Section "Monitor"
    Identifier  "DVI-D-0"
    ModeLine    "1024x768" cvt 1024 768
    Option      "PreferredMode" "1024x768"
    Option      "RightOf" "HDMI-0"
EndSection

:arrow_down:

and should not be used in the config.

Example:

$ cvt 1024 786
# 1024x786 59.95 Hz (CVT) hsync: 48.92 kHz; pclk: 65.75 MHz
Modeline "1024x786_60.00"   65.75  1024 1080 1184 1344  786 789 799 816 -hsync +vsync