Changing tty resolution without reboot

displayresolutiontty

I'm on a linux machine without display manager.

I can only login to tty session as standard user. I'm not the administrator of the machine.

Reboot and use grub commands or kernel parameters is not really the best option, mainly because there could be other logged in users via ssh, or there could be running services.

The kernel mode setting is not enabled and the text looks bigger. I want to set a little better resolution without reboot. KMS is not enabled mainly because the radeon non-free firmware is not installed.

All I want is to change the tty resolution as a standard user for my tty session. I will be needing only vesa modes supported. I tried dpkg-reconfigure console-setup but the results are not good.

So, how do I change the runtime resolution from tty? There must be some way for this.

Best Answer

fbset allows you to change console resolution on the fly. However, it requires root permissions. You can use it like this:
fbset -xres 1920 -yres 900
Be aware that not all random modes are supported. It applies individually for each tty. When used in a VirtualBox virtual machine, its window automatically changes its size. But on my real hardware (native resolution was set by kms), after lowering resolution, image was sticked to upper left corner and changed "active" area keeping font size the same.
Midnight Commander (mc) is a good candidate for checking results: it takes all available space, so you can see which zone is currently "active".

Be careful when lowering resolution. For example, you are at 800x600, then you run fbset -xres 1280 (works fine, becomes 1280x600), then you run fbset -xres 1270 and it just screws your video. However, using fbset -xres 1270 when you are at 800x600 works fine).

Changing resolution worked when using a VirtualBox vm with efi firmware. But if you use it with legacy bios mode, you will get ioctl FBIOPUT_VSCREENINFO: invalid argument.

Related Question