For a few years I have been looking for a consistent and persistent method to change the screen resolution for the GNOME greeter and GNOME desktop session, that is easy, should be somewhat version independent, at least going forward (maybe). The odd thing is that what works for say a virtual machine did not work on actual hardware. This was frustrating. In short, the specific hardware I was using seemed to refuse to honor grub resolution control, not keeping the payload (of grub) but in a virtual machine just worked! This clearly was a quirk with the video driver, in the virtual machine versus hardware. So my search continued, to find a way to keep the login screen resolution and the desktop session screen resolution consistent. Below is what appears to work on everything I have tested thus far, VMs, Raspberry Pi devices (running GNOME of course), a few PCs, etc.
In short, create a script that leverages cvt and xrandr, such as the one below. Note this script must use the correct display name, see cvt and xrandr documentation for details. In my case, for example, my (old) PC, has an ATI RAEDON 4290 (RS800 series) video adapter, oh, and I disabled XWayland, see the GNOME documentation for disable of XWayland.
Using cvt...
# cvt 1920 1080 60
# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
Using xrandr to display the monitor names
# xrandr
Now for the script that leverages xrandr...
Code: Select all
#!/bin/bash
#
#
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode VGA-0 1920x1080_60.00
xrandr --output VGA-0 --mode 1920x1080_60.00
Code: Select all
# nano /usr/share/gdm/greeter/autostart/set-resolution.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=False
Exec=/usr/local/bin/set-resolution.sh
Name=Set Greeter Resolution
Comment=Set Greeter Resolution
#Icon=
Code: Select all
# nano /etc/xdg/autostart/set-resolution.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=False
Exec=/usr/local/bin/set-resolution.sh
Name=Set Greeter Resolution
Comment=Set Greeter Resolution
#Icon=
There is one slight quirk to this method, the screen resolution changes between login completion and session creation, but since the screen is black the entire time, the only clue this is happening is that the cursor arrow changes size. I can live with this to be sure. The faster your system is the less noticeable this will be of course. On my older slower system, it appears for about 1 second or a bit more, if you are not looking for it, may even miss it.
To test, just exit the GNOME desktop session, and the login greeter should present at the desired resolution. Let me know if this works or not based on your experience, for me it works on Debian 11 using the default GNOME setup. Getting to this point, is again, thanks to the many that have helped me over the years!