Bug 104844 - XWindow may use the "wrong" video driver
Summary: XWindow may use the "wrong" video driver
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/DDX/Xorg (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
Depends on:
Reported: 2018-01-29 20:11 UTC by maurice.volaski
Modified: 2018-01-29 21:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

xorg log (4.16 KB, text/plain)
2018-01-29 20:28 UTC, maurice.volaski
no flags Details

Description maurice.volaski 2018-01-29 20:11:12 UTC
Under Funtoo/Gentoo Linux, it's possible to build XWindow with different video drivers. However, at least when running under either VMWare or VirtualBox, if one also builds in the Intel driver, XWindow will use this driver by default even if the computer has no Intel hardware. It would seem that XWindow should have at least some ability to detect the hardware and select the appropriate driver rather than selecting whichever one is "first" and failing fatally.
Comment 1 Alan Coopersmith 2018-01-29 20:21:12 UTC
Xorg should not use the Intel graphics driver unless an Intel graphics device
is found on the PCI bus.  Please provide the /var/log/Xorg.0.log file from a
machine on which this is happening so we can determine which driver it chose
and why.
Comment 2 maurice.volaski 2018-01-29 20:28:02 UTC
Created attachment 137032 [details]
xorg log
Comment 3 maurice.volaski 2018-01-29 20:33:29 UTC
Here is the output of lspci 

00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)

00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter

00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
00:04.0 System peripheral: InnoTek Systemberatung GmbH VirtualBox Guest Service
00:05.0 Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio Controller (rev 01)
00:06.0 USB controller: Apple Inc. KeyLargo/Intrepid USB
00:07.0 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:0b.0 USB controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller
00:0d.0 SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (rev 02)

As you can see 00:02.0 is VirtualBox video hardware.

What determines whether it picks Intel is the presence of 20-intel.conf in /usr/share/X11/xorg.conf.d. Remove that file and XWindow will correctly pick the VirtualBox hardware. Interestingly, there is no corresponding config file for it.
Comment 4 Alan Coopersmith 2018-01-29 21:28:20 UTC
If you've installed an xorg.conf snippet to force use of the Intel driver
and override the driver autodetection in Xorg, then this is a simple
configuration error - if you don't want to use the intel driver, don't
install a 20-intel.conf file that forces Xorg to use it.
Comment 5 maurice.volaski 2018-01-29 21:31:52 UTC
So you're saying that 20-intel.conf is not necessary for XWindow to detect whether there is an Intel video hardware? It sounds like Funtoo should not automatically install ANY video configuration files in /usr/share/X11/xorg.conf.d.
Comment 6 Alan Coopersmith 2018-01-29 21:39:25 UTC
Auto-detection of which driver to use based on devices on the PCI bus
has been builtin to the Xorg server without needing any configuration
files since it was created in 2004.

Configuration files are generally for overrides, not for auto-detection.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.