I can not find /sys/kernel/debug/vgaswitcheroo/switch

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

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

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:

[email protected]:~$ ls /sys/kernel/debug/vgaswitcheroo
ls: impossível aceder a /sys/kernel/debug/vgaswitcheroo: Permissão negada
[email protected]:~$ sudo su
[sudo] password for sergio: 
[email protected]:/home/sergio#
[email protected]:/home/sergio# ls /sys/kernel/debug/vgaswitcheroo/
[email protected]:/home/sergio#

Solution 2

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?

Solution 3

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”.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply