Increase resolution for debian guest in virtualbox
I found a solution for that in the meanwhile.
There are two descriptions that show how this works:
1st: How to adjust the screen resolution in Debian?
2nd: http://forums.debian.net/viewtopic.php?f=16&t=78330#p429581
In short:
$ 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
$ xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
$ xrandr --addmode VBOX0 "1920x1080_60.00"
$ xrandr --output VBOX0 --mode 1920x1080_60.00
After execution these commands automatically the new resolution appears. Additionally these commands must be executed after each start of the operating system.
In the meantime I wrote a blog post about that topic: http://www.robert-franz.com/2015/06/28/adding-new-resolution-to-the-x-window-server/
A straightforward way of achieving that would be to change the specific configuration in the grub2 bootloader directly:
Find out the resolutions supported by your debian guest
- Reboot debian and keep pressing
c
until you see the grub console. - Press
vbeinfo
and hit enter. It will give you a list of supported resolutions.
- Reboot debian and keep pressing
Edit
/etc/grub.d/00_header
- Replace
auto
in the lineif [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=auto ; fi
with the new resolution. e.g.:if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=1920x1080 ; fi
- Right underneath, make a copy of the line edited and replace
MODE
withPAYLOAD
. e.g.:if [ "x${GRUB_GFXPAYLOAD}" = "x" ] ; then GRUB_GFXPAYLOAD=1920x1080 ; fi
- Further below, you'll find the following line:
set gfxmode=${GRUB_GFXMODE}
. Add the following line below it:set gfxpayload=${GRUB_GFXPAYLOAD}
- Replace
- Reload grub2 configurations by running the command
update-grub2
and rebooting afterwardsreboot
[Note]
I've seen many examples in which the default line #GRUB_GFXMODE=640x480
in the file /etc/defaul/grub
in uncommented. It was proven to be unnecessary for me but in case you need it, remember to update-grub2
after you've uncommented it.