Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Fix the issues with vboxvideo on 10.x.
Browse files Browse the repository at this point in the history
By disabling AIGLX specifically, the vboxvideo driver works again. I have added
checks to our Xorg startup routine, which will probe if running in VirtualBox and copy
the necessary xorg.conf file to /etc/X11/xorg.conf
  • Loading branch information
Kris Moore committed Jan 9, 2014
1 parent da1c3b0 commit d0b124c
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 5 deletions.
52 changes: 47 additions & 5 deletions overlays/install-overlay/root/cardDetect/XF86Config.virtualbox
Original file line number Original file line Diff line number Diff line change
@@ -1,11 +1,53 @@
# Xorg.conf file generated for PC-BSD

Section "ServerLayout"
Identifier "XFree86 Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
Option "Clone" "off"
Option "AIGLX" "false"
EndSection

Section "Module"
Load "ddc"
Load "dbe"
Load "dri"
Load "dri2"
Load "extmod"
Load "glx"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
Option "XkbVariant" ""
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "vboxmouse"
EndSection

Section "Monitor" Section "Monitor"
Identifier "Monitor0" Identifier "Monitor0"
HorizSync 30 - 60 VendorName "Generic Monitor"
VertRefresh 50.0 - 100.0 ModelName "Generic"
Option "DPMS"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
EndSection EndSection


Section "Device" Section "Device"
Identifier "Card0" Identifier "Card0"
Driver "vesa" Driver "vboxvideo"
VendorName "InnoTek Systemberatung GmbG"
BoardName "VirtualBox Graphics Adapter"
BusID "PCI:0:2:0"
EndSection EndSection
53 changes: 53 additions & 0 deletions overlays/install-overlay/root/cardDetect/xorg.conf.virtualbox
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,53 @@
# Xorg.conf file generated for PC-BSD

Section "ServerLayout"
Identifier "XFree86 Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
Option "Clone" "off"
Option "AIGLX" "false"
EndSection

Section "Module"
Load "ddc"
Load "dbe"
Load "dri"
Load "dri2"
Load "extmod"
Load "glx"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
Option "XkbVariant" ""
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "vboxmouse"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Generic Monitor"
ModelName "Generic"

EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
EndSection

Section "Device"
Identifier "Card0"
Driver "vboxvideo"
VendorName "InnoTek Systemberatung GmbG"
BoardName "VirtualBox Graphics Adapter"
BusID "PCI:0:2:0"
EndSection
4 changes: 4 additions & 0 deletions overlays/install-overlay/root/functions.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ EndSection


start_xorg() start_xorg()
{ {
# First check if we are running as a VirtualBox guest
pciconf -lv | grep -q "VirtualBox"
if [ $? -eq 0 ] ; then cp /root/cardDetect/xorg.conf.virtualbox /etc/X11/xorg.conf; fi

# Run X Now # Run X Now
startx startx
if [ ! -e "/tmp/.xstarted" ] if [ ! -e "/tmp/.xstarted" ]
Expand Down
5 changes: 5 additions & 0 deletions src-qt4/pc-xgui/resources/bin/rundetect.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ do
AUTORES="NO" AUTORES="NO"


if [ "${ATTEMPT}" = "0" ] ; then if [ "${ATTEMPT}" = "0" ] ; then

# First check if we are running as a VirtualBox guest
pciconf -lv | grep -q "VirtualBox"
if [ $? -eq 0 ] ; then cp ${PROGDIR}/cardDetect/xorg.conf.virtualbox /etc/X11/xorg.conf; fi

# Check if we are supposed to run in vesa mode # Check if we are supposed to run in vesa mode
xvesa="NO" xvesa="NO"
v=`kenv xvesa` v=`kenv xvesa`
Expand Down
53 changes: 53 additions & 0 deletions src-qt4/pc-xgui/resources/cardDetect/xorg.conf.virtualbox
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,53 @@
# Xorg.conf file generated for PC-BSD

Section "ServerLayout"
Identifier "XFree86 Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
Option "Clone" "off"
Option "AIGLX" "false"
EndSection

Section "Module"
Load "ddc"
Load "dbe"
Load "dri"
Load "dri2"
Load "extmod"
Load "glx"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
Option "XkbVariant" ""
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "vboxmouse"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Generic Monitor"
ModelName "Generic"

EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
EndSection

Section "Device"
Identifier "Card0"
Driver "vboxvideo"
VendorName "InnoTek Systemberatung GmbG"
BoardName "VirtualBox Graphics Adapter"
BusID "PCI:0:2:0"
EndSection
1 change: 1 addition & 0 deletions src-qt4/port-files/pkg-plist
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ share/pcbsd/xorg-gui/cardDetect/XF86Config.compat
share/pcbsd/xorg-gui/cardDetect/XF86Config.default share/pcbsd/xorg-gui/cardDetect/XF86Config.default
share/pcbsd/xorg-gui/cardDetect/XF86Config.intel share/pcbsd/xorg-gui/cardDetect/XF86Config.intel
share/pcbsd/xorg-gui/cardDetect/XF86Config.vmware share/pcbsd/xorg-gui/cardDetect/XF86Config.vmware
share/pcbsd/xorg-gui/cardDetect/xorg.conf.virtualbox
share/pcbsd/xorg-gui/conf/xorg.conf.basic share/pcbsd/xorg-gui/conf/xorg.conf.basic
share/pcbsd/xorg-gui/conf/.fluxbox/init share/pcbsd/xorg-gui/conf/.fluxbox/init
share/pcbsd/xorg-gui/conf/.fluxbox/keys share/pcbsd/xorg-gui/conf/.fluxbox/keys
Expand Down

0 comments on commit d0b124c

Please sign in to comment.