Subject: Re: multiuser X 4.1.0
To: Matthias Pfaller <leo@lethe.dachau.marco.de>
From: Wojciech Puchar <wojtek@wojtek.3miasto.net>
List: port-i386
Date: 09/07/2001 08:21:11
> =09wojtek@wojtek.3miasto.net (Wojciech Puchar) writes:
> > keyboard is the only thing left now to make multiuser X fully working
> > my XF86Config in attachment. source patch below:
>
> I made a similar patch to get rid of the console association, but I hadn'=
t
> found about the pci issues so far. My patch only touches one file. It add=
s
> a "-noconsole" option to the server. Together with your patch to xf86pciB=
us.c

same as mine!

> and

>
> =09pckbc0=09at isa? =09=09=09# PC keyboard controller
> =09pckbd0=09at pckbc0 slot 0=09=09# PC keyboard
> =09pckbd1=09at pckbc0 slot 1=09=09# PC keyboard
  ^^^^^^^^^^^^^^^^^^^^^^

HOW DID YOU DO IT?!!!! physically?

> =09wskbd0=09at pckbd0 console ? mux 1
> =09wskbd1=09at pckbd1 console ? mux 3
>
> =09# USB Mice
> =09ums*=09at uhub? port ? configuration ? interface ?
> =09wsmouse0=09at ums? mux 0
> =09wsmouse1=09at ums? mux 2
> =09wsmouse2=09at ums? mux 4
>
> =09# USB Keyboards
> =09ukbd*=09at uhub? port ? configuration ? interface ?
> =09wskbd2=09at ukbd? console ? mux 5
> =09pseudo-device=09wsmux=096=09=09# mouse & keyboard multiplexor pseudo-d=
evices
>
> in my config file I was able to run two X servers with two graphic
> boards and two keyboards on my machine. I still have to get some USB
> mice. For the first tests I just run without mice. Connecting a second
> keyboard to the mouseport worked like a charm. It looks like the X server
> will not work with the raw keyboard devices. I had to specify the mux dev=
ices
> in XF86Config.


good!!! your patch is MUCH better than mine. what about including it in
NetBSD snapshot?

and how to use mux? what should i put in XF86Config?





> Regards, Matthias
>
> --- bsd_init.c=09Fri Aug 10 12:17:16 2001
> +++ /tmp/bsd_init.c=09Tue Sep  4 17:00:13 2001
> @@ -34,6 +34,7 @@
>  #include "xf86_OSlib.h"
>
>  static Bool KeepTty =3D FALSE;
> +static Bool NoConsole =3D FALSE;
>  static int devConsoleFd =3D -1;
>  static int VTnum =3D -1;
>  static int initialVT =3D -1;
> @@ -173,11 +174,20 @@
>  =09}
>
>  =09/* detect which driver we are running on */
> +=09if (NoConsole)
> +=09{
> +=09=09xf86Info.consType =3D WSCONS;
> +=09=09xf86Msg(X_PROBED, "Using wscons NoConsole driver\n");
> +=09=09fd =3D xf86Info.kbdFd;
> +=09}
> +=09else
> +=09{
>  =09for (driver =3D xf86ConsTab; *driver; driver++)
>  =09{
>  =09    if ((fd =3D (*driver)()) >=3D 0)
>  =09=09break;
>  =09}
> +=09}
>
>  =09/* Check that a supported console driver was found */
>  =09if (fd < 0)
> @@ -685,6 +695,12 @@
>  =09=09return(1);
>  =09}
>  #endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
> +
> +=09if (!strcmp(argv[i], "-noconsole"))
> +=09{
> +=09=09NoConsole =3D TRUE;
> +=09=09return(1);
> +=09}
>  =09return(0);
>  }
>
> @@ -696,5 +712,7 @@
>  #endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
>  =09ErrorF("-keeptty               ");
>  =09ErrorF("don't detach controlling tty (for debugging only)\n");
> +=09ErrorF("-noconsole             ");
> +=09ErrorF("don't attach to a console\n");
>  =09return;
>  }
> --- xf86pciBus.c=09Fri Aug 10 12:15:44 2001
> +++ /tmp/xf86pciBus.c=09Tue Sep  4 17:02:01 2001
> @@ -534,9 +534,11 @@
>  #ifdef DEBUG
>      ErrorF("pciIoAccessDisable: 0x%05lx\n", *(PCITAG *)arg);
>  #endif
> +#if 0
>      ((pciArg*)arg)->ctrl &=3D ~SETBITS;
>      ((pciArg*)arg)->func(((pciArg*)arg)->tag, PCI_CMD_STAT_REG,
>  =09=09=09 ((pciArg*)arg)->ctrl);
> +#endif
>  }
>
>  #undef SETBITS
> @@ -558,9 +560,11 @@
>  #ifdef DEBUG
>      ErrorF("pciIo_MemAccessDisable: 0x%05lx\n", *(PCITAG *)arg);
>  #endif
> +#if 0
>      ((pciArg*)arg)->ctrl &=3D ~SETBITS;
>      ((pciArg*)arg)->func(((pciArg*)arg)->tag, PCI_CMD_STAT_REG,
>  =09=09=09 ((pciArg*)arg)->ctrl);
> +#endif
>  }
>
>  #undef SETBITS
> @@ -582,9 +586,11 @@
>  #ifdef DEBUG
>      ErrorF("pciMemAccessDisable: 0x%05lx\n", *(PCITAG *)arg);
>  #endif
> +#if 0
>      ((pciArg*)arg)->ctrl &=3D ~SETBITS;
>      ((pciArg*)arg)->func(((pciArg*)arg)->tag, PCI_CMD_STAT_REG,
>  =09=09=09 ((pciArg*)arg)->ctrl);
> +#endif
>  }
>  #undef SETBITS
>
> @@ -3141,4 +3147,3 @@
>      else
>  =09pciWriteLong(tag, PCI_CMD_STAT_REG, temp & ~PCI_CMD_MASTER_ENABLE);
>  }
> -
> --
> Matthias Pfaller                            Software Entwicklung
> marco Systemanalyse und Entwicklung GmbH    Tel   +49 8131 5161-41
> Hans-B=F6ckler-Str. 2, D 85221 Dachau         Fax   +49 8131 5161-66
> http://www.marco.de/                        Email leo@dachau.marco.de
>