[RFC PATCH v2] xfree86: add a -gpu switch to select primary gpu
Alex Deucher
alexdeucher at gmail.com
Fri Jun 21 11:30:40 PDT 2013
On Fri, Jun 21, 2013 at 12:54 PM, Alexander E. Patrakov
<patrakov at gmail.com> wrote:
> 2013/6/21 Maarten Lankhorst <maarten.lankhorst at canonical.com>:
>> Op 21-06-13 12:43, Alexander E. Patrakov schreef:
>>> 2013/6/21 Maarten Lankhorst <maarten.lankhorst at canonical.com>:
>>>> For the open source drivers there should be a different way to do so, try
>>>> running this before starting X:
>>>>
>>>> if [ -f /sys/kernel/debug/vgaswitcheroo/switch]; then
>>>> echo DIS > /sys/kernel/debug/vgaswitcheroo/switch
>>>> echo ON > /sys/kernel/debug/vgaswitcheroo/switch
>>>> fi
>>> According to https://help.ubuntu.com/community/HybridGraphics:
>>>
>>> echo DIS > /sys/kernel/debug/vgaswitcheroo/switch
>>> Connects discrete graphics with outputs.
>>>
>>> I assume this is for laptops that can dynamically switch their HDMI or
>>> other outputs from one card to another. However, this is completely
>>> different from what my Sony laptop provides. The cards and their
>>> outputs are physically separate. The Intel card is in the laptop, and
>>> can drive the internal panel, the VGA and the HDMI output. The Radeon
>>> card is in the dock station, is always on (there is no ATPX method in
>>> ACPI tables), works only from AC and has its own VGA and HDMI outputs,
>>> also located on the dock station. So this laptop, when docked, can
>>> drive five different displays, including the internal one. And I want
>>> to connect the TV to the HDMI output in the dock station because it is
>>> convenient (less cables attached to the side of the laptop itself).
>>>
>>> As I am physically away from this laptop, I cannot check whether
>>> vgaswitcheroo works (but assume it shouldn't).
>> Correct, but it should work on muxless too, switching will power off the intel, which is
>> why you have the second line.. It will re-enable the intel, but keep radeon as primary,
>> similar to what you are doing with -gpu 1.
>
> The problem is that I have CONFIG_VGA_SWITCHEROO=y in my kernel, but
> no /sys/kernel/debug/vgaswitcheroo. Let me rephrase the question:
> would you expect this directory to exist in a desktop system with two
> GPUs, one onboard and one installed by yourself into a PCIe slot, but
> with the BIOS always insisting that the onboard one is the primary
> VGA?
>
/sys/kernel/debug/vgaswitcheroo only exists on laptops that have
explicit platform controls (ACPI or other platofrm specific solution)
for enabling/disabling the discrete GPU and switching the display/ddc
muxes. You won't have vgaswitcheroo on systems with arbitrary user
added cards.
Alex
More information about the xorg-devel
mailing list