Home

Debian Jessie, Screen resolution, and VirtualBox Guest Additions

I decided to upgrade to Debian Jessie, to take advantage of the newer packages available, mainly the new GHC version. Initially I wanted to upgrade from my current Wheezy, but I faced problems with the screen resolution. I thought that had something to do with a bad upgrade, I did something wrong while upgrading, so I decided to do a fresh install. To my surprise, I met with the same issue.

For the record this is the system I’m running now:

$ uname -a
Linux debian-gsoc 3.13-1-amd64 #1 SMP Debian 3.13.10-1 (2014-04-15) x86_64 GNU/Linux

The problem

The issue was that the screen resolution was not right. Previously I managed to get 1920x1080, which is my native resolution. But after installing Jessie, I could only get 1240x768, that’s not good at all. xrandr -q says something like failed to get size of output default.

Steps to solving

I researched about it, and found many suggested solutions, most had to do with editing /etc/X11/xorg.conf. Those didn’t work for me at all, and I figure that was because I was running on VirtualBox. The magical search term was this

debian wheezy virtualbox resolution

which led me to this forum post.

The OP faced a problem with screen resolution on his guest os as well, and there are replies that mention an old VirtualBox Guest Additions. Apparently Debian Jessie ships with a version of Guest Additions, but it isn’t the lastest one.

My take away was to try to install Guest Additions, and see what happens. This post was extremely helpful. I ignored the part on lsmod and skipped straight to apt-get install build-essentials module-assistant. I then got stuck at running VBoxLinuxAdditions.run - I couldn’t mount the cdrom.

More problems

The simplest way to mount the cdrom onto your guest os is to go to the VirtualBox window, click on Devices > Insert Guest Additions CD Image, but somehow that didn’t work for me. Click that didn’t see to have any effect, my /media/cdrom was still empty. I decided to mount the cdrom manually.

Success!

I got most of the information from VirtualBox’s official manual. Basically it involved me going to the VirtualBox window, selecting Devices > CD/DVD Devices > Choose a virtual CD/DVD disk file... and then navigate to C:\Program Files\Oracle\VirtualBox. Substitute that for wherever you installed VirtualBox.

After that I manually mounted the cdrom, with help from nixcraft, and ran the file

# mount /dev/cdrom /media/cdrom
# /media/cdrom/VBoxLinuxAdditions.run

Wait a couple of minutes and rebooted, and now everything is fine! xrandr -q now gives me many more options, including 1920x1080, and I happily selected that using xrandr --output VBOX0 --mode 1920x1080.

The initial reason why I decided to virtualize was because of UEFI issues, and because virtualization has less problems. Today’s challenges has made me realize how it is difficult to pinpoint where the problem lies, because technology is so complex now. But still, a simple installation leading to so much convenience, I’ll definitely remember this lesson!