不使用 HAL 配置 X 输入设备解决了崩溃问题

在 FreeBSD 8.1 系统里使用 X 图形系统,当处置的USB鼠标插入后,不一会X就崩溃了。测试发现是鼠标的问题,而且发现只有部分USB鼠标会引发这样的问题。

X图形系统的配置文件是通过 Xorg -configure 生成的,默认是使用 HAL 获取设备信息并增加的。在 Pagxir 的建议下,我手动指定输入设备信息,不使用 HAL 自动配置,问题解决。

X 配置文件

Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection
 
Section "ServerFlags"
	Option "AutoAddDevices" "off"
	Option "AutoEnableDevices" "off"
EndSection
 
Section "Files"
	ModulePath   "/usr/local/lib/xorg/modules"
	FontPath     "/usr/local/lib/X11/fonts/misc/"
	FontPath     "/usr/local/lib/X11/fonts/TTF/"
	FontPath     "/usr/local/lib/X11/fonts/OTF"
	FontPath     "/usr/local/lib/X11/fonts/Type1/"
	FontPath     "/usr/local/lib/X11/fonts/100dpi/"
	FontPath     "/usr/local/lib/X11/fonts/75dpi/"
	FontPath     "/usr/local/lib/X11/fonts/cyrillic/"
	FontPath     "/usr/local/lib/X11/fonts/bitstream-vera/"
	FontPath     "/usr/local/lib/X11/fonts/wqy/"
	FontPath     "/usr/local/lib/X11/fonts/ubuntu-font-family/"
EndSection
 
Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection
 
Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/sysmouse"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection
 
Section "Module"
	Load  "dbe"
	Load  "dri"
	Load  "dri2"
	Load  "extmod"
	Load  "glx"
	Load  "record"
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"
        ### [arg]: arg optional
        #Option     "NoAccel"            	# [<bool>]
        #Option     "SWcursor"           	# [<bool>]
        #Option     "ColorKey"           	# <i>
        #Option     "CacheLines"         	# <i>
        #Option     "Dac6Bit"            	# [<bool>]
        #Option     "DRI"                	# [<bool>]
        #Option     "NoDDC"              	# [<bool>]
        #Option     "ShowCache"          	# [<bool>]
        #Option     "XvMCSurfaces"       	# <i>
        #Option     "PageFlip"           	# [<bool>]
	Identifier  "Card0"
	Driver      "intel"
	VendorName  "Intel Corporation"
	BoardName   "Mobile 4 Series Chipset Integrated Graphics Controller"
	BusID       "PCI: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

建议停止使用 HAL
删除 /etc/rc.conf 中如下内容

hald_enable="YES"

Over!

One thought on “不使用 HAL 配置 X 输入设备解决了崩溃问题”

Leave a Reply

Your email address will not be published. Required fields are marked *