0

In order to port an embedded project from an ARM target to Linux/x86, I have to create a Debian VM (I'm using Virtualbox right now) which starts in framebuffer mode with 640x480 resolution.

I used the systemctl set-default multi-user.target command to make the VM start on framebuffer, but it seems it cannot go below 800x600 resolution. All tutorials and guide I can find are related to starting the guest VM at high resolution modes, while I cannot find anything tackling with my issue.

I followed the suggestions found at https://forums.virtualbox.org/viewtopic.php?f=29&t=83189

edit /etc/default/grub 
Uncomment: #GRUB_GFXMODE=640x480 
Modify it to required resolution: GRUB_GFXMODE=1024x768 
Add the following: GRUB_GFXPAYLOAD_LINUX=keep 
Save, exit, and run update-grub 
Edit "/etc/modprobe.d/fbdev-blacklist.conf" and add vboxvideo Reboot

Using GRUB_GFXMODE=640x480 and creating the /etc/modprobe.d/fbdev-blacklist.conf file, but with no results - it keeps starting at 800x600

Can anyone help on this? I am currently using Debian 9, can move to another version in case of incompatibilities.

EDIT: as requested, here is the output of #cat /proc/cmdline:

BOOT_IMAGE=/boot/vmlinuz-4.9.0-11-amd64 root=UUID=5bb1ded6-45a6-4d13-93d8-5f593e66e609 ro quiet

8
  • can you post the output of /proc/cmdline - this will tell us what parameters are passed to the kernel to see what, if any, video modes are set. Mar 17, 2020 at 9:41
  • I updated the original post, thanks for any insight Mar 17, 2020 at 10:27
  • In /etc/default/grub. set GRUB_CMDLINE_LINUX option to include "vga=ask" and the update grub. At boot time this will prompt for which resolution to choose. See if that fixes it and then change to the vga=ask option to be something more permanent. Mar 17, 2020 at 11:43
  • I get a "legacy parameter ask no more supported", and then the system hangs when trying to load the ramdisk. It looks like grub2 no longer allows to pass that parameter to linux. Mar 17, 2020 at 13:21
  • Ok, at a grub prompt (press c at the grub menu), type vbeinfo to get a list of the supported video modes and then see if 640x480 is there and set it directly in /etc/default/grub Mar 17, 2020 at 14:26

2 Answers 2

0

In case this can be of any help for other people, I was able to boot in VGA mode with the following change in /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"

instead of

GRUB_CMDLINE_LINUX_DEFAULT="quiet"

This enables all the startup messages and, for some reason, also keeps the console in VGA resolution. I found this bit of relevant advice at https://linuxconfig.org/how-to-increase-tty-console-resolution-on-ubuntu-18-04-server


As far as I can see, the VGA resolution can be set with either

GRUB_GFXMODE=640x480
GRUB_GFXPAYLOAD_LINUX=keep

or

GRUB_GFXMODE=""
GRUB_GFXPAYLOAD_LINUX=640x480
2
  • nomodeset kills lots of functionality of GPU's by disabling KMS. The GFXMODE stuff is good though
    – Wyatt Ward
    May 23, 2020 at 21:57
  • Not sure if there is any other way. I need to boot in VGA mode, without the "nomodeset" it starts in 800x600. May 26, 2020 at 16:50
-1

Add in /etc/default/grub

GRUB_GFXMODE=640x480
GRUB_GFXPAYLOAD_LINUX=keep

to boot in normal text mode, ‘keep’ to preserve the graphics mode set using gfxmode

source

5
  • According to the details in his question, he's already done that. Mar 16, 2020 at 15:54
  • the first part yes, but Marco veglio did not mention my 2. part.
    – nobody
    Mar 16, 2020 at 16:01
  • ??? Read the suggestions that he followed. Mar 16, 2020 at 16:03
  • Oh, where are my glasses. My fault.
    – nobody
    Mar 16, 2020 at 16:05
  • What drives me mad is that the VM actually tries to start in VGA resolution (the grub splash screen is in VGA, as well as the "loading ramdisk" message), but almost immediately it reverts to 800x600 Mar 16, 2020 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.