Thursday, March 11, 2010

Ubuntu 10.04 Lucid Lynx Alpha in VirtualBox with Guest Additions

Today I installed the latest alpha of Ubuntu 10.04 Lucid Lynx Alpha inside of VirtualBox.  After getting all of the updates I installed the VirtualBox Guest Additions.  Upon boot my screen flashed lots of fun colors and then told me that my display configuration was fubared.
I booted up in low graphics mode and then searched for the answer, which I'm going to repeat here.
After installing the guest additions you need to modify a file.

gksudo gedit /usr/src/vboxvideo-3.1.4/vboxvideo_drm.c

Replace line 90 with the following:


#if defined(DRM_UNLOCKED) || LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 33)
                 .unlocked_ioctl = drm_ioctl,
#else
                 .ioctl = drm_ioctl,
#endif


Finally, run the following command:
sudo /etc/init.d/vboxadd setup


So anyways, this got me as far as logging in without the graphics dying.  However, it looks like Compiz gets enabled and kills everything.  I'll update if I find a solution to this.


Source:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/536929
http://www.virtualbox.org/ticket/6198
http://www.virtualbox.org/changeset/27248

Edit: Bug 6198 is fixed as of VirtualBox 3.1.6. To get it for Ubuntu add the VirtualBox PPA found at http://www.virtualbox.org/wiki/Linux_Downloads and run sudo aptitude install virtualbox-3.1

15 comments:

  1. thanks, man. i have been scratching my head until i saw your solution. i don't use compiz so it is enough for me. the only change i made is the fact is that my kernel is only 2.6.32.

    now if i can find a way to get flash plugin in firefox3.6 work again.

    ReplyDelete
  2. THANK YOU!

    I also adjusted the line to use 2.6.32

    ReplyDelete
  3. rock on. worked a treat. your post is result #2 when googling virtualbox "ubuntu 10.04" so thanks for actually having an answer. I also tweaked for kernel 2, 6, 32.

    ReplyDelete
  4. That worked, but I'd forgotten I had compiz running so I now can't do anything \o/ Is there a way I can temporarily disable Compiz without uninstalling it?

    ReplyDelete
  5. @Luke Scamell:
    I had this same problem. The easiest way to keep Compiz from loading up is to disable support for 3D in your VM.
    to do that right-click on the VM and choose Settings. Under the Display section uncheck "Enable 3d Acceleration."

    ReplyDelete
  6. thanks! that did it!

    ReplyDelete
  7. Thanks - I just used this to fix my VM, great stuff!

    ReplyDelete
  8. the new 3.1.6 version fixed it so the workaround is no longer necessary.

    ReplyDelete
  9. Using the Guest Additions version 3.1.7 fixes the problems.

    ReplyDelete
  10. Nice post. However, I just installed the Ubuntu 10.04 last week and not very happy - when the system goes on standby, it finds it hard to resume.

    The error message is that it can not load the graphic, so it's running in low graphic. A search online has not provided any solution. I guess I will have to reinstall 8.04 instead.

    Helen Johnson

    ReplyDelete
  11. Thanks. This had me baffled - I couldn't figure out what to do.

    ReplyDelete
  12. Hola amigo, yo tenia el mismo problema, instale el virtualbox 3.1.8 y funciona muy bien. Saludos.

    ReplyDelete
  13. Thanks very much !!
    It works !
    I tried it on Ubuntu 10.04, 32 and 64 bit.

    ReplyDelete
  14. Nice post -
    I think with the latest Ubuntu 10.10, all the reported issues have been solved. Try it if you haven't already.

    Helen Deen

    ReplyDelete