No vga/vgaswitcheroo in /sys/kernel/debug (Ubuntu 13.10)
Solution 1
I found this
There are two versions of hybrd graphics: MUXed and MUX-less. MUXed have a
display MUX to switch the displays between the discrete and integrated cards.
MUXed systems can be switched using vgaswitcheroo. MUX-less do not have a
display MUX and the displays are only connected to the integrated card. On
MUX-less systems, the discrete card is solely for rendering, not display. X
Server 1.14 is required to support rendering and display from different cards.
Most new laptops (2011+) are MUX-less.
So I think it's highly likely that my system (being a very recent laptop) is MUX-less
(i.e. only the Intel card is actually connected to the display), and although I can "switch" through the AMD Catalyst Control Centre
(should I be brave/foolish enough to install fglrx
) this really just amounts to: "High performance" -> outsource hard graphics calculations to dGPU then reroute them back through the iGPU for display, "Low performance/good battery" -> do calcs on iGPU, then send directly to display. I also have no ability to switch GPUs in the BIOS, which also suggests MUX-less
.
Thus, I probably will never be able to use VGA switcheroo.
One other consideration is that the radeon
driver does not officially support my card yet (the 8670M code name Mars XT solar system series, not to be confused with OLAND). Thus when I boot up with open source drivers I get messages like No screens found
for the radeon. Given that switcheroo
needs radeon and intel both to there, it could be somehow failing because the radeon driver doesn't support my card.
If this is true, it leads to the question of how does one switch between ATI/Intel cards (without fglrx
) in a MUX-less
system.
Solution 2
According to this
MUXLESS SYSTEMS
First thing you need to do is turn on your discrete GPU if it's not turned on already:
# echo ON > /sys/kernel/debug/vgaswitcheroo/switch
Verify that this worked by issuing this command again:
# cat /sys/kernel/debug/vgaswitcheroo/switch
Now, we have to know IDs that xrandr assigned to your cards. Do this as the regular user again, not root:
$ xrandr --listproviders
Providers: number : 3
Provider 0: id: 108 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 3 outputs: 4 associated providers: 2 name:Intel
Provider 1: id: 69 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 0 associated providers: 2 name:radeon
Provider 2: id: 69 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 0 associated providers: 2 name:radeon
In my case 3 cards get listed. Notice that both provides 1 and 2 have the same id. In this case my discrete card has id 69 and my integrated card has id 108.
Last thing we need it to tell X to use your discrete GPU for rendering:
$ xrandr --setprovideroffloadsink 69 108
Where the first number is your discrete card and the second one is your integrated card. To verify this worked:
$ DRI_PRIME=1 glxinfo | grep renderer
OpenGL renderer string: Gallium 0.4 on AMD TURKS
You should get Gallium 0.4 as your renderer. From now on all your 3D apps will be rendered on your ATI card, no need to restart X.
Worked in my lenovo u400 with kubuntu 13.10.
Related videos on Youtube
fpghost
Updated on September 18, 2022Comments
-
fpghost over 1 year
I am aware of some of the other threads on this problem, but I have tried the options found in those without success:
sudo su cat /sys/kernel/debug/vgaswitcheroo/switch
gives
cat: /sys/kernel/debug/vgaswitcheroo/switch: No such file or directory
Could it be because my
xorg.conf
is only setting up the intel device?The
/sys/kernel/debug
appears to be mounted, and I don't have any quirky boot options:cat /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-3.11.0-15-generic.efi.signed root=UUID=8a15962e- ad4d-4eb0-96af-37d167313e92 ro quiet splash vt.handoff=7
For modeset I have:
cat /sys/module/i915/parameters/modeset -1
Not quite sure if that is a problem or not? But I've also tried booting with the
i915.modeset=1 radeon.modeset=1
options, and verified the modeset is indeed 1. I also checkedmount | grep /sys/kernel/debug
showednone on /sys/kernel/debug type debugfs (rw)
so this is mounted correctly.
lshw -C display
shows:*-display description: VGA compatible controller product: Haswell-ULT Integrated Graphics Controller vendor: Intel Corporation physical id: 2 bus info: pci@0000:00:02.0 version: 09 width: 64 bits clock: 33MHz capabilities: msi pm vga_controller bus_master cap_list rom configuration: driver=i915 latency=0 resources: irq:60 memory:f0000000-f03fffff memory:e0000000-efffffff ioport:5000(size=64) *-display description: Display controller product: Sun XT [Radeon HD 8670A/8670M/8690M] vendor: Advanced Micro Devices, Inc. [AMD/ATI] physical id: 0 bus info: pci@0000:06:00.0 version: 00 width: 64 bits clock: 33MHz capabilities: pm pciexpress msi bus_master cap_list rom configuration: driver=radeon latency=0 resources: irq:65 memory:d0000000-dfffffff memory:f0400000-f043ffff ioport:3000(size=256) memory:f0440000-f045ffff
My kernel seems to be compiled with the proper options:
grep -i switcheroo /boot/config-* /boot/config-3.11.0-12-generic:CONFIG_VGA_SWITCHEROO=y /boot/config-3.11.0-15-generic:CONFIG_VGA_SWITCHEROO=y
So why would
vgaswitcheroo
be missing?-
evergreen over 9 yearsMe too, cat: /sys/kernel/debug/vgaswitcheroo/switch: No such file or directory. Vostro 3450, hybrid Intel HD 3000/ ATI radeon HD 6600M and 6700M serries.
-
-
fpghost about 10 yearsI've read that guide too. As mentioned in the original post,
/sys/kernel/debug/vgaswitcheroo/switch
simply does not exist. There is no way to echo ON/OFF into it. -
Pablo R about 10 yearsI am sorry, I focused on the second post as I was too trying to make a muxless card to work. In my case vgaswitcheroo was there, just had to remove fglrx and have xserver-xorg-video-intel package installed.
-
evergreen almost 9 yearsPablo R: my out put is: GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, OpenGL renderer string: Gallium 0.4 on AMD TURKS. Will it be rendered on my ATI card then?
-
Pablo R almost 9 yearsYes, the ATI card should be working.