Just worked this out for myself on my HP dv7t - ATI 5650 / Intel HD.
Make sure you have an entry in fstab for debugfs:
debugfs /sys/kernel/debug debugfs defaults 0 0
By default, my entry was ‘noauto’ - this means it is not mounted at startup. You can mount it manually or automatically by changing ‘noauto’ to ‘auto’ (or defaults which includes auto option)
# su -
# mount debugfs
# cat /sys/kernel/debug/vgaswitcheroo/switch
# echo DDIS/DIGD/OFF > /sys/kernel/debug/vgaswitcheroo/switch
First you need root permissions, the mount debugfs (if not auto). The third line will tell you which card is powered on. And 4th, DDIS to turn on discrete or dedicated (ATI, nvidia, etc), DIGD for integrated (intel), or OFF to power off whichever card is currently on. Logout after you enter the last command for changes to take effect!
There are scripts available to automate this process, but it involves a fair amount of work to get it set up. Commands are simple enough you can probably just use those. Hope this helps you.
I’m looking for help on vga_switcheroo too. My fstab looks exactly like yours (debugfs line), debugfs is mounted after system start but I don’t have vgaswitcheroo directory in /sys/kernel/debug.
My OS is openSUSE 11.3 x86_64, kernel 2.6.36-91-default from Kernel:HEAD. Notebook Asus N73J with NVIDIA GT 335M and Intel i5-520M.
vga_switcheroo requires that BOTH graphics modules are loaded. Run lsmod to see if both modules are loaded. In my case I need to have both the intel (i915) and radeon (radeon) modules loaded else vga_switcheroo won’t load.
When I start KDE and look into Information Center, in graphic controller section I see Intel Arrandale and ‘intel’ as 2D driver (no 3D driver available). Then lsmod | grep i915 shows few lines, lsmod | grep nv shows nothing, lsmod | grep nouveau shows nothing also. ‘vgaswitcheroo’ directory in /sys/kernel/debug isn’t present. Then I do modprobe nvidia and ‘nvidia’ module is loaded (lsmod shows it). I close and open KDE Information Center again and graphic controller is now NVIDIA GT 335M but 2D driver is ‘intel’ again. ‘vgaswitcheroo’ direcory in /sys/kernel/debug isn’t present. umount debugfs, mount debugfs - still not.
NVIDIA binary driver is installed from NVIDIA repository for openSUSE (260.19.12), kernel 2.6.34.7-0.5.1. NO_KMS_IN_INITRD=yes, no ‘nomodeset’ in kernel start line in GRUB.
I want use my notebook as PC replacement so I mostly don’t need Intel but want to use NVIDIA as primary graphic controller. What should I do more to enable ‘vga_switcheroo’?
I have the same problem. As this thread was dead for a year I hope that meanwhile the problem is fixed. Please help me.
I seriously recommend that you start a new thread on this, with a suitably descriptive title, to catch the attention of those who may be able to assist. You haven’t supplied any information concerning your laptop model and graphics chipsets either. That should be the first thing you mention, otherwise those that could help will be left guessing.
/sbin/lspci -nnk
Look for the output pertaining to your graphics chipsets. Cut and paste here (and don’t forget to post the output between CODE tags).
I’ve been playing around with this, also on a HP TM2, and it seems that the code to turn OFF the disconnected graphics card works fine without logging out and in (inferred from temperature monitors). Intel card is always taken as the default one, although adjusting the screen brightness doesn’t work with that driver, but never mind.
So it seems that running the above command to switch off the disconnected graphics card should be easy to do at login via a very simple script. The only problem is I don’t know how to run a script at startup as root, any advice?
Hmm, after playing around with this a bit more I found adding
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
to a script in /etc/init.d/ (the file ‘skeleton’ in this director is provided as an example startup script), and setting it to start at run level to 5 via YaST makes sure only the Intel card is used.
To make the brightness work adding
acpi_backlight=vendor
to the grub line seemed to do the trick. Only problem then is that turning the brightness too low switches the screen off entirely and permanently (until reboot)!
Hopefully this will help someone, or just me in the future if I have to reinstall!
To add to this topic my experience, i switched the ATI card OFF while booting the system, for that what i did is added the following to /etc/init.d/boot.local file:
modprobe radeon
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
Graphics: ATI HD and Intel HD on Sony Vaio VPCCA.
Now come to other scenario, switching is not working for me at least, i did every thing what i can test on my system, but nothing works. But as i don’t use heavy graphics, so intel is fine atm. The battery life increased from 2 hours to around 5 hours dramatically plus reduced the fan noise too.(also switching kwin off automatically while on battery power).
I did search for around 1 week on this gpu switching, just able to switch it off at boot at the mean time. I was about to wrote about this few days back, but did not find any specific latest thread on this(or can say lazy to write a detailed how-to).
Lets just hope, we can find our way around it.
Cant comment on screen brightness here, because it is working fine for me under 12.1 KDE 4.7.4. But keyboard backlight is also shaky for me…here.
@ian_bush
Thank you for the Tip about the screen brightness in grub! I had to hit Fn+F3 every time to increase(enable) brightness so the screen doesn’t start switched off.
I disable my integrated graphics card at bootup via vga_switcheroo but have to enable it before suspend and disable it after resume manually.
How can I automate this process. It is quite annoying and the fan goes into overdrive if I forget it till I reboot.
I disable my integrated graphics card at bootup via vga_switcheroo but have to enable it before suspend and disable it after resume manually.
How can I automate this process. It is quite annoying and the fan goes into overdrive if I forget it till I reboot.
You can create your own hook (suspend/resume script) to do this placed in the /etc/pm/sleep.d/ directory. It is described here.
Problem:
I want to disable my discrete graphics card to save power. Sadly suspend and hibernate break the powersaving and I had to manually enable and disable it again which took about 30 seconds because something takes its sweet time to disable it again.
Initial disabling the ati card at boot time as described by mmarif4u:
in file: /etc/init.d/boot.local
modprobe radeon
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
Solution:
Automatically enable ATI card on suspend and disable after resume.
I created the file /etc/pm/sleep.d/66ati_suspend_resume
#!/bin/bash
case $1 in
hibernate)
echo ON > /sys/kernel/debug/vgaswitcheroo/switch
;;
suspend)
echo ON > /sys/kernel/debug/vgaswitcheroo/switch
;;
thaw)
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
;;
resume)
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
;;
*) echo "somebody is calling ati_suspend_resume totally wrong."
;;
esac