← Back to team overview

hybrid-graphics-linux team mailing list archive

Re: Asus Switcheroo vs acpi_call

 

Well.. it worked putting it in a script file.
But now... how to automatically run it?

I inserted it in the gnome sessions... all the switcheroo commands are
executed (modprobe, insmod, etc..) , but not the echo command, so the
discrete card doesn't switch off automatically...
Then I tried inserting it as init.d and doing update-rc.d .. but when I
restart the system hangs!

Then ... I would like to echo ON on the switch file just before shutting
down...because if I shut down without doing it the system hangs and doesn't
shut down.

Any suggestion? Thanks

2011/5/14 Authesserre Samuel <sauthess@xxxxxxxxx>

>  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
>
>
>
> _______________________________________________
> 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
>
>

References