← Back to team overview

hybrid-graphics-linux team mailing list archive

Re: Asus Switcheroo vs acpi_call

 

Hi,

Why do you not use :

chown $USER /sys/kernel/debug/vgaswitcheroo/switch

echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

?

Other solution is to create a script with 
echo 1 > ....

and sudo this script.

Regards,


Le samedi 14 mai 2011 à 10:16 -0700, matt welland a écrit :

> 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.
> > 
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~hybrid-graphics-linux
> Post to     : hybrid-graphics-linux@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~hybrid-graphics-linux
> More help   : https://help.launchpad.net/ListHelp



Follow ups

References