免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: LaoLiulaoliu
打印 上一主题 下一主题

[FreeBSD] 键盘和USB鼠标在X下没有反应 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2009-04-07 09:55 |只看该作者
LaoLiulaoliu 现在也BSD了呀
你的问题我以前也遇到过,不过现在我把整系统用 ports来升级,建议用portupgrade来升级,不过会有漫长的编译等待时间,而pkg的软件包又比较老

论坛徽章:
0
12 [报告]
发表于 2009-04-07 13:51 |只看该作者

回复 #12 LaoLiulaoliu 的帖子


  1. #port.cn.freebsd.org

  2. OVERRIDE_LINUX_BASE_PORT=f8
  3. OVERRIDE_LINUX_NONBASE_PORTS=f8

  4. #(Intel CPUs)        core2 core nocona pentium4m pentium4 prescott
  5. CPUTYPE=core2  # /usr/share/mk/bsd.cpu.mk  /usr/share/examples/etc/make.conf
  6. #You can check that on the Gentoo wiki:
  7. #[url]http://en.gentoo-wiki.com/wiki/Safe_Cflags[/url]
  8. # default build settings for ports collection
  9. .if ${.CURDIR:M*/ports/*}
  10.   #CFLAGS=  -march=prescott -O2 -fno-strict-aliasing -pipe -s # -funroll-loops -fomit-frame-pointer
  11.   #CXXFLAGS= -march=prescott -O2 -fno-strict-aliasing -pipe -s # -funroll-loops
  12.   CFLAGS=  -O2 -fno-strict-aliasing -pipe -s # -funroll-loops -fomit-frame-pointer -march=${CPUTYPE}
  13.   CXXFLAGS=${CFLAGS}
  14.   WRKDIRPREFIX=        ${PORTSDIR}/obj
  15. .endif

  16. # default build settings for base system
  17. .if ${.CURDIR:M*/usr/src/*} || ${.CURDIR:M*/usr/obj/*}
  18.   CFLAGS=  -O2 -fno-strict-aliasing -pipe -s # -funroll-loops -fomit-frame-pointer -march=${CPUTYPE}
  19.   CXXFLAGS=${CFLAGS}
  20.   COPTFLAGS=${CFLAGS}
  21.   #CFLAGS+=  -march=prescott -O2 -fno-strict-aliasing -pipe -s
  22.   #CXXFLAGS+= -march=prescott -O2 -fno-strict-aliasing -pipe -s
  23.   #COPTFLAGS= -march=prescott -O2 -fno-strict-aliasing -pipe -s
  24. .endif

  25. # use ccache while building base system
  26. CC=/usr/local/libexec/ccache/world-cc
  27. CXX=/usr/local/libexec/ccache/world-c++
  28. # --< optimizations :: END >---------------------------------------------------


  29. #setenv PACKAGEROOT [url]ftp://ftp.freebsdchina.org/pub/FreeBSD/ports/distfiles/[/url]

  30. #CC=/usr/local/libexec/ccache/world-cc
  31. #CXX=/usr/local/libexec/ccache/world-c++
  32. #echo PACKAGESIT = $PACKAGESIT
  33. #echo PACKAGEROOT = $PACKAGEROOT
  34. #CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer" #for x86_32
  35. #CXXFLAGS="${CFLAGS}"
  36. #CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"

  37. MAKEOPTS="-j3"
  38. #LDFLAGS="-Wl,-O1"  ###OK+++
  39. #LDFLAGS="-Wl,-O1 -Wl,--as-needed"

  40. #MASTER_SIT_OVERRIDE?= \
  41. #[url]ftp://ftp.freebsdchina.org/pub/FreeBSD/ports/distfiles/[/url]\
  42. #[url]ftp://ftp.tw.freebsd.org/pub/FreeBSD/ports/distfiles/[/url]
  43. #[url]http://freebsd.mirrors.tds.net/pub/FreeBSD/ports/distfiles/[/url]


  44. MASTER_SITE_BACKUP?= \
  45. [url]http://ports.hshh.org/[/url]${DIST_SUBDIR}/\
  46. [url]ftp://ftp.freebsdchina.org/pub/FreeBSD/ports/distfiles/[/url]${DIST_SUBDIR}/\
  47. [url]ftp://ftp.freebsd.org.cn/pub/FreeBSD/ports/distfiles/[/url]${DIST_SUBDIR}/

  48. MASTER_SITE_OVERRIDE?= ${MASTER_SITE_BACKUP}

  49. #FETCH_CMD=wget -c -t 1
  50. FETCH_CMD=/usr/local/bin/axel
  51. FETCH_BEFORE_ARGS= -n 10 -a
  52. FETCH_AFTER_ARGS=

  53. DISABLE_SIZE=yes

  54. #cvsup -g -L 2 -h cvsup.tw.freebsd.org /usr/share/examples/cvsup/ports-supfile
  55. #cd /usr/ports
  56. #make fetchindex
  57. #==================================
  58. SUP_UPDATE = yes
  59. SUP    = /usr/local/bin/cvsup
  60. SUPFLAGS  = -g -L 2
  61. #
  62. # SUPHOST
  63. # cvsup[1-9].tw.FreeBSD.org
  64. SUPHOST = cvsup.tw.FreeBSD.org
  65. #
  66. SUPFILE=        /usr/share/examples/cvsup/stable-supfile
  67. PORTSSUPFILE=   /usr/share/examples/cvsup/ports-supfile
  68. DOCSUPFILE=     /usr/share/examples/cvsup/doc-supfile
  69. SUPHOST=   ftp.freebsdchina.org
  70. #==================================
  71. # --< defauls ports knobs :: BEGIN >-------------------------------------------
  72. # optimizations
  73.   WITH_SSE= yes
  74.   WITH_3DNOW= yes
  75.   WITH_MMX= yes
  76.   WITH_THREADS= yes
  77.   WITHOUT_PROFILE= yes
  78.   WITHOUT_DEBUG= yes

  79. # X11
  80.   X_WINDOW_SYSTEM= xorg

  81. # audio
  82.   WITHOUT_ESD= yes
  83.   WITHOUT_ESOUND= yes
  84.   WITHOUT_ARTS= yes
  85.   WITHOUT_XMMS= yes
  86. #WITHOUT_DBUS= yes
  87.   WITHOUT_GSTREAMER= yes

  88. # toolkits
  89. #WITHOUT_GTK= yes
  90. #WITHOUT_QT= yes
  91.   WITH_GTK2= yes

  92. # encoding
  93.   WITH_UTF8= yes
  94.   WITH_MULTIBYTE= yes
  95.   WITH_UNICODE= yes
  96.   WITH_NLS= yes
  97.   WITH_I18N= yes
  98.   WITH_CJK=yes

  99. # network/www
  100.   WITHOUT_IPV6= yes
  101.   WITHOUT_JAVA= yes
  102.   WITHOUT_MOZILLA= yes
  103.   WITHOUT_MOZILLA_PLUGIN= yes
  104. #WITH_BROWSER= opera
  105. #BROWSER= opera
  106.   #WITHOUT_PLUGINWRAPPER=yes

  107. # spell check
  108.   WITHOUT_GTKSPELL= yes
  109.   WITHOUT_ASPELL= yes
  110.   WITHOUT_ISPELL= yes

  111. # graphics
  112.   WITH_JPEG= yes
  113.   WITH_IMLIB2= yes
  114.   WITH_GIMP= yes

  115. # fonts
  116.   WITH_FREETYPE= yes
  117.   WITH_FREETYPE2= yes
  118.   WITH_XFT= yes

  119. # multimedia
  120.   WITH_MPLAYER= yes
  121.   WITH_MPD= yes
  122.   WITHOUT_XINE= yes
  123.   WITHOUT_XINERAMA= yes
  124.   WITH_USB= yes
  125.   WITH_DVD_DEVICE= /dev/acd0

  126. # print
  127.   WITHOUT_PRINT= yes
  128.   WITHOUT_CUPS= yes

  129. # other
  130.   WITHOUT_GCONF= yes
  131.   WITHOUT_EXAMPLES= yes
  132.   WITHOUT_TEMPLATES= yes
  133.   WITHOUT_NAUTILUS= yes
  134.   WITHOUT_PERL= yes
  135.   WITHOUT_PYTHON= yes
  136. # --< defauls ports knobs :: END >---------------------------------------------


  137. #==================================

  138. #   .if !defined(NOCCACHE)
  139. #   .if ${.CURDIR:M/usr/src*}
  140. #   CC=/usr/local/libexec/ccache/cc
  141. #   CXX=/usr/local/libexec/ccache/c++
  142. #   .else
  143. #   CC=cc
  144. #   CXX=c++
  145. #   .endif
  146. #   .else
  147. #   CC=/usr/bin/cc
  148. #   CXX=/usr/bin/c++
  149. #   .endif

  150. #setenv PATH /usr/local/libexec/ccache/:$PATH
  151. #setenv CCACHE_PATH /usr/bin:/usr/local/bin
  152. #setenv CCACHE_DIR /usr/ccache
  153. #setenv CCACHE_LOGFILE /usr/ccache/ccache.log
  154. #==================================
  155. # Begin portconf settings
  156. # Do not touch these lines
  157. .if !empty(.CURDIR:M/usr/ports*) && exists(/usr/local/libexec/portconf)
  158. _PORTCONF!=/usr/local/libexec/portconf
  159. .for i in ${_PORTCONF:S/|/ /g}
  160. ${i:S/%/ /g}
  161. .endfor
  162. .endif
  163. # End portconf settings
  164. # Begin portconf settings
  165. # Do not touch these lines
  166. .if !empty(.CURDIR:M/usr/ports*) && exists(/usr/local/libexec/portconf)
  167. _PORTCONF!=/usr/local/libexec/portconf
  168. .for i in ${_PORTCONF:S/|/ /g}
  169. ${i:S/%/ /g}
  170. .endfor
  171. .endif
  172. # End portconf settings

  173. # fastest_cvs -c tw
  174. #   >>  Speed Daemons:
  175. #   - 1st: cvsup6.tw.freebsd.org    117.27 ms
  176. #   - 2st: cvsup10.tw.freebsd.org   117.33 ms
  177. #   - 3st: cvsup7.tw.freebsd.org    117.48 ms
  178. # fastest_cvs -c cn
  179. #>>  Speed Daemons:
  180. #- 1st: cvsup5.cn.freebsd.org    52.30 ms
  181. #
  182. # fastest_cvs -c jp
  183. #>>  Speed Daemons:
  184. #- 1st: cvsup.jp.freebsd.org     98.82 ms
  185. #- 2st: cvsup2.jp.freebsd.org    146.82 ms
  186. #- 3st: cvsup3.jp.freebsd.org    151.98 ms
  187. #
  188. # /usr/ports/graphics/gimp-devel
  189. .if ${.CURDIR:M*/ports/www/apache22}
  190.   WITH_BERKELEYDB=db42
  191. .endif


  192. #[url]http://aur.archlinux.org/packages.php?ID=24958[/url]
  193. # added by use.perl 2009-04-04 21:52:30
  194. PERL_VERSION=5.10.0


复制代码

  1. # -- sysinstall generated deltas -- # Fri Mar 13 07:24:59 2009
  2. # Created: Fri Mar 13 07:24:59 2009
  3. # Enable network daemons for user convenience.
  4. # Please make all changes to this file, not to /etc/defaults/rc.conf.
  5. # This file now contains just the overrides from /etc/defaults/rc.conf.
  6. defaultrouter="192.168.1.1"
  7. gateway_enable="YES"
  8. hostname="mybsd.mybsd.org"
  9. ifconfig_em0="inet 192.168.1.123  netmask 255.255.255.0"
  10. ifconfig_em0_alias0="inet 192.168.1.125  netmask 255.255.255.0"
  11. keymap="us.iso"
  12. linux_enable="YES"
  13. #-----for flash---------------
  14. abi_enable="YES"
  15. #$ nspluginwrapper -v -a -i
  16. #-----for flash end---------------
  17. dbus_enable="YES"
  18. hald_enable="YES"
  19. polkitd_enable="YES"
  20. sshd_enable="YES"
  21. blanktime="100"
  22. saver="daemon"

  23. usbd_enable="YES"

  24. update_motd="YES"
  25. fusefs_enable="YES"

  26. #/etc/netstart #restart network config
  27. #sh /etc/rc    #restart rc config
  28. allscreens_kbdflags="-b off" #disable beep
  29. #allscreens_kbdflags="-b off" #关闭控制台的beep
  30. #kbdcontrol -b off #disable beep

  31. #--------------
  32. powerd_enable="YES"
  33. #powerd_flags="-a adaptive -b adaptive -n adaptive"
  34. powerd_flags="-a min -b min -n min"
  35. #debug.cpufreq.lowest=800
  36. #dev.cpu.0.freq
  37. #temperature
  38. #fan_speed
  39. #--------------

  40. #--------------
  41. #vidcontrol -i mode
  42. #vidcontrol MODE_279
  43. #allscreens_flags="MODE_279" #1024x768x16
  44. #--------------
  45. devd_enable="YES"
  46. #dev.acpi_ibm.0.events=1
  47. ataidle_enable="YES"
  48. ataidle_devices="ad4"
  49. ataidle_ad4="-I 60 -S 120 -A 127 -P 254"
  50. #musicpd_enable="YES"
  51. #proftpd_enable="YES"

  52. #To enable monthly reporting, edit or create /etc/periodic.conf and add this line:
  53. #monthly_statistics_enable="YES"

  54. #To enable boottime reporting, edit or create /etc/rc.conf and add this line:
  55. #bsdstats_enable="YES"

  56. #To enable device reporting, add this line:
  57. #monthly_statistics_report_devices="YES"

  58. #To enable ports reporting, add this line:
  59. #monthly_statistics_report_ports="YES"
  60. #--------------------------
  61. #vidcontrol -m on
  62. #moused -p /dev/cuaa0 -t auto
  63. #--------------------------

  64. #-------- nfs start ------------------
  65. nfs_server_enable="YES"
  66. nfs_server_flags="-u -t -n 4"
  67. mountd_flags="-r"
  68. rpc_statd_enable="YES"
  69. rpc_lockd_enable="YES"
  70. rpcbind_enable="YES"
  71. mountd_enable="YES"
  72. # ---
  73. nfs_client_enable="YES"
  74. nfs_client_flags="-n 4"
  75. #  nfsiod -n 4
  76. # showmount -e 192.168.1.123
  77. # mount_nfs -s -i 192.168.1.123:/home /mnt
  78. #--------- nfs end-----------------

  79. #--------------------------
  80. # smbutil view   //unix@ntserv1 (view)
  81. # smbutil logout //unix@ntserv1
  82. # mount_smbfs  //unix@ntserv1/MP3 /home/axlrose/mp3
  83. #--------------------------

  84. #--------------------------
  85. # tmpfs="AUTO"
  86. # tmpsize="20M"
  87. # tmpfs_flags="-S"
  88. # backupground_fsck="YES"
  89. # backupground_fsck_delay="60"
  90. # syslogd_enable="YES"
  91. # syslogd_flags="-s"
  92. # fsck_y_enable="NO"
  93. # root_rw_mount="YES"
  94. # rc_debug="NO"
  95. # rc_info="YES"
  96. # check_quotas="YES"

  97. #-----process account being-----
  98. #accounting_enable="YES"
  99. #-----process account end-----

  100. #--------------------------
  101. # network_interfaces="auto"
  102. # ppp_enable="YES"
  103. # ppp_mode="ddial"
  104. # ppp_profile="pppoe"
  105. # ppp -background pppoe
  106. #
  107. #firewall_enable="YES"
  108. #firewall_type="open"
  109. # firewall_logging="YES"
  110. # net.inet.ip.fw.verbose_limit=5
  111. # --- open client simple closed  UNKNOWN
  112. # natd_interface="em0"
  113. # natd_enable="YES"
  114. # natd_enable="YES"                   # Enable NATD function
  115. # natd_interface="em0"                # interface name of public Internet NIC
  116. # natd_flags="-dynamic -m"            # -m = preserve port numbers if possible
  117. # natd_flags="-f /etc/natd.conf"
  118. #--------------------------
  119. #synclient touchpadoff=1 #disable pad
  120. #synclient touchpadoff=0 #enable pad

  121. #slim_enable="YES"
  122. #kdm_enable="YES"

  123. #-------pgsql start-----------
  124. #postgresql_enable="YES"
  125. #postgresql_class="postgresql"
  126. #-------pgsql end-----------

  127. #samba_enable="YES"
  128. #proftpd_enable="YES"
  129. #ipa_enable="YES"

  130. #-------swap start-----
  131. # swapfile="/usr/swap0"
  132. # mdconfig -a -t vnode -f /usr/swap0 -u 0 && swapon /dev/md0
  133. #-------swap end-----

  134. #---audit begin ----
  135. #auditd_enable="YES"
  136. #---audit end ----

  137. #---djbdns start---
  138. svscan_enable="YES"
  139. #dnscache-conf nobody nobody /var/service/dnscache 127.0.0.1  #use nobody
  140. #---djbdns end---


  141. #---apache2 start---
  142. #apache2_enable="YES"
  143. #---apache2 end---


  144. #---nagios start---
  145. #nagios_enable="YES"
  146. #---nagios end---
  147. #
  148. #----check dmesg info start---
  149. #  dmesg -a > boot_info.txt
  150. #  vim /var/run/dmesg.boot
  151. #----check dmesg info end---

  152. #----cron start----
  153. cron_enable="YES"
  154. #----cron end----

  155. #---core dump start--
  156. # ulimit -c 0
  157. # sysctl -a|grep core
  158. # kern.coredump: 1
  159. # kern.corefile: /var/crash/%N.%P.core
  160. # kern.corefile: /home/$USER/crash/%N.%P.core
  161. #---core dump end--

  162. #----pf set start---
  163. pf="YES"
  164. #----pf set end---

  165. #---mouse start---
  166. #moused_enable="YES"
  167. #mousechar_start=3
  168. #---mouse end---
  169. #
  170. #---ntop start --
  171. ntop_enable="YES"
  172. #---ntop end --

复制代码


  1. nvidia_load="YES"
  2. #cpufreq_load="YES" ####don't enable
  3. acpi_ibm_load="YES"
  4. #if_ath_load="YES"
  5. #if_wi_load="YES"
  6. snd_driver_load="YES"
  7. ###snd_hda_load="YES"
  8. if_iwn_load="YES"
  9. legal.intel_iwn.license_ack=1
  10. wlan_wep_load="YES"
  11. wlan_ccmp_load="YES"
  12. wlan_tkip_load="YES"
  13. wlan_scan_ap_load="YES"
  14. wlan_scan_ap_load="YES"
  15. wlan_scan_sta_load="YES"

  16. if_bridge_load="YES"
  17. fuse_load="YES"
  18. vesa_load="YES"
  19. autoboot_delay="5" #boot delay sec
  20. #linprocfs_load="YES"<<--don't enable # Linux compatibility process filesystem
  21. #linsysfs_load="YES" <<--don't enable # Linux compatibility system filesystem

  22. #ipfw_load="YES"        <<---don't enable
  23. #loader_logo="beastie"  <<---don't enable
  24. #loader_color="YES"     <<---don't enable
  25. #bitmap_load="YES"
  26. #bitmap_name="/boot/logo.bmp"
  27. #------------------------
  28. # verbose_loading="YES"
  29. # console="vidconsole"
  30. # kern.maxuse="32"
  31. # boot_verbose="YES"
  32. # autoboot_delay="10"
  33. # beastie_disable="NO"
  34. # loader_logo="fbsdbw"
  35. # loader_logo="beastie"
  36. # ng_ubt_load="YES"
  37. #------------------------

复制代码

这是我的,很乱
我最近用FreeBSD后很少进linux系统下了,也讨厌编译,不过没办法的事情,只好忍了
上面是在以前的精华贴找到的设置类似gentoo   /etc/portage/package.use 的东东


PERL_VERSION=5.8.9  <<----这个版本号ports会帮你改的,我用的是最新版
CPUTYPE=prescott       <<--- 我本来也想这么去优化的,结果懒了,就用默认的,我的是T61,看来也试试用gentoo make.conf的设置试试吧
CFLAGS="-O2 -march=prescott -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

还有一个很重要的文件,叫 /usr/ports/UPDATING 文件,非要常用的更新信息
慢慢也适应了bsd桌面
知道你以前是linux用户,所以回复就省去给你说 hald, dbus了哈哈,另外再被上其他的配置

[ 本帖最后由 axlrose 于 2009-4-9 09:40 编辑 ]

评分

参与人数 1可用积分 +10 收起 理由
gvim + 10 精品文章

查看全部评分

论坛徽章:
0
13 [报告]
发表于 2009-04-07 15:36 |只看该作者
十分感谢!刚开始用FreeBSD,就遇见一位高人。我对FreeBSD下面的ports机制了解的非常浅.
还望多多指教!:wink:

论坛徽章:
0
14 [报告]
发表于 2009-04-07 23:21 |只看该作者
这个玫瑰枪炮的配置文件都很强大,看过几次之后至今犹在眼前啊。太强大了

论坛徽章:
2
羊年新春福章
日期:2015-02-04 10:37:51射手座
日期:2015-02-04 10:38:43
15 [报告]
发表于 2009-04-08 00:40 |只看该作者
鼠标没用,可以输入sysinstall命令重新配置一下!

论坛徽章:
0
16 [报告]
发表于 2009-04-10 17:13 |只看该作者
原帖由 LaoLiulaoliu 于 2009-4-6 10:13 发表
我是Thinkpad R61i 7732BGC的笔记本,装的是7.2-BETA1.
我在控制台下面的键盘和鼠标都没有问题,但是一旦startx,键盘和鼠标就都没有反应了,我用Ctrl+Alt+Backspace无法杀死X,而Alt+F1就回到控制台了。
我试了 ...



xorg是7.4吧!!
在xorg.conf的SERVERLAYOUT中加入Option "AllowEmptyInput" "off"就应该搞定了,
就像这样:
Section "ServerLayout"
   Option "AllowEmptyInput" "off"
   Identifier     "X.org Configured"
   Screen      0  "Screen0" 0 0
   InputDevice    "Mouse0" "CorePointer"
   InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

[ 本帖最后由 hplxxm 于 2009-4-10 17:18 编辑 ]

论坛徽章:
1
射手座
日期:2013-08-21 13:11:46
17 [报告]
发表于 2009-05-07 22:22 |只看该作者
原帖由 LaoLiulaoliu 于 2009-4-6 20:57 发表
copy了精灵王帖子里面的配置,不行。
/dev里面只有ums0
/etc/rc.conf里面关于mouse的设置:
moused_type="NO"
moused_enable="NO"

是在/etc/rc.conf里面添加下一行启动hald吗?
hald_enable="YES"



THK U~~~
看帖搞定

论坛徽章:
0
18 [报告]
发表于 2009-05-16 23:02 |只看该作者
在xorg.conf的SERVERLAYOUT中加入Option "AllowEmptyInput" "off"就搞定了
不明白为什么,但很管用
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP