ubuntu linux 上使用索尼sz 6/7系列双显卡功能

来源:互联网 发布:mac耳机线控无法使用 编辑:程序博客网 时间:2024/05/17 08:25
                             ubuntu linux 上使用索尼sz 6/7系列双显卡功能
                                          作者:Kevin.U  (YOUDI)
                                e-mail/gtalk:youdimail@gmail.com
   sony sz系列笔记本有一个独特的功能,那就是双显卡切换功能,该系列均有两块显卡,速度模式;nvidia独立显卡,耐力模式; intel集成显卡,用户可以跟据自己使用环境来选择相应的模式,以保证电池使用的时间和笔记本的性能,这是一个非常人性化的设计。然而如何在ubuntu linux来使用这个功能呢?我与大家分享一下。
      我的爱本为sony sz65 , OS为ubuntu 8.04 64bit,在安装系统时使用speed模式。
安装完成之后安装nvidia显卡驱动:
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/96.43.07/NVIDIA-Linux-x86_64-96.43.07-pkg2.run
如果是32bit应该是这个,
wget http://us.download.nvidia.com/XFree86/Linux-x86/96.43.07/NVIDIA-Linux-x86-96.43.07-pkg1.run
sudo apt-get install build-essential
sudo /etc/init.d/gdm stop
alt+ctrl+f1
输入用户名 密码 进入
sudo sh 刚才您下载的文件名.run
然后一步一确定就可以了
sudo /etc/init.d/gdm start

进入x系统之后
sudo nvidia-settings
调整分辨率 保存

sudo gedit /etc/default/linux-restricted-modules-common
将其中的DISABLED_MODULES=”"改为DISABLED_MODULES="nv nvidia_new"。如果不这么修改,重新启动以后,驱动就会失败
speed模式nvidia显卡驱动安装完成。
安装intel显卡:
sudo apt-get install xserver-xorg-video-intel
安装完成,
speed模式的xorg.conf将其保存为/etc/X11/xorg.conf.speed
可以复制以下内容保存为xorg.conf.speed
# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "InputDevice"
    Identifier    "Generic Keyboard"
    Driver        "kbd"
    Option        "XkbRules"    "xorg"
    Option        "XkbModel"    "pc105"
    Option        "XkbLayout"    "us,am"
    Option        "XkbOptions"    "grp:alt_shift_toggle,grp_led:scroll"
    Option        "XkbVariant"    ","
EndSection

Section "InputDevice"
    Identifier    "Configured Mouse"
    Driver        "mouse"
    Option        "CorePointer"
EndSection

Section "InputDevice"
    Identifier    "Synaptics Touchpad"
    Driver        "synaptics"
    Option        "SendCoreEvents"    "true"
    Option        "Device"    "/dev/psaux"
    Option        "Protocol"    "auto-dev"
    Option        "HorizEdgeScroll"    "0"
EndSection

Section "Device"
    Identifier    "Configured Video Device"
    Driver        "nvidia"
    Option        "NoLogo"    "True"
EndSection

Section "Monitor"
    Identifier    "Configured Monitor"
EndSection

Section "Screen"
    Identifier    "Default Screen"
    Monitor        "Configured Monitor"
    Device        "Configured Video Device"
    Defaultdepth    24
EndSection

Section "ServerLayout"
    Identifier    "Default Layout"
  screen "Default Screen"
    Inputdevice    "Synaptics Touchpad"
EndSection
Section "Module"
    Load        "glx"
EndSection

stamina模式的xorg.conf将其保存为/etc/X11/xorg.conf.stamina
可以复制以下内容保存为xorg.conf.stamina

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
    FontPath    "/usr/share/X11/fonts/misc"
    FontPath    "/usr/share/X11/fonts/cyrillic"
    FontPath    "/usr/share/X11/fonts/100dpi/:unscaled"
    FontPath    "/usr/share/X11/fonts/75dpi/:unscaled"
    FontPath    "/usr/share/X11/fonts/Type1"
    FontPath    "/usr/share/X11/fonts/100dpi"
    FontPath    "/usr/share/X11/fonts/75dpi"
    # path to defoma fonts
    FontPath    "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
    Load    "i2c"
    Load    "bitmap"
    Load    "ddc"
    Load    "dri"
    Load    "extmod"
    Load    "freetype"
    Load    "glx"
    Load    "int10"
    Load    "type1"
    Load    "vbe"
EndSection

Section "InputDevice"
    Identifier    "Generic Keyboard"
    Driver        "kbd"
    Option        "CoreKeyboard"
    Option        "XkbRules"    "xorg"
    Option        "XkbModel"    "pc104"
    Option        "XkbLayout"    "us"
EndSection

Section "InputDevice"
    Identifier    "Configured Mouse"
    Driver        "mouse"
    Option        "CorePointer"
    Option        "Device"        "/dev/input/mice"
    Option        "Protocol"        "ExplorerPS/2"
    Option        "ZAxisMapping"        "4 5"
    Option        "Emulate3Buttons"    "true"
EndSection

Section "InputDevice"
    Identifier    "Synaptics Touchpad"
    Driver        "synaptics"
    Option        "SendCoreEvents"    "true"
    Option        "Device"        "/dev/psaux"
    Option        "Protocol"        "auto-dev"
    Option        "HorizScrollDelta"    "0"
EndSection

Section "Device"
    Identifier    "Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller"
    Driver        "intel"
    BusID        "PCI:0:2:0"
EndSection

Section "Monitor"if [ "$VIDEO" = 1 ]; then
cp -f /etc/X11/xorg.conf.speed /etc/X11/xorg.conf
else
cp -f /etc/X11/xorg.conf.stamina /etc/X11/xorg.conf
fi

    Identifier    "Generic Monitor"
    Option        "DPMS"
EndSection

Section "Screen"
    Identifier    "Default Screen"
    Device        "Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller"
    Monitor        "Generic Monitor"
    DefaultDepth    24
    SubSection "Display"
        Depth        1
        Modes        "1280x800"
    EndSubSection
    SubSection "Display"
        Depth        4
        Modes        "1280x800"
    EndSubSection
    SubSection "Display"
        Depth        8
        Modes        "1280x800"
    EndSubSection
    SubSection "Display"
        Depth        15
        Modes        "1280x800"
    EndSubSection
    SubSection "Display"
        Depth        16
        Modes        "1280x800"
    EndSubSection
    SubSection "Display"
        Depth        24
        Modes        "1280x800"
    EndSubSection
EndSection

Section "ServerLayout"
    Identifier    "Default Layout"
    Screen        "Default Screen"
    InputDevice    "Generic Keyboard"
    InputDevice    "Configured Mouse"
    InputDevice    "Synaptics Touchpad"
EndSection

Section "DRI"
    Mode    0666
EndSection

vim /etc/init.d/rc.local加入如下shell代码:

if [ "$VIDEO" = 1 ]; then
cp -f /etc/X11/xorg.conf.speed /etc/X11/xorg.conf
else
cp -f /etc/X11/xorg.conf.stamina /etc/X11/xorg.conf
fi

现在可以试一试你的sz本本在linux下是否可以使用双显卡功能了。
如果大家有什么问题,欢迎大家与我交流。