LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 801|回复: 10

(已解决)如何安装双显卡驱动和配置X

[复制链接]
发表于 2011-12-10 13:54:33 | 显示全部楼层 |阅读模式
我的acer 4752g本子,intel集显和nvidia geforce GT 540M的双显卡,在gentoo中却搞不定显卡驱动。安装了vesa,intel,nouveau驱动,只有vesa能够工作。应该是1366X768的分辨率只能达到1024X768,字体被压成扁平,有些难看。不知该如何安装双显卡驱动和配置X?
发表于 2011-12-10 17:14:04 | 显示全部楼层
你的情况与我一样,我现在只用INTEL显卡!!!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-12-10 17:53:02 | 显示全部楼层
Post by jiaguwen;2156784
你的情况与我一样,我现在只用INTEL显卡!!!


问题是我的intel驱动都没用上,用的vesa驱动,分辨率只达到1024x768
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-12-10 19:23:22 | 显示全部楼层
这是我卸载vesa驱动,使用intel驱动,startx后的终端输出:

[  4456.279]
X.Org X Server 1.10.4
Release Date: 2011-08-19
[  4456.279] X Protocol Version 11, Revision 0
[  4456.279] Build Operating System: Linux 3.0.6-gentoo i686 Gentoo
[  4456.279] Current Operating System: Linux mygentoo 3.0.6-gentoo #20 SMP Sat Dec 10 23:41:40 CST 2011 i686
[  4456.280] Kernel command line: root=/dev/sda6
[  4456.280] Build Date: 10 December 2011  07:33:40AM
[  4456.280]  
[  4456.280] Current version of pixman: 0.22.2
[  4456.280]         Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[  4456.280] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  4456.281] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Dec 10 18:58:55 2011
[  4456.281] (==) Using config directory: "/etc/X11/xorg.conf.d"
[  4456.281] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  4456.282] (==) No Layout section.  Using the first Screen section.
[  4456.282] (==) No screen section available. Using defaults.
[  4456.282] (**) |-->Screen "Default Screen Section" (0)
[  4456.282] (**) |   |-->Monitor "<default monitor>"
[  4456.282] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[  4456.282] (==) Automatically adding devices
[  4456.282] (==) Automatically enabling devices
[  4456.282] (WW) The directory "/usr/share/fonts/misc/" does not exist.
[  4456.282]         Entry deleted from font path.
[  4456.282] (WW) The directory "/usr/share/fonts/TTF/" does not exist.
[  4456.282]         Entry deleted from font path.
[  4456.282] (WW) The directory "/usr/share/fonts/OTF/" does not exist.
[  4456.283]         Entry deleted from font path.
[  4456.283] (WW) The directory "/usr/share/fonts/Type1/" does not exist.
[  4456.283]         Entry deleted from font path.
[  4456.283] (WW) The directory "/usr/share/fonts/100dpi/" does not exist.
[  4456.283]         Entry deleted from font path.
[  4456.283] (WW) The directory "/usr/share/fonts/75dpi/" does not exist.
[  4456.283]         Entry deleted from font path.
[  4456.283] (==) FontPath set to:
       
[  4456.283] (==) ModulePath set to "/usr/lib/xorg/modules"
[  4456.283] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[  4456.283] (II) Loader magic: 0x81f6d80
[  4456.283] (II) Module ABI versions:
[  4456.283]         X.Org ANSI C Emulation: 0.4
[  4456.283]         X.Org Video Driver: 10.0
[  4456.283]         X.Org XInput driver : 12.2
[  4456.283]         X.Org Server Extension : 5.0
[  4456.284] (--) PCI:*(0:0:2:0) 8086:0116:1025:0507 rev 9, Mem @ 0xf3400000/4194304, 0xd0000000/268435456, I/O @ 0x00003000/64
[  4456.284] (--) PCI: (0:1:0:0) 10de:0df4:1025:0507 rev 161, Mem @ 0xf2000000/16777216, 0xe0000000/268435456, 0xf0000000/33554432, I/O @ 0x00002000/128, BIOS @ 0x????????/524288
[  4456.284] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[  4456.284] (II) LoadModule: "extmod"
[  4456.284] (II) Loading /usr/lib/xorg/modules/extensions/libextmod.so
[  4456.284] (II) Module extmod: vendor="X.Org Foundation"
[  4456.284]         compiled for 1.10.4, module version = 1.0.0
[  4456.284]         Module class: X.Org Server Extension
[  4456.284]         ABI class: X.Org Server Extension, version 5.0
[  4456.284] (II) Loading extension MIT-SCREEN-SAVER
[  4456.284] (II) Loading extension XFree86-VidModeExtension
[  4456.284] (II) Loading extension XFree86-DGA
[  4456.284] (II) Loading extension DPMS
[  4456.284] (II) Loading extension XVideo
[  4456.284] (II) Loading extension XVideo-MotionCompensation
[  4456.284] (II) Loading extension X-Resource
[  4456.284] (II) LoadModule: "dbe"
[  4456.284] (II) Loading /usr/lib/xorg/modules/extensions/libdbe.so
[  4456.284] (II) Module dbe: vendor="X.Org Foundation"
[  4456.284]         compiled for 1.10.4, module version = 1.0.0
[  4456.284]         Module class: X.Org Server Extension
[  4456.284]         ABI class: X.Org Server Extension, version 5.0
[  4456.284] (II) Loading extension DOUBLE-BUFFER
[  4456.284] (II) LoadModule: "glx"
[  4456.284] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[  4456.284] (II) Module glx: vendor="X.Org Foundation"
[  4456.284]         compiled for 1.10.4, module version = 1.0.0
[  4456.284]         ABI class: X.Org Server Extension, version 5.0
[  4456.285] (==) AIGLX enabled
[  4456.285] (II) Loading extension GLX
[  4456.285] (II) LoadModule: "record"
[  4456.285] (II) Loading /usr/lib/xorg/modules/extensions/librecord.so
[  4456.285] (II) Module record: vendor="X.Org Foundation"
[  4456.285]         compiled for 1.10.4, module version = 1.13.0
[  4456.285]         Module class: X.Org Server Extension
[  4456.285]         ABI class: X.Org Server Extension, version 5.0
[  4456.285] (II) Loading extension RECORD
[  4456.285] (II) LoadModule: "dri"
[  4456.285] (II) Loading /usr/lib/xorg/modules/extensions/libdri.so
[  4456.285] (II) Module dri: vendor="X.Org Foundation"
[  4456.285]         compiled for 1.10.4, module version = 1.0.0
[  4456.285]         ABI class: X.Org Server Extension, version 5.0
[  4456.285] (II) Loading extension XFree86-DRI
[  4456.285] (II) LoadModule: "dri2"
[  4456.285] (II) Loading /usr/lib/xorg/modules/extensions/libdri2.so
[  4456.285] (II) Module dri2: vendor="X.Org Foundation"
[  4456.285]         compiled for 1.10.4, module version = 1.2.0
[  4456.285]         ABI class: X.Org Server Extension, version 5.0
[  4456.285] (II) Loading extension DRI2
[  4456.285] (==) Matched intel as autoconfigured driver 0
[  4456.285] (==) Matched vesa as autoconfigured driver 1
[  4456.285] (==) Matched fbdev as autoconfigured driver 2
[  4456.285] (==) Assigned the driver to the xf86ConfigLayout
[  4456.285] (II) LoadModule: "intel"
[  4456.285] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[  4456.285] (II) Module intel: vendor="X.Org Foundation"
[  4456.285]         compiled for 1.10.4, module version = 2.15.0
[  4456.285]         Module class: X.Org Video Driver
[  4456.286]         ABI class: X.Org Video Driver, version 10.0
[  4456.286] (II) LoadModule: "vesa"
[  4456.286] (WW) Warning, couldn't open module vesa
[  4456.286] (II) UnloadModule: "vesa"
[  4456.286] (II) Unloading vesa
[  4456.286] (EE) Failed to load module "vesa" (module does not exist, 0)
[  4456.286] (II) LoadModule: "fbdev"
[  4456.286] (WW) Warning, couldn't open module fbdev
[  4456.286] (II) UnloadModule: "fbdev"
[  4456.286] (II) Unloading fbdev
[  4456.286] (EE) Failed to load module "fbdev" (module does not exist, 0)
[  4456.286] (II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
        i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G, 915G,
        E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM, Pineview G,
        965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33, GM45,
        4 Series, G45/G43, Q45/Q43, G41, B43, B43, Clarkdale, Arrandale,
        Sandybridge, Sandybridge, Sandybridge, Sandybridge, Sandybridge,
        Sandybridge, Sandybridge
[  4456.287] (--) using VT number 8

[  4456.289] (EE) No devices detected.
[  4456.289]
Fatal server error:
[  4456.289] no screens found
[  4456.289]
Please consult the The X.Org Foundation support
         at http://wiki.x.org
for help.
[  4456.289] Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  4456.289]
回复 支持 反对

使用道具 举报

发表于 2011-12-11 00:33:38 | 显示全部楼层
错误结果先不忙贴,贴 /etc/X11/xorg.conf 文件吧。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-12-11 10:29:21 | 显示全部楼层
Post by zhou3345;2156806
错误结果先不忙贴,贴 /etc/X11/xorg.conf 文件吧。


如果用vesa驱动,没有/etc/X11/xorg.conf也行。如果用intel驱动,也不会自动生成/etc/X11/xorg.conf文件。运行Xorg -configure会生成~/xorg.conf.new文件,cp ~/xorg.conf.new /etc/X11/xorg.conf也不管用。
回复 支持 反对

使用道具 举报

发表于 2011-12-11 12:46:17 | 显示全部楼层
Post by gzkdzzy;2156816
如果用vesa驱动,没有/etc/X11/xorg.conf也行。如果用intel驱动,也不会自动生成/etc/X11/xorg.conf文件。运行Xorg -configure会生成~/xorg.conf.new文件,cp ~/xorg.conf.new /etc/X11/xorg.conf也不管用。


也就是说,你根本就没有配置过 xorg.conf 文件,那怎么让X知道你需要什么驱动呢?既然你都装了,那肯定用默认的vesa呀。

Xorg -configure 生成的配置不太靠普,还是网上找一个配置修改一下吧。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-12-11 14:01:14 | 显示全部楼层
Post by zhou3345;2156825
也就是说,你根本就没有配置过 xorg.conf 文件,那怎么让X知道你需要什么驱动呢?既然你都装了,那肯定用默认的vesa呀。

Xorg -configure 生成的配置不太靠普,还是网上找一个配置修改一下吧。


这是我不用vesa时的xorg.conf:
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        ModulePath   "/usr/lib/xorg/modules"
        FontPath     "/usr/share/fonts/misc/"
        FontPath     "/usr/share/fonts/TTF/"
        FontPath     "/usr/share/fonts/OTF/"
        FontPath     "/usr/share/fonts/Type1/"
        FontPath     "/usr/share/fonts/100dpi/"
        FontPath     "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
        Load  "glx"
        Load  "extmod"
        Load  "record"
        Load  "dri2"
        Load  "dbe"
        Load  "dri"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option            "rotocol" "auto"
        Option            "Device" "/dev/input/mice"
        Option            "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "AccelMethod"                # [<str>]
        #Option     "DRI"                        # [<bool>]
        #Option     "ColorKey"                   # <i>
        #Option     "VideoKey"                   # <i>
        #Option     "FallbackDebug"              # [<bool>]
        #Option     "Tiling"                     # [<bool>]
        #Option     "LinearFramebuffer"          # [<bool>]
        #Option     "Shadow"                     # [<bool>]
        #Option     "SwapbuffersWait"            # [<bool>]
        #Option     "XvMC"                       # [<bool>]
        #Option     "XvPreferOverlay"            # [<bool>]
        #Option     "DebugFlushBatches"          # [<bool>]
        #Option     "DebugFlushCaches"           # [<bool>]
        #Option     "DebugWait"                  # [<bool>]
        #Option     "HotPlug"                    # [<bool>]
        #Option     "RelaxedFencing"             # [<bool>]
        Identifier  "Card0"
        Driver      "intel"
        BusID       "CI:0:2:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection
帮忙看看
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-12-11 17:08:42 | 显示全部楼层
庆祝一下,现在可以在BIOS中关闭N卡的情况使用Intel驱动了,分辨率达到1366x768,原先的失败是因为配置内核时漏掉了Enable modesetting on intel by default这个选项。
Device Drivers --->
  Graphics support --->
    /dev/agpgart (AGP Support) --->
    <*>  Intel 440LX/BX/GX, I8xx and E7x05 chipset support
    Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
    <*>  Intel 830M, 845G, 852GM, 855GM, 865G (i915 driver)
         i915 driver
   
  •     Enable modesetting on intel by default
    谢谢各位,这是阶段性的成果,下步又慢慢折腾N卡了。
  • 回复 支持 反对

    使用道具 举报

    发表于 2011-12-11 22:00:31 | 显示全部楼层
    关于双显卡支持,可以看看这里:https://launchpad.net/~hybrid-graphics-linux
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    快速回复 返回顶部 返回列表