hybrid-graphics-linux team mailing list archive
-
hybrid-graphics-linux team
-
Mailing list archive
-
Message #01214
Re: Asus Switcheroo vs acpi_call
On Sat, May 14, 2011 at 10:08 AM, Michael Reid <kid.meier@xxxxxxxxx> wrote:
>> asus swicheroo: it works, the power consumption goes from 24-25W to 17W.
>> Problems:
>> 1) it's needed to be the root user to echo to the
>> /sys/kernel/debug/vga-switcheroo/switch (sudo isn't sufficient). So how
>> to start this script automatically?
>
> I may be wrong here, but if you're doing this:
>
> $ sudo echo 1 > /sys/kernel/debug/vga-switcheroo/switch
>
> I've noticed similarly in the past that the echo command doesn't
> actually run as root. I think it has something to do with echo being a
> builtin. You could try either:
>
> $ sudo /bin/echo 1 > /sys/kernel/debug/vga-switcheroo/switch
I don't think this helps, the redirected output is the problem.
You're running echo as root, but the redirected standard output of
your shell still doesn't have permission to write to the file. The
way I usually do this is:
echo 1 | sudo tee /sys/kernel/debug/vga-switcheroo/switch
Of course you could just chmod 666 /sys/kernel/debug/vga-switcheroo/switch
Alex
References