failsafeX has hooks for QEMU, but not VirtualBox

Bug #319373 reported by Ryan Hamilton
2
Affects Status Importance Assigned to Milestone
xorg (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: xorg

I use Sun's VirtualBox to access my Ubuntu install on a second hard drive while still in WindowsXP (for a variety of reasons, but mostly because of games and the Media Center capability), but still want the ability to boot into Ubuntu directly when needed and not have to futz with a custom Xorg file each time I boot. Since VirtualBox does not support 3D acceleration for linux guests, the Nvidia card I have in this machine is not recognized when starting up and triggers a failsafeX session.

I looked at the failsafeX files in /etc/gdm, and looking at failsafeDexconf I noticed it has hooks for dealing with QEMU, so I made the following addition to allow failsafeX to pick up on VirtualBox running and change the video driver accordingly. Without changing the video driver, resolution is limited to 640x480 which is almost unusable these days.

Guest additions for VirtualBox need to be installed, but if the user follows the directions given by the VirtualBox folks it is not a problem.

Sorry but I didn't know where else to put this or send to! This is just my hack to get it working easily, I'm probably doing bad things with this below. But I wanted to post it regardless. Thanks,

Ryan Hamilton

Ubuntu 8.10
xorg:
  Installed: 1:7.4~5ubuntu3
  Candidate: 1:7.4~5ubuntu3
  Version table:
 *** 1:7.4~5ubuntu3 0
        500 http://us.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status

Using VirtualBox 2.1.0 from a WindowsXP host.

Main change in failsafeDexconf: Add this section underneath the QEMU check

VBOX_VIDEO=$(grep "vbox" /proc/modules || true)
if [ -n "$VBOX_VIDEO" ]; then
    DEVICE_DRIVER="vboxvideo"
fi

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 8.10
Package: xorg 1:7.4~5ubuntu3
ProcEnviron:
 PATH=/home/username/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:.:/home/username/isaac_pipeline/bin:/home/username/gasgano/bin:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersion: Linux version 2.6.27-9-generic (buildd@rothera) (gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11) ) #1 SMP Thu Nov 20 21:57:00 UTC 2008

SourcePackage: xorg
Uname: Linux 2.6.27-9-generic i686
xkbcomp:

Tags: apport-bug

Related branches

Revision history for this message
Ryan Hamilton (rthamilt) wrote :
description: updated
Bryce Harrington (bryce)
Changed in xorg:
status: New → Confirmed
Bryce Harrington (bryce)
Changed in xorg:
importance: Undecided → Medium
status: Confirmed → Triaged
Bryce Harrington (bryce)
Changed in xorg (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xorg - 1:7.4~5ubuntu16

---------------
xorg (1:7.4~5ubuntu16) jaunty; urgency=low

  [Tormod Volden]
  * apport/source_xorg.py: Use grep directly instead of shelling out, and
    look in /proc/modules as well. Also only set 'fglrx-installed' if
    there was a definite match.

  [Bryce Harrington]
  * x11-common.links: Add apport support for a several more packages.
  * local/Xsession.d/60x11-common_localhost:
    - Rename from 60x11-localhost for consistency (LP: #340807)
    - Redirect stderr in an sh-safe fashion
  * x11-common.postinst.in, x11-common.preinst.in, x11-common.postrm.in:
    - Remove renamed 60x11-localhost; handle upgrade failures gracefully
  * local/dexconf, local/Failsafe/failsafeDexconf:
    - Add hooks for Sun's virtualbox (LP: #319373)
  * local/Failsafe/failsafeXinit:
    - Use zenity for viewing logs, and vt2 for console login
      (LP: #310126)
    - Make translatable (LP: #335678)
  * apport/source_xorg.py: Suppress warning about keyboard geometry on :0
    (LP: #315777)

 -- Bryce Harrington <email address hidden> Wed, 18 Mar 2009 13:54:27 -0700

Changed in xorg:
status: Fix Committed → Fix Released
Revision history for this message
Ryan Hamilton (rthamilt) wrote :

Hi again,

  There's a typo in the latest patch that keeps this from it's intended result. In a vanilla 9.04 install, there is an extra space in the added line that causes the grep statement to fail and still default to vesa for the driver. On my system failsafeDexconf read:

VBOX_VIDEO-$(grep -e "^vbox " /proc/modules || true)

where it should read

VBOX_VIDEO-$(grep -e "^vbox" /proc/modules || true)

It'd also be useful to change the modes available as well, using the same that are already written in for QEMU. I've changed on my system the line

if [ -n "$QEMU_KVM" ]; then

to

if [ -n "$QEMU_KVM" ] || [ -n "$VBOX_VIDEO" ]; then

and added an additional "1280x1024" mode so I can use it full screen on my desktop.

Thanks for putting in the previous changes! This is my first contribution to Ubuntu, and it was cool to see it changed so quickly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.