Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A lot of time ago I've used a simple script in /etc/rc.local to disable discrete graphics during bootup. But now it's not allowed to do anything with /sys/kernel/debug/vgaswitcheroo/switch when you not logged in as root (I can use it only after "sudo su"), so the script can not do anything. Any ideas how to escalate privileges or simply how to make it work?

Thanx in advance.

share|improve this question
Ah, /etc/rc?.d/* scripts doesn't work this way too. – Oleg_Andreych Feb 9 '12 at 18:46
Possibly duplicate of – Lekensteyn Feb 9 '12 at 18:47

I'm using

chmod -R 705 /sys/kernel/debug

chown -R $YOURUSERNAME:$YOURUSERNAME /sys/kernel/debug/vgaswitcheroo

echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

in my rc.local and it works often for me (not always though).

share|improve this answer
seems to work randomly for me too, have you figured out why? – aloneguid Jun 20 '12 at 19:26
no, sadly I have not. Are you using an AMD ATI card? – onse Jun 21 '12 at 8:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.