Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Hi I'm trying to change my integrated graphics card to my discrete graphics card (Nvidia GeForce 540m) and when I use the vgaswitcheroo method, I can't access the file doing this:

$ls -l /sys/kernel/debug/vgaswitcheroo/switch
ls: cannot access /sys/kernel/debug/vgaswitcheroo/switch: Permission denied

This is the link to the guide on using vgaswitcheroo I'm using: https://help.ubuntu.com/community/HybridGraphics

I'll be using Nvidia Unix Drivers because I'll be playing with the graphics card.

Any help? Thanks.

Ps. I'm new at Ubuntu, any help would be appreciated.

share|improve this question
add comment

2 Answers

You probably need to be root to do this. To become root, simply start the line with sudo:

sudo ls -l /sys/kernel/debug/vgaswitcheroo/switch

And enter your account password when asked.

share|improve this answer
    
It worked but then when using echo ON > /sys/kernel/debug/vgaswitcheroo/switch it says permission denied again. I tried puting sudo at the beginning of that but didn't work. Thanks! –  Juan Oct 11 '12 at 19:26
    
If you want to run more than one commands using sudo, just do sudo -s then press enter and enter your password. You now have root permissions and can run your commands. (when doing sudo echo ON > /... the elevated permissions only apply to the echo not the > operator) –  Ugo Oct 12 '12 at 5:57
    
I'm able to do ls -l /sys/kernel/debug/vgaswitcheroo/switch with the sudo -s and I can do the rest but doesn't really change anything at all, I click enter and they do nothing, just opens a new empty line to write, nothing changes... Any ideas on why? Is it possible that I have all the files up to /debug but then vgaswitcheroo simply doesn't exist or something? Thanks! –  Juan Oct 12 '12 at 13:13
    
You should probably open a new thread with this question: the first question (permission problem) seems to be fixed now. I don't know the answer of your last question, so you may have more luck in starting a new specific thread. Cheers, –  Ugo Oct 13 '12 at 6:43
    
Thanks! Will do. –  Juan Oct 14 '12 at 15:37
add comment

I know this is late but I just stumbled across this problem, and thought posting the solution up for future readers is the best thing to do.

The above answer by Ugo is correct but you literally need to be root, not some user with root privileges.

So the simple answer is type:

sudo su

and you should see the terminal switch from displaying user_name@machine_name to root@machine_name.

Now all vgaswitcheroo related edits should work.

share|improve this answer
add comment

Your Answer

 
discard

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.