Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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
echo OFF | sudo tee /sys/kernel/debug/vgaswitcheroo/switch

In one of the questions in this forum, someone had posted this command to switch off graphics card to save power consumption and this worked like a charm almost reducing my battery consumption to less than half of what it consumed before.

The contents of sys/kernel/debug/vgawitcheroo/switch file are

1:DIS: :Off:0000:01:00.0

I want to know what this command actually does, the significance of vgaswitcheroo/switch file and what is the piping that is happening in the command. Can someone please explain this to me?

share|improve this question
up vote 4 down vote accepted

The command echo OFF | sudo tee /sys/kernel/debug/vgaswitcheroo/switch writes OFF to the special "file" /sys/kernel/debug/vgaswitcheroo/switch. For details on the difference with echo OFF > /sys/kernel/debug/vgaswitcheroo/switch, see sudo & redirect output

Entries in /sys are special. Those are not real files but an exported interface from the kernel space. In this case, vgaswitcheroo is an interface to the switcheroo code that can be used for toggling the power on hybrid graphics systems. More details on this can be found in the Ubuntu help pages:

If you are interested, the source code where this interface is exported is at

share|improve this answer

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.