Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When IGD and DIS both exist in my pc,and I want to disable DIS,so I create a service to switch on and off the DIS.It works.Finally,I decide to add the service command into /etc/rc.local so that DIS will be powered off automatically.Unfortunately,it fails.There's only one command added by myself in the file /etc/rc.local,so I can affirm failure is caused by that added command.

Before,I directly added the command "echo OFF >/sys/kernel/debug..." into /etc/rc.local,and when I restarted,the system startup fails.So I thought maybe when the command is executed,the DIS hasn't been powered on or ready for work.So conflict occurs!It's just my prediction.Then I added one line command "sleep 1s" before the "echo OFF ...",it works nearly everytime when I start or restart pc,while fails sometimes.

The output result of "cat /sys/kernel/debug..." is as following: 0:IGD:+:Pwr:0000:00:02.0 1:DIS: :Pwr:0000:01:00.0

I want know 0000:00:02.0 means what?Time of first power on? If it was really time,I can set the command "sleep 2s" to wait for DIS powered on then "echo OFF > ..."

Thanks for your advice!

share|improve this question
add comment

1 Answer

It doesn't matter. For more info, see this page.

You can edit /etc/rc.local and add the next lines:

sleep 6
echo ON > /sys/kernel/debug/vgaswitcheroo/switch 
echo IGD > /sys/kernel/debug/vgaswitcheroo/switch
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

Then save the file and restart.

For me, this worked. The sleep 1 or 2 is too early and it makes the system frozen.

Try and tell me what are the results. (Use it at your own risk. I only tested in my system.)

share|improve this answer
add comment

Your Answer

 
discard

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.