2

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.

2 Answers 2

8

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.

0

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.

4
  • 1
    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, 2012 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, 2012 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, 2012 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, 2012 at 6:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .