3
  • Running Ubuntu 18.04 sever on a physical machine or VirtualBox?
  • Do you need/want to use the full native resolution of your screen? Higher than 640x480 / 800x600?

Then you may be stuck as I've been, because the solution that used to work on 14.04 and 16.04 doesn't work on 18.04.

Problems to solve (goals)

  1. hwinfo --framebuffer gives an empty output -> find another solution
  2. adding the usual lines to /etc/default/grub, only helps at the first stage of the boot. After GRUB2 has done its work, the resolution switches back to a lower value -> resolve this too
  3. exclude xorg based tools like xrandr (this is a server without GUI by default)
  4. increase VT1-7 (Ctrl+Alt+F1, F2 - F7 ) resolution in case of Desktop systems with a GUI
  5. set the resolution to 1280x1024
slava
  • 3,887
linux64kb
  • 1,119

3 Answers3

3

1. Get supported video mode (use vbeinfo instead of hwinfo)

  • reboot
  • hold down SHIFT after the BIOS/UEFI finished
  • press `c´ for the GRUB command line
  • type set pager=1, then hit ENTER
  • type vbeinfo, then hit ENTER
  • take a note about the supported video mode you need Mode 0x031b: 1280x1024 (+3840), 24 bits
  • reboot

2. Modify / add the following lines to /etc/default/grub to match the ones below

>     GRUB_CMDLINE_LINUX_DEFAULT="video=0x0345 gfxpayload=true"
>     GRUB_CMDLINE_LINUX="video=0x0345 gfxpayload=true"
>     ...
>     # The resolution used on graphical terminal
>     # note that you can use only modes which your graphic card supports via VBE
>     # you can see them in real GRUB with the command `vbeinfo'
>     GRUB_GFXMODE=1280x1024x24
>     GRUB_GFXPAYLOAD=1280x1024x24
>     GRUB_GFXPAYLOAD_LINUX=1280x1024x24

3. Update GRUB

sudo update-grub

4. Reboot

sudo reboot

Note1: I've tested the above solution with Ubuntu 18.04 Server and Desktop on VirtualBox.

Note2: Didn't include linux terminal (emulator), putty, cygwin, conemu and other fancy tools, because this is about the bare console.


None of the sources I used had a complete solution, but putting the parts together, solved the problem for me.

Change Ubuntu Server 14.04 Screen Resolution

https://ubuntuforums.org/archive/index.php/t-1468789.html

Zakaria
  • 107
  • 4
linux64kb
  • 1,119
0

But sometimes you need the monitor natives text resolution so it scroll faster.

1. Get supported video mode (use vbeinfo instead of hwinfo)

  • reboot
  • hold down SHIFT after the BIOS/UEFI finished
  • press `c´ for the GRUB command line
  • type set pager=1, then hit ENTER
  • type vbeinfo, then hit ENTER
  • take a note about the supported video mode you need Mode 0x100: 640 x 400 x 8 (640) Paletted
  • reboot

2. Modify / add the following lines to /etc/default/grub to match the ones below

>     GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"
>     GRUB_CMDLINE_LINUX=""
>     ...
>     # The resolution used on graphical terminal
>     # note that you can use only modes which your graphic card supports via VBE
>     # you can see them in real GRUB with the command `vbeinfo'
>     GRUB_GFXMODE=640x400x8
>     GRUB_GFXPAYLOAD_LINUX=keep

3. Update GRUB

sudo update-grub

4. Reboot

sudo reboot
Zakaria
  • 107
  • 4
0

Struggling with this issue on DELL XPS13 ubuntu edition, I found out another way to make it work properly by changing the cmdline:

from

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=eDP-1:1920x1080"

you might need to change the value of eDP-1 as it's referring to the connector you want to modify. The active connector can be found in /sys/class/drm/CONNECTOR/status