Gentoo Archives: gentoo-user

From: Paul Hartman <paul.hartman+gentoo@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] :-@ Reversing xorg-server, hal and evdev.
Date: Fri, 10 Jul 2009 18:42:01
Message-Id: 58965d8a0907101141m2415a20dqd82abbaf77969cbb@mail.gmail.com
In Reply to: [gentoo-user] :-@ Reversing xorg-server, hal and evdev. by Dale
1 On Fri, Jul 10, 2009 at 11:13 AM, Dale<rdalek1967@×××××.com> wrote:
2 > I tried the new xorg with the hal flag turned on. Let's just say it was
3 > a nightmare, AGAIN. I want my old way back to say it lightly. I put
4 > -hal in package.use for xorg-server. I put my old xorg.conf file back
5 > as well. I re-emerged the keyboard, mouse, video and evdev just in case
6 > it mattered. I also re-emerged xorg-server. My problem you ask. The
7 > nvidia drivers won't load. It defaults to the nv drivers. No splash
8 > screen anymore. Also, my mouse wheel doesn't work anymore either. That
9 > really set me off. I use my wheel as much as I use the left button.
10
11 Maybe it'll help if I give you my setup, which does work. First the
12 most dramatic difference is that I'm using ~amd64 and you're using
13 x86, so there may be some fundamental version differences going on.
14
15 Hardware-wise, I use a USB US-English keyboard, a plain USB mouse with
16 no special features other than 2 buttons and a wheel. I use
17 nvidia-drivers for graphics (GeForce 9600 GT).
18
19 x11-base/xorg-x11 I'm using is version 7.4 and xorg-server version
20 1.6.2 with these USE flags enabled (and all others disabled): hal
21 input_devices_evdev input_devices_joystick input_devices_keyboard
22 input_devices_mouse kdrive nptl sdl video_cards_nv video_cards_nvidia
23 video_cards_vesa xorg
24
25 I have sys-apps/hal version 0.5.12_rc1-r6 with USE="X acpi crypt
26 kernel_linux" and I have it in the DEFAULT runlevel. I also have
27 app-misc/hal-info version 20090414 which contains FDI scripts for HAL.
28
29 In /etc/make.conf I have this: INPUT_DEVICES="joystick keyboard mouse evdev"
30
31 My xorg.conf contains some stuff related to fonts, video driver and
32 screens, but everything input-related is commented out. Also worth
33 noting is the order of loading for different copies of xorg.conf in
34 your system may take, as explained in "man xorg.conf". If you've got a
35 stray config file somewhere, your changes might not even be taking
36 effect because it could be reading a different file entirely.
37
38 I'm using kernel 2.6.30-gentoo-r1, gcc 4.3.3-r2 and glibc-2.10.1. I am
39 not using hardened.
40
41 The profile I'm using is default/linux/amd64/2008.0/desktop
42
43 In my linux kernel config for input devices I've got these set:
44 #
45 # Userland interfaces
46 #
47 CONFIG_INPUT_MOUSEDEV=y
48 CONFIG_INPUT_MOUSEDEV_PSAUX=y
49 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
50 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
51 CONFIG_INPUT_JOYDEV=m
52 CONFIG_INPUT_EVDEV=y
53
54 #
55 # Input Device Drivers
56 #
57 CONFIG_INPUT_KEYBOARD=y
58 CONFIG_KEYBOARD_ATKBD=y
59 CONFIG_INPUT_MOUSE=y
60 CONFIG_MOUSE_PS2=y
61 CONFIG_MOUSE_PS2_ALPS=y
62 CONFIG_MOUSE_PS2_LOGIPS2PP=y
63 CONFIG_MOUSE_PS2_SYNAPTICS=y
64 CONFIG_MOUSE_PS2_LIFEBOOK=y
65 CONFIG_MOUSE_PS2_TRACKPOINT=y
66 CONFIG_MOUSE_SERIAL=m
67 CONFIG_INPUT_JOYSTICK=y
68 CONFIG_JOYSTICK_ANALOG=m
69 CONFIG_INPUT_MISC=y
70 CONFIG_INPUT_PCSPKR=m
71
72
73 in /etc/hal/fdi/policy I have these four files:
74
75 10-input-policy.fdi:
76 <?xml version="1.0" encoding="UTF-8"?>
77
78 <deviceinfo version="0.2">
79
80 <device>
81 <match key="info.capabilities" contains="input">
82 <match key="info.capabilities" contains="button">
83 <match key="info.addons.singleton" contains_not="hald-addon-input">
84 <append key="info.addons.singleton"
85 type="strlist">hald-addon-input</append>
86 </match>
87 </match>
88 <match key="info.capabilities" contains="input.keys">
89 <match key="info.addons.singleton" contains_not="hald-addon-input">
90 <append key="info.addons.singleton"
91 type="strlist">hald-addon-input</append>
92 </match>
93 <match key="info.capabilities" contains_not="button">
94 <append key="info.capabilities" type="strlist">button</append>
95 </match>
96 </match>
97 </match>
98 </device>
99
100 </deviceinfo>
101
102
103 10-keymap.fdi:
104 <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
105 <deviceinfo version="0.2">
106 <device>
107 <match key="info.capabilities" contains="input.keymap">
108 <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
109 </match>
110
111 <match key="info.capabilities" contains="input.keys">
112 <merge key="input.xkb.rules" type="string">base</merge>
113
114 <!-- If we're using Linux, we use evdev by default (falling back to
115 keyboard otherwise). -->
116 <merge key="input.xkb.model" type="string">keyboard</merge>
117 <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
118 string="Linux">
119 <merge key="input.xkb.model" type="string">evdev</merge>
120 </match>
121
122 <merge key="input.xkb.layout" type="string">us</merge>
123 <merge key="input.xkb.variant" type="string" />
124 </match>
125 </device>
126 </deviceinfo>
127
128
129 10-ntfs3g.fdi (this one has nothing to do with X):
130 <?xml version="1.0" encoding="UTF-8"?>
131 <deviceinfo version="0.2">
132 <device>
133 <match key="volume.fstype" string="ntfs">
134 <merge key="volume.fstype" type="string">ntfs-3g</merge>
135 </match>
136 </device>
137 </deviceinfo>
138
139
140 10-x11-input.fdi:
141 <?xml version="1.0" encoding="ISO-8859-1"?>
142 <deviceinfo version="0.2">
143 <device>
144 <!-- FIXME: Support tablets too. -->
145 <match key="info.capabilities" contains="input.mouse">
146 <merge key="input.x11_driver" type="string">mouse</merge>
147 <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
148 string="Linux">
149 <merge key="input.x11_driver" type="string">evdev</merge>
150 <merge key="input.x11_options.ZAxisMapping" type="string">4 5
151 6 7</merge>
152 </match>
153 </match>
154
155 <match key="info.capabilities" contains="input.keys">
156 <!-- If we're using Linux, we use evdev by default (falling back to
157 keyboard otherwise). -->
158 <merge key="input.x11_driver" type="string">keyboard</merge>
159 <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
160 string="Linux">
161 <merge key="input.x11_driver" type="string">evdev</merge>
162 <merge key="input.x11_options.AutoRepeat" type="string">500 30</merge>
163 </match>
164 </match>
165 </device>
166 </deviceinfo>
167
168
169
170 Every time I recompile/upgrade xorg-server, I do this:
171 sudo emerge -1 `qlist -I -C x11-drivers/`
172 Which in my case includes these packages:
173 x11-drivers/nvidia-drivers-185.18.14
174 x11-drivers/xf86-input-evdev-2.2.2
175 x11-drivers/xf86-input-joystick-1.4.0
176 x11-drivers/xf86-input-keyboard-1.3.2
177 x11-drivers/xf86-input-mouse-1.4.0
178 x11-drivers/xf86-video-nv-2.1.12
179 x11-drivers/xf86-video-vesa-2.2.0
180
181
182 to rebuild the x11-drivers (without doing that, you can be stuck with
183 the dead mouse/keyboard situation). After they rebuild, I quit X,
184 "rmmod nvidia", then start X which will load the rebuilt
185 nvidia-drivers module.
186
187 Then I happily use my working Xorg :)
188
189 HTH