From: Kjetil K. <kj...@kj...> - 2003-10-29 21:06:32
|
Honorable Kernel Hackers, I hope you do not mind a "user"-question from a newbie...? I'm working to set up my system according to the XFree Local Multi-User HOWTO, and it says in the final notes that I could try here if I need help... :-) I've been working on it for a couple of weeks, actually. I guess I have a little too much of the Perl Programmer's Hubris, but then, it is the only way me and my girlfriend can afford and have space for another seat, and she needs to get some work done to... :-) Also, I don't think what remains is a kernel problem, more likely an X problem. I think I've been through all the pitfalls that one can possibly be going into. Since I'm on Debian Sid, I've been bothering Andreas Schuldei a lot. I'm using his great packages. To do the short version first: Everything seems to work fine, except that when I try to get KDM to launch the two X servers, the first server comes up fine, but the second does not. Instead, the server takes the whole CPU, but apparently does nothing. If I kill the second X-server with -9, it comes back up and then it runs fine on the second screen, but the first locks up and the first X server runs along. There are tons of messages like: (EE) MGA(0): [dri] Idle timed out, resetting engine... in my logs afterwards. Now, for the details: My system has a Matrox G450 DH and Mystique card. Since I'm now going for a 2.4 kernel (I'll (re)turn to 2.6 later, for sure!), I'm not trying to use the second head of the G450. Rather, I'm trying to use the Mystique for the second user. I have a Logitech Keyboard on the normal PS/2 port, then a cheap keyboard on the usual mouse PS/2 port. I have two mice connected on the USB ports. I might want to change this setup later, but I don't want to buy a USB keyboard. One of the things Svetoslav asks for at http://tldp.org/HOWTO/XFree-Local-multi-user-HOWTO/final_words.html is contents of /proc/bus/input/devices, and since this sums up the setup rather nice, I paste it here: I: Bus=0011 Vendor=0001 Product=0002 Version=ab02 N: Name="AT Set 2 keyboard" P: Phys=isa0060/serio0/input0 H: Handlers=kbd event0 B: EV=120003 B: KEY=4 2000000 8061f9 fbc9d621 efdfffdf ffefffff ffffffff fffffffe B: LED=7 I: Bus=0011 Vendor=0001 Product=0002 Version=ab83 N: Name="AT Set 2 keyboard" P: Phys=isa0060/serio1/input0 H: Handlers=kbd event1 B: EV=120003 B: KEY=4 2000000 8061f9 fbc9d621 efdfffdf ffefffff ffffffff fffffffe B: LED=7 I: Bus=0003 Vendor=046d Product=c00e Version=1110 N: Name="Logitech USB-PS/2 Optical Mouse" P: Phys=usb-00:04.2-1/input0 H: Handlers=mouse0 event2 B: EV=7 B: KEY=70000 0 0 0 0 0 0 0 0 B: REL=103 I: Bus=0003 Vendor=09da Product=0006 Version=0001 N: Name="A4Tech USB Optical Mouse" P: Phys=usb-00:04.2-2/input0 H: Handlers=mouse1 event3 B: EV=7 B: KEY=7f0000 0 0 0 0 0 0 0 0 B: REL=103 BTW, /proc/bus/usb/devices does not exist on my system, and cat /proc/bus/console/*/* says isa0060/serio0/input0 isa0060/serio1/input0 This looks good, doesn't it? (I'll paste in just the things that I assume is relevant, the rest I'll attach. Hope that's OK. XFree86.[12].logs I had to trim, this mail is large enough as it is.) I've configured Xinerama, and it works fine. I have preferred keeping the whole X config in a single file, so I take the approach with specifying different "layouts". I maintain four different layouts, "Simple", "Xinerama", "X0" and "X1". The two latter are the ones for the multi-user config. They look like this: Section "ServerLayout" Identifier "X0" Screen 0 "Screen0" 0 0 InputDevice "Mouse0" "CorePointer" InputDevice "Keyboard0" "CoreKeyboard" Option "PrefBusID" "1:5:0" EndSection Section "ServerLayout" Identifier "X1" Screen 0 "Screen1" 0 0 InputDevice "Mouse1" "CorePointer" InputDevice "Keyboard1" "CoreKeyboard" Option "PrefBusID" "0:11:0" EndSection devfs is up and running, allthough there are some weird issues; specifically mount doesn't report that devfs is mounted, whereas /proc/mounts does. This put me off for a long time. It is easy enough to get X running on either screen with corresponding keyboard and mouse. Also, I have been able to run it on both, simultaneously, running startx -- /usr/X11R6/bin/X1 :1 -layout X1 vt8 & startx -- /usr/X11R6/ bin/X0 :0 -layout X0 vt7 I could type on both keyboards, it showed on their respective screens. Mice worked. So far, so good, it seems, but then I tried to get KDM to start them for me, by adding the following lines to /etc/kde3/kdm/Xservers: :0 local /usr/bin/nice -n -10 /usr/X11R6/bin/X0 :0 -layout X0 -deferglyphs 16 vt7 :1 local /usr/bin/nice -n -9 /usr/X11R6/bin/X1 :1 -layout X1 vt9 Booting up, things go wrong. X comes slowly up, but only on one screen. Upon inspection, it is clear why it is so slow, because the X1 process runs at 99% of the CPU according to top. Other than that, things are normal on the display that is running, but obviously, the idea was to have both... :-) In syslog, I find things like this: Oct 29 16:04:15 owl kdm[720]: Hung in XOpenDisplay(:1), aborting Oct 29 16:04:15 owl kdm[720]: server open failed for :1, giving up Oct 29 16:04:15 owl kdm[686]: Display :1 cannot be opened I didn't really have much of an idea on where to start, but I noticed two things. One thing was that in kdm.log, I found lines: (EE) MGA(0): Need at least 4608 kB video memory at this resolution, bit depth (My G450 has 16MB, I don't know what the Mystique has). So, I tried setting the bit depth to 8 and the resolution for both cards to 800x600. That didn't help, and besides, I run Xinerama at 16 bpp and 1280x960 and 1024x768 respectively, so that shouldn't suddenly be a problem, I figured. Turned it back up. Then, I was in doubt whether I had entered the PCI bus id's correctly. The autoconfig I ran when making the Xinerama config had them in the form PCI:0:11:0, but in the examples, the PrefBusID strings did not have the PCI:-prefix. I had left it like that initially, as it seems to be that way in the examples. However, I see lines like (WW) MGA: No matching Device section for instance (BusID PCI:1:5:0) found (WW) MGA: No matching Device section for instance (BusID PCI:0:11:0) found in both kdm.log and XFree86.?.log. Then, I figured, they should probably be the same in the BusID-field and PrefBusID, so I changed them to what they are now. That didn't seem to have any appreciable effect either, though. Then, I don't know what Primary Device is, but in XFree86.1.log (i.e. the log of the secondary card), I see (II) Primary Device is: PCI 01:05:0 Yep, this is the ID of the primary card (the G450), but I don't know if the secondary card should care... :-) Well, I was pretty much out of ideas at this point, but I got the bright (?) idea that I would kill the X1 server to see what happened. Wow, the other monitor came up, and I could type at it an use the mouse and everything! :-) The state of bliss was short, however, because the primary display had frozen... Again, the X server had run off, this time the X0 server. This was what top looked like at some point: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 721 root 20 -10 54532 12m 1904 R 97.7 2.4 18:55.21 X0 881 root 5 -9 19772 9516 1856 S 1.0 1.8 0:09.79 X1 So, apparently, I can only run one at a time, and kdm will restart an X server if killed, and the other will run off wildly... Well, that's about all I've got. I'll list a few of the pitfalls I've been in and send it to Svetoslav as soon as I get around to do it, to help others avoid them. I'll be very thankful for any help you hackers can provide so I get this system up and running! Best, Kjetil -- Kjetil Kjernsmo Astrophysicist/IT Consultant/Skeptic/Ski-orienteer/Orienteer/Mountaineer kj...@kj... web...@sk... ed...@le... Homepage: http://www.kjetil.kjernsmo.net/ OpenPGP KeyID: 6A6A0BBC |