I would like to run the following command after every boot (or login).
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
It turns off my discrete GPU. To what script should I add this command. I would appreciate any help.
I would like to run the following command after every boot (or login).
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
It turns off my discrete GPU. To what script should I add this command. I would appreciate any help.
Instead of running a script you could install the package sysfsutils and add the line
kernel/debug/vgaswitcheroo/switch=OFF
to the file /etc/sysfs.conf
You need root privileges to run that command, so you can add it to /etc/rc.local (but before the exit 0 line) to have it run at the end of the boot process.
Otherwise you can add it to /etc/gdm/PostLogin/Default to have it run after any graphical login (when using GNOME GDM, default for Ubuntu before 11.10). If the file does not exist, just rename /etc/gdm/PostLogin/Default.sample and edit it.
/sys/kernel/debug filesystem is mounted...
– Riccardo Murri
Oct 16 '11 at 17:23