2

I have enable switcheroo in kernel config . Why is there not /sys/kernel/debug/vgaswitcheroo/switch ?

Linux ubuntu-raid-w500 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:07:17 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

My computer is Thinkpad W500 . One graphic card is ATI Mobility FireGL V5700 (512 MB). The other one is Intel Graphics Media Accelerator 4500MHD .

I am using official kernel 2.6.38-10, I do NOT customize it. I add kernel option pcie_aspm=force in GRUB_CMDLINE_LINUX_DEFAULT of /etc/default/grub

3 Answers 3

4

In Ubuntu 10.10 and up, vgaswitchheroo is already enabled so you don't need extra settings. And /sys/kernel/debug is already mounted, however you need root permissions to read the contents of /sys/kernel/debug, so using sudo su should work.

If there's still no switch, run lspci | grep VGA and make sure both cards are outputted. If one is missing a BIOS setting might be the cause, so check that.

Console example:

sergio@Sergio-L:~$ ls /sys/kernel/debug/vgaswitcheroo
ls: impossível aceder a /sys/kernel/debug/vgaswitcheroo: Permissão negada
sergio@Sergio-L:~$ sudo su
[sudo] password for sergio: 
root@Sergio-L:/home/sergio#
root@Sergio-L:/home/sergio# ls /sys/kernel/debug/vgaswitcheroo/
switch
root@Sergio-L:/home/sergio#
17
  • I have added modeset=1 kernel option . I still can not find /sys/kernel/debug/vgaswitcheroo/switch in 'su -' . Jul 14, 2011 at 13:57
  • 1
    @waterloo I'm no expert, from what I read vgaswitcheroo isn't being loaded on startup and you're using the Intel card but I couldn't find references to your ATI card so It's most likely powered off. I took a look the manuals and on your BIOS there should be these options: 'GraphicsDevice' and 'OsDetectionForSwitchableGraphics'. The former should be set to 'SwitchableGfx' and the later to 'Enable', are these set? Some more questions in case the BIOS doesn't solve it: Can you ls /sys/kernel/debug? Does lspci | grep VGA really output the 2 cards? Btw you have crashkernel set eating memory :P
    – sergio91pt
    Jul 15, 2011 at 19:51
  • 1
    @waterloo Yes, you can use echo "OFF" on the switch to turn off the idle card. On the Community Help theres a init script you can try, if you don't want to be doing echo "OFF" everytime you boot. So did the BIOS solve it? Then you can mark the question as solved.
    – sergio91pt
    Jul 16, 2011 at 9:04
  • 1
    How to mark this post as solved ? Thanks Jul 16, 2011 at 12:51
  • 1
    @waterloo There should be a grey button that turns into green when you hover it, at the left of my answer, its for marking the question that solved it.
    – sergio91pt
    Jul 16, 2011 at 14:44
1

If you are not using the open-source radeon driver (or the nouveau driver in case of nvidia hardware), there won't be a /sys/kernel/debug/vgaswitcheroo/switch file. (ignoring hacks like asus-switcheroo and byo-switcheroo). Disabling KMS ("modeset=0") turns off this functionality too.

Even if the file exist, it cannot be reliable used when proprietary drivers (fglrx, nvidia) are loaded thereafter. You may experience lockups when trying to write commands to it. For vga_switcheroo on NVIDIA hardware, see also How to enable vga switcheroo on an Asus U41S?. For NVIDIA Optimus hardware in general, see Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu?

4
  • I'm using the open-source radeon driver, but still there is no /sys/kernel/debug/vgaswitcheroo/switch.
    – user24668
    May 7, 2012 at 19:16
  • @gentmatt same thing for me, might it be that we are both on Macbooks? , according to the Ubuntu switcheroo faq, it doesn’t show up unless you add nomodeset or modeset=1 to your kernel cmd line. None of them help in my case. The first one seems to stop X from starting as well.
    – tomodachi
    Sep 5, 2012 at 15:29
  • @gentmatt check this out askubuntu.com/questions/184406/…
    – tomodachi
    Sep 5, 2012 at 15:56
  • @tomodachi Please excuse my late reply. I was offline for a while :) Yes, I have a MacBook (MBP 8,2). But I have stopped trying to get GPU switching to work in Ubuntu. The problem is apparently that Apple's BIOS legacy mode hides the internal GPU. For that reason, Bootcamp only uses the dGPU as well. Any attempt to get GPU switching to work in Ubuntu should first manage to EFI boot on a Mac. However, I've not got this to work on a Macbook Pro (black boot screen, and other issues).
    – user24668
    Sep 20, 2012 at 9:33
0

The answer in my case was buried above in a comment : there is a BIOS option on my HP laptop named "HybridGraphics" and it was set to "AUTO". This is seemingly not enough, and one has to set it to "ENABLE".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .