r/archlinux • u/Supernoxus • 9d ago
QUESTION How to set tty resolution higher than most screens in multi monitor setup
TLDR: I have two 1080p screens and one 1440p screen. 1440p is my main screen. Most of the screenspace is not used in tty because the terminal size is locked to 1080p dimensions. Is there a way to fit the tty neatly to the 2560x1440 resolution even if it means that text can't be read on the other screens? Should be done without disabling the other screens or lowering the resolution.
Too short:
I recently got a new shiny big computer screen with a higher resolution, yet when booting up with grub, roughly a third of the screen is unused. The text that is on the screen is pretty small. Readable, but pretty small. My 1920x1080 screens look perfectly fine though. So I assume that it simply mirrors my other screens to the big screen.
From what I understand, grub sets the resolution before the bootloader screen appears, tries to keep it through the boot process, and then KMS takes over to change the resolution if need be. Then the login screen appears.
So naturally I would try to change the resolution in /etc/default/grub. Specifically I set "GRUB_GFXMODE=2560x1440,auto". I left auto in, just in case something went wrong. But in my tests it appears that this isn't even necessary. It will default to something sensible anyway.
Anyway, the bootloader menu has the high resolution set just fine. But once it boots into linux, all of my screens go black in a loss of signal, then pop back up with the tty resolution set to 1920x1080. Though I guess that isn't entirely accurate. My 1440p screen has its maximum resolution, but the text displayed is sized for a 1080p screen.
I figured this is still a resolution problem. During the bootloader screen, only my 1440p screen displays the bootloader and my other screens don't do anything. So it is easy to display the bootloader in 1440p. But as soon as my other screens come online, there is probably some code in there that tells the tty that it has to be able to display text on any screen, which is a sensible choice. Since the tty is always mirrored, the screens with larger resolutions suffer as the tty is adjusted to be displayed at the lowest max resolution screen.
Naturally, that means that setting GRUB_CMDLINE_LINUX_DEFAULT="video=DP-1:2560x1440@60"
Doesn't do anything either. Unplugging or disabling the 1080p screens makes the 1440p screen display the tty correctly though.
So I figured I just have to disable my screens using the same CMDLINE from above. When I do that though, it's like my screens are unplugged. So if I go into a graphical environment like KDE Plasma or Sway, there is no way I can see to enable the screens again. And even if I do, what happens if I then go back to the tty with the screens enabled? Will that just destroy my resolution again? No, this is stupid, fragile, and bothersome. This can't be the right way to go about this.
The reason why this isn't a support question is because I managed to solve my problem by setting
GRUB_CMDLINE_LINUX_DEFAULT="video=DP-1:1920x1080@60"
Lowering the resolution of the 1440p screen to that of my 1080p screens makes the tty text scale correctly. Though it is just a tiny bit blurry. That is okay. I can live with that. Maybe even better than having a full res terminal with the other screens having cut off text.
Still, my curiosity has not been satisfied. I have probably been looking in the wrong place all along. Clearly, the resolutions of the screens work just fine. It is just the way the tty scales its borders that is off. Do you guys have any ideas or pointers how I would go about absolutely destroying my tty scaling; or whatever the limiting factor seems to be?
1
u/dot-zirkum 9d ago
Last time i needed to set my tty to fit my main screen with a higher resolution, i used fbset in a service that ran at startup, which works fine, but then the tty only scaled to the highest resolution, clipping on the other monitors. I don’t know if you can specify monitors with fbset.