Disable exclusive display in Ubuntu

Source: Internet
Author: User
When running Ubuntu, because there is no need for exclusive applications, I want to turn off the exclusive display, only using the set display, power saving and cooling, theoretically suitable for a similar dual-graphics switch notebook, if you are using another notebook, please test the availability on your own. Preparation: If you have installed the ATI closed source driver, uninstall it first. If you have disabled dual-graphics switching in the BIOS, enable it first. Run the following command on the terminal: cat/sys/kernel/debug/vgaswitcheroo/switch.

When running Ubuntu, because there is no need for exclusive applications, I want to turn off the exclusive display, only using the set display, power saving and cooling, theoretically suitable for a similar dual-graphics switch notebook, if you are using another notebook, please test the availability on your own.

Preparation: If you have installed the ATI closed source driver, uninstall it first. If you have disabled dual-graphics switching in the BIOS, enable it first.

Run the following command on the terminal:

Cat/sys/kernel/debug/vgaswitcheroo/switch

Enable root in case of any problem.

If this is the case (both statuses are Pwr ):

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

It means that both of your video cards are on, so follow the steps below.
Create a script/usr/local/sbin/vgaswitcher

#! /Bin/bash
 
If ["$ (whoami )"! = "Root"]; then
Echo "Use as root"
Exit 1
Fi
 
If [-z "$1"]; then
Cmd = "OFF"
Else
If ["$1" = "-I"]; then
Cmd = "DIGD"
Elif ["$1" = "-d"]; then
Cmd = "DDIS"
Else
Cmd = $1
Fi
Fi
 
If (["$ cmd "! = "OFF"] & ["$ cmd "! = "DDIS"] & ["$ cmd "! = "DIGD"]); then
Echo "Bad Command! "
Exit 1
Fi
 
Echo "$ cmd">/sys/kernel/debug/vgaswitcheroo/switch
Cat/sys/kernel/debug/vgaswitcheroo/switch

Then create a STARTUP script/etc/init. d/vgaswitch.

#! /Bin/bash
 
If ["$1 "! = "Start"]; then
Exit;
Fi
 
/Usr/local/sbin/vgaswitcher
/Usr/local/sbin/vgaswitcher-I

After the establishment, run the following command:

Sudo chmod + x/usr/local/sbin/vgaswitcher/etc/init. d/vgaswitch & sudo update-rc.d vgaswitch defaults

You can disable exclusive display after restarting ~
You can run the initial command again to view the status:

Cat/sys/kernel/debug/vgaswitcheroo/switch

Now it should be like this (one Pwr and the other Off ):

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.