multihead, xorg, and bluetooth keyboard failure

Yan Seiner yan at seiner.com
Sun Nov 22 16:33:45 PST 2009


Yan Seiner wrote:
> I am running a multi-seat config where I have one x server running two 
> heads on one card and a second x server running a single head on 
> another card.
>
> yan at selene:~/xorg$ ps auxwww | grep X
> root 14256 0.6 0.4 623896 17232 tty8 Ss+ Nov21 3:26 /usr/local/bin/X 
> :3 -config /etc/mdm/xorg.conf.nvidia -audit 0 -layout Myth -novtswitch 
> -sharevts -noreset -auth /var/lib/gdm/:3.Xauth -nolisten tcp vt8
> root 30415 0.1 0.3 632500 12780 tty9 Ss+ Nov17 12:41 /usr/local/bin/X 
> :0 -config /etc/mdm/xorg.conf.nvidia -noreset -auth 
> /var/lib/gdm/:0.Xauth -nolisten tcp vt9
>
> The server on :0 further runs a couple of Xephyr sessions, but that's 
> not relevant to the issue.
>
> My problem is with the server on :3. It uses a bluetooth keyboard. 
> When the bluetooth keyboard goes to sleep, the /dev/input/event* 
> device disappears., Once I touch a key, the bluetooth subsystem 
> creates the device again, but X never picks it up.
>

OK I got it fixed, but it's a horrendous kludge.

first off, find out what HAL calls your keyboard.  Then create 
10-x11-keyboard.fdi in

/usr/share/hal/fdi/policy/10osvendor

the second match is the one that matches your bluetooth keyboard

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <!-- FIXME: Support tablets too. -->
    <match key="info.capabilities" contains="input.keyboard">
     <match key="info.product" contains="Broadcom Corp.   Keyboard">
      <merge key="input.x11_driver" type="string">keyboard</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.x11_driver" type="string">evdev</merge>
       </match>
      </match>
    </match>
  </device>
</deviceinfo>

Then change xorg.conf to allow AutoAddDevices for the layout that's 
running the bluetooth keyboard, and remove the input device from the 
layout.  Make sure all other layouts have AutoAddDevices off.

Section "ServerLayout"
    Identifier     "myth"
    Screen      0  "Screen2" 0 0
#    InputDevice    "MouseMyth" "CorePointer"
#    InputDevice    "KeyboardMyth" "CoreKeyboard"
    Option         "SingleCard" "yes"
    Option "AutoAddDevices" "On"
    Option   "AIGLX"   "true"
    Option         "xinerama" "false"
EndSection

Bingo - autodetected bluetooth.

But it allows only a single bluetooth keyboard on the entire system, and 
only one X server can autodetect devices.

What's really needed is to allow each X server to pick from a set of 
allowable devices, not from the entire pool of input devices attached to 
the system.

If you just turn AutoAddDevices on and set HAL up to funnel all 
keyboards to input.x11_driver, then the X server will use every single 
keyboard.  Including the ones that are already attached to other X servers.

There must be a better way.

-- 

   o__
   ,>/'_         o__
   (_)\(_)       ,>/'_          o__
A day may come  (_)\(_)         ,>/'_      o__
when the courage of men fails, (_)\(_)     ,>/'_ 
when we forsake our friends and break all (_)\(_)
bonds of fellowship, but it is not this day.
It is not this day!
This day we ride!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Xorg.3.log
Type: text/x-log
Size: 274191 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20091122/f3cde998/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xorg.conf.nvidia
URL: <http://lists.x.org/archives/xorg/attachments/20091122/f3cde998/attachment.ksh>


More information about the xorg mailing list