LinuxSir.cn,穿越时空的Linuxsir!

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

请教有关xorg的配置问题

[复制链接]
发表于 2011-7-7 18:11:33 | 显示全部楼层 |阅读模式
这回先安装的nvidia-drivers驱动
然后在make.conf里添加了

  1. INPUT_DEVICES="keyboard mouse"
  2. VIDEO_CARDS="nvidia"
复制代码

然后直接 emerge xorg-x11
安装完,startx依然是不成功
没用Xorg -configure 直接startx提示的错误信息
(EE) [drm] failed to open device
(EE) open /dev/fb0: no such file or directory

而后用Xorg -configre配置
前边依然提示vmwgfx模块错误,这个按提示忽略了
(EE)[drm] no DRICreatePCIBusID symbol
Number of created screens does not match number of detected devices.

Xorg -config ~/xorg.conf.new
屏幕花屏闪一下,然后直接黑屏。
ctrl+Alt+F10  Alt+F4会直接退出重新登陆帐号

再输入会提示xorg已经运行,直接startx会看见鼠标是小黑X,屏幕全黑。看鼠标有点扁,估计是800*600的分辨率

加上driver "nvidia" 屏幕分辨率可能变成了1440*900或者1024*768不过仍然是黑屏

麻烦大家帮忙分析下是什么地方出了问题,这阵为了这个事都蒙的不行了。。还是搞不定。

现在是拿台式机装的gentoo,找朋友借的笔记本发的帖子。
xorg.conf.new文件虽然可以用U盘传过来。
可是lspci的输出结果不知道怎么保存下来,有什么办法保存下来吗?



  1. Section "ServerLayout"
  2.         Identifier     "X.org Configured"
  3.         Screen      0  "Screen0" 0 0
  4.         InputDevice    "Mouse0" "CorePointer"
  5.         InputDevice    "Keyboard0" "CoreKeyboard"
  6. EndSection

  7. Section "Files"
  8.         ModulePath   "/usr/lib/xorg/modules"
  9.         FontPath     "/usr/share/fonts/misc/"
  10.         FontPath     "/usr/share/fonts/TTF/"
  11.         FontPath     "/usr/share/fonts/OTF/"
  12.         FontPath     "/usr/share/fonts/Type1/"
  13.         FontPath     "/usr/share/fonts/100dpi/"
  14.         FontPath     "/usr/share/fonts/75dpi/"
  15. EndSection

  16. Section "Module"
  17.         Load  "extmod"
  18.         Load  "dri2"
  19.         Load  "dri"
  20.         Load  "dbe"
  21.         Load  "glx"
  22.         Load  "record"
  23. EndSection

  24. Section "InputDevice"
  25.         Identifier  "Keyboard0"
  26.         Driver      "kbd"
  27. EndSection

  28. Section "InputDevice"
  29.         Identifier  "Mouse0"
  30.         Driver      "mouse"
  31.         Option            "Protocol" "auto"
  32.         Option            "Device" "/dev/input/mice"
  33.         Option            "ZAxisMapping" "4 5 6 7"
  34. EndSection

  35. Section "Monitor"
  36.         Identifier   "Monitor0"
  37.         VendorName   "Monitor Vendor"
  38.         ModelName    "Monitor Model"
  39. EndSection

  40. Section "Device"
  41.         ### Available Driver options are:-
  42.         ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
  43.         ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
  44.         ### <percent>: "<f>%"
  45.         ### [arg]: arg optional
  46.         #Option     "SWcursor"                   # [<bool>]
  47.         #Option     "HWcursor"                   # [<bool>]
  48.         #Option     "NoAccel"                    # [<bool>]
  49.         #Option     "ShadowFB"                   # [<bool>]
  50.         #Option     "VideoKey"                   # <i>
  51.         #Option     "WrappedFB"                  # [<bool>]
  52.         #Option     "GLXVBlank"                  # [<bool>]
  53.         #Option     "ZaphodHeads"                # <str>
  54.         #Option     "PageFlip"                   # [<bool>]
  55.         Identifier  "Card0"
  56.         Driver      "nouveau"
  57.         BusID       "PCI:1:0:0"
  58.         Driver      "nvidia" 这行是我后加的
  59. EndSection

  60. Section "Screen"
  61.         Identifier "Screen0"
  62.         Device     "Card0"
  63.         Monitor    "Monitor0"
  64.         SubSection "Display"
  65.         Viewport   0 0
  66.         Depth      1
  67.         EndSubSection
  68.         SubSection "Display"
  69.                 Viewport   0 0
  70.                 Depth     4
  71.         EndSubSection
  72.         SubSection "Display"
  73.                 Viewport   0 0
  74.                 Depth     8
  75.         EndSubSection
  76.         SubSection "Display"
  77.                 Viewport   0 0
  78.                 Depth     15
  79.         EndSubSection
  80.         SubSection "Display"
  81.                 Viewport   0 0
  82.                 Depth     16
  83.         EndSubSection
  84.         SubSection "Display"
  85.                 Viewport   0 0
  86.                 Depth     24
  87.         EndSubSection
  88. EndSection



复制代码
发表于 2011-7-7 22:31:27 | 显示全部楼层
在Section "ServerLayout"下添加
        Option         "AllowEmptyInput" "False"
看看。。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-7-8 07:36:24 | 显示全部楼层
昨天在别的地方找到的答案。
nvidia-xconfig 生成xorg.conf文件
eselect opengl set nvidia 设置GLX
然后把dri/dri2的调用禁用了。
emerge xterm后,终于正常了。
睡觉前装的kdebase-startkde
现在正常打开kde了。

这回装kde就顺利多了。
启动以后,不花屏。看来还是上次xorg没配置成功的原因。
不过打开kde以后,l虽然界面运行正常。不过文件管理没有反应,launcher里的run运行命令也没反应,logout也不管用。
kde的system settings desktop setting可以用,Applications里的CMake 和 Designer都可
以用。
感觉像是缺少应用程序的原因,可是怎么连run命令也不能使呢?这个也需要其他程序支持么?
以前用ubuntu,默认安装的是gnome。文件管理器是Nauutilus,terminal是gnome-terminal.
kde默认调用的软件是什么呢?
回复 支持 反对

使用道具 举报

发表于 2011-7-8 12:41:37 | 显示全部楼层
确认 consolekit,dbus 之类的都启动了……
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-7-8 13:15:20 | 显示全部楼层
刚才emerge consolekit
rc-update consolekit default
dbus已经装了,,直接rc-update dbus default

reboot后startx,logout还是不管用.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-7-8 14:17:27 | 显示全部楼层
刚才emerge kde-l10n
然后设置字体,,,中文显示的很畸形,而且汉化不全

如下图的样子,,,和上次的效果如出一辙.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

发表于 2011-7-8 20:18:54 | 显示全部楼层
1、中文字体建议文泉驿微米黑
2、其实xorg.conf不要那么多内容,我的给你看看
  1. yj@YJ ~ $ cat /etc/X11/xorg.conf
  2. # nvidia-xconfig: X configuration file generated by nvidia-xconfig
  3. # nvidia-xconfig:  version 1.0  (buildmeister@builder75)  Thu Apr 22 11:44:23 PDT 2010
  4. Section "ServerFlags"
  5.     Option         "AutoAddDevices" "false"
  6. EndSection
  7. #Section "InputDevice"
  8. #        Identifier "Synaptics Touchpad"
  9. #        Driver "synaptics"
  10. #        Option        "SendCoreEvents"        "true"
  11. #        Option        "Protocol"        "auto-dev"
  12. #        Option        "HorizEdgeScroll"        "0"
  13. #EndSection
  14. #Section "Device"
  15. #   Identifier     "Card0"
  16. #   Driver         "nvidia"
  17. #   VendorName     "nVidia Corporation"
  18. #        Option                "Logo"                        "no"
  19. #   BoardName      "G98 [GeForce 9300M GS]"
  20. #ndSection
  21. yj@YJ ~ $
复制代码
还有就是nvidia的建议用开源的noveau,安装xorg只需要安装两个包,xorg-server和xorg-drivers,其中xorg-drivers的USE设置如下:
  1.      
  2. Installed versions:  1.11(09时58分35秒 2011年06月30日)(input_devices_evdev input_devices_keyboard input_devices_mouse input_devices_synaptics video_cards_nouveau
复制代码
你的又是noveau又是nvidia-drivers的,不确定是不是有冲突。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-7-8 21:22:47 | 显示全部楼层
谢谢ziyouwaYJ的建议...
刚才emerge wqy-bitmapfont 字体终于一样大了...
在字体设置里,默认使用的还是英文字体,,,是不是之前没有默认的中文字体,,所以中文显示就不统一了呢.

不好意思啊,,,1楼帖子的xorg.conf文件可能有点旧...
那时候好象没更新nvidia设置

这是现在的

  1. # nvidia-xconfig: X configuration file generated by nvidia-xconfig
  2. # nvidia-xconfig:  version 270.41.06  (buildmeister@swio-display-x86-rhel47-07.nvidia.com)  Mon Apr 18 15:15:12 PDT 2011


  3. Section "ServerLayout"
  4.     Identifier     "X.org Configured"
  5.     Screen      0  "Screen0" 0 0
  6.     InputDevice    "Mouse0" "CorePointer"
  7.     InputDevice    "Keyboard0" "CoreKeyboard"
  8. EndSection

  9. Section "Files"
  10.     ModulePath      "/usr/lib/xorg/modules"
  11.     FontPath        "/usr/share/fonts/misc/"
  12.     FontPath        "/usr/share/fonts/TTF/"
  13.     FontPath        "/usr/share/fonts/OTF/"
  14.     FontPath        "/usr/share/fonts/Type1/"
  15.     FontPath        "/usr/share/fonts/100dpi/"
  16.     FontPath        "/usr/share/fonts/75dpi/"
  17. EndSection

  18. Section "Module"
  19.     Disable        "dri"
  20.     Disable        "dri2"
  21.     Load           "extmod"
  22.     Load           "dbe"
  23.     Load           "glx"
  24.     Load           "record"
  25. EndSection

  26. Section "InputDevice"
  27.     Identifier     "Keyboard0"
  28.     Driver         "kbd"
  29. EndSection

  30. Section "InputDevice"
  31.     Identifier     "Mouse0"
  32.     Driver         "mouse"
  33.     Option         "Protocol" "auto"
  34.     Option         "Device" "/dev/input/mice"
  35.     Option         "ZAxisMapping" "4 5 6 7"
  36. EndSection

  37. Section "Monitor"
  38.     Identifier     "Monitor0"
  39.     VendorName     "Monitor Vendor"
  40.     ModelName      "Monitor Model"
  41. EndSection

  42. Section "Device"

  43.         ### Available Driver options are:-
  44.         ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
  45.         ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
  46.         ### <percent>: "<f>%"
  47.         ### [arg]: arg optional
  48.         #Option     "SWcursor"                   # [<bool>]
  49.         #Option     "HWcursor"                   # [<bool>]
  50.         #Option     "NoAccel"                    # [<bool>]
  51.         #Option     "ShadowFB"                   # [<bool>]
  52.         #Option     "VideoKey"                   # <i>
  53.         #Option     "WrappedFB"                  # [<bool>]
  54.         #Option     "GLXVBlank"                  # [<bool>]
  55.         #Option     "ZaphodHeads"                # <str>
  56.         #Option     "PageFlip"                   # [<bool>]
  57.     Identifier     "Card0"
  58.     Driver         "nvidia"
  59. EndSection

  60. Section "Screen"
  61.     Identifier     "Screen0"
  62.     Device         "Card0"
  63.     Monitor        "Monitor0"
  64.     DefaultDepth    24
  65.     SubSection     "Display"
  66.         Viewport    0 0
  67.         Depth       1
  68.     EndSubSection
  69.     SubSection     "Display"
  70.         Viewport    0 0
  71.         Depth       4
  72.     EndSubSection
  73.     SubSection     "Display"
  74.         Viewport    0 0
  75.         Depth       8
  76.     EndSubSection
  77.     SubSection     "Display"
  78.         Viewport    0 0
  79.         Depth       15
  80.     EndSubSection
  81.     SubSection     "Display"
  82.         Viewport    0 0
  83.         Depth       16
  84.     EndSubSection
  85.     SubSection     "Display"
  86.         Viewport    0 0
  87.         Depth       24
  88.     EndSubSection
  89. EndSection

复制代码


虽然有点冗余,不过也算是能运行,,暂时还是先弄汉化的问题吧.
刚装上ksnapshot 这是刚截的图...

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

发表于 2011-7-8 21:34:39 | 显示全部楼层
字体就在字体设置里面设置,其实只要调整字体大小就可以了,稍微大一点自然就好看了
回复 支持 反对

使用道具 举报

发表于 2011-7-8 21:48:06 | 显示全部楼层
要用 startx 启动的话确认用了类似 ck-launch-session xxx……
还是 kdm 启动方便些……
回复 支持 反对

使用道具 举报

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

本版积分规则

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