双显卡笔记本禁用独显

  1. Download the  LiveUSB Creator program for Windows from  http://fedorahosted.org/liveusb-creator.
  2. LiveUSB Creator can create live USB media either from an image file that you downloaded previously, as described in  Section 2.1.3, “Which Files Do I Download?”, or it can download an image file from the Internet. Either:
    • click the  Browse button under the  Use existing LiveCD label, browse to the location where you previously downloaded a Fedora Live ISO file, and select that file.
    • select a Fedora Live ISO file from the drop-down menu that  LiveUSB Creator presents under the Download Fedora label. Note that image files are large and that it is probably impractical to use  LiveUSB Creator to download an image file if you do not have a broadband connection to the Internet.
  3. Click Create Live USB

    先弄个livecd测试下再安装

    测试环境:fedora18 3.8.4-202.fc18.i686.PAE
    显卡环境:HD3000+NV540M

    首先声明,以下方法只能保证你能禁用独立显卡,可能不能让你像装好Bumblebee后那样能切换到独立显卡!

    1.
    $ lspci | grep VGA 
    查看当前的显卡是哪些(在bios中关闭了独显的记得切过来)

    2.
    $ su
    切换到root

    3.
    # cat /sys/kernel/debug/vgaswitcheroo/switch
    输出应该类似于

    0:IGD:+:Pwr:0000:00:02.0
    1:DIS: :Pwr:0000:01:00.0
    如果没有类似输出,恭喜你,只能选用别的方法了

    4.
    上面的0代表的是我的HD3000,1代表独立显卡
    注意:两条都是 Pwr
    说明两个显卡都在工作,你的风扇当然就....

    5.
    # echo DDIS>/sys/kernel/debug/vgaswitcheroo/switch
    用来切换到独立显卡
    # echo DIGD>/sys/kernel/debug/vgaswitcheroo/switch
    用来切换到集成显卡
    #echo OFF>/sys/kernel/debug/vgaswitcheroo/switch
    用来关闭不用的显卡

    6.
    # echo DIGD>/sys/kernel/debug/vgaswitcheroo/switch
    # echo OFF>/sys/kernel/debug/vgaswitcheroo/switch

    7.

    好了,看效果的时候到了

    # cat /sys/kernel/debug/vgaswitcheroo/switch

    0:IGD:+:Pwr:0000:00:02.0
    1:DIS: :Off:0000:01:00.0
    看见没有!下面的Pwr变成了Off哦

    #lspci | grep VGA

    00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
    01:00.0 VGA compatible controller: NVIDIA Corporation GF108 [GeForce GT 540M] (rev ff)

    (rev ff)
    看下面的ff,也是说明VGA图形设备已关闭哦


    cat /sys/kernel/debug/vgaswitcheroo/switch

    如果类似这样(主要是两个状态都是Pwr):

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

    就说明你的两块显卡都开着,那么就按照下面的步骤做吧
    建立一个脚本/usr/local/sbin/vgaswitcher

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    #!/bin/bash
     
    if["$(whoami)"!="root"];then
       echo"Use as root"
       exit1
    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!"
            exit1
    fi
     
    echo"$cmd">/sys/kernel/debug/vgaswitcheroo/switch
    cat/sys/kernel/debug/vgaswitcheroo/switch

    然后再建立一个启动脚本/etc/init.d/vgaswitch

    1
    2
    3
    4
    5
    6
    7
    8
    #!/bin/bash
     
    if["$1"!="start"];then
       exit;
    fi
     
    /usr/local/sbin/vgaswitcher
    /usr/local/sbin/vgaswitcher-i

    都建立好以后,执行如下命令:

    1
    sudochmod+x/usr/local/sbin/vgaswitcher/etc/init.d/vgaswitch&&sudoupdate-rc.d vgaswitch defaults

    重启就可以禁用掉独显了~
    可以再次执行最开始的命令来查看状态:

    1
    cat/sys/kernel/debug/vgaswitcheroo/switch

    现在应该是这样了(一个Pwr,另一个Off):

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

    http://fedoraproject.org/wiki/Bumblebee

转载于:https://my.oschina.net/u/1019281/blog/119470

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值