Install Ubuntu dual graphics laptop computer how to disable discrete graphics

I use a laptop computer model is DELL Inspiron 5520 15RD-2518

Integrated graphics : Intel HD Graphics 4000
Discrete graphics   : AMD Radeon HD 7670M

Ubuntu operating system, support for the ATI graphics card is not very well, and used a graphics card when not many,so discrete graphics off, can reduce system temperature, reducing power consumption.
Execute the following command in the terminal in order to view the graphics state.

$ sudo cat /sys/kernel/debug/vgaswitcheroo/switch

If you display a prompt similar to the following

0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Pwr:0000:01:00.0

Pwr which means that it is in the opened state,This shows that the computer two graphics cards is turned on,by modifying the /etc/rc.local file to turn off the discrete graphics.

Open rc.local file:

$ sudo gedit /etc/rc.local

Add the following statement before the exit 0 in the /etc/rc.local file:

echo IGD > /sys/kernel/debug/vgaswitcheroo/switch #Switch to integrated graphics
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch #Close the other is not connected to the graphics card

After completion of editing,save and exit the text editor.Restart the computer and then view the graphics state.

$ sudo cat /sys/kernel/debug/vgaswitcheroo/switch

If you display a prompt similar to the following,Discrete graphics has been closed.

0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Off:0000:01:00.0
0.00 avg. rating (0% score) - 0 votes