← Back to team overview

hybrid-graphics-linux team mailing list archive

Re: Asus Switcheroo vs acpi_call

 

I usually do this:

sudo bash -c "echo 1 > /sys/kernel/debug/vga-switcheroo/switch" 

The problem is that the redirection is happening in your current as user
you.

On Sat, 2011-05-14 at 12:08 -0400, Michael Reid 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
> 
> or putting the echo into a script and then calling the script w/ sudo.
> 
> Unfortunately I don't have anything to offer on the other issues you
> mention.
> 




Follow ups

References