Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 09-27-2012, 06:37 PM   #1
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Xorg thoughts

http://who-t.blogspot.co.uk/2008/07/...-nutshell.html

Writes

Quote:
How to set up input hotplugging
Writing xorg.conf sections is not only boring, it's also quite pointless in most cases. So let's let the server find input devices automagically. The two ingredients are HAL and DBus. At startup, the server queries HAL over DBus for a list of devices and adds them one-by-one.

All you need to do is configure HAL so the server adds the devices with the right options.
You must merge the key input.x11_driver. Look at x11-input.fdi. This file should reside in /etc/hal/fdi/policy/, and it tells HAL to merge the evdev driver for each mouse and keyboard It also merges some Xkb options for keyboards.
Important: the server will not add devices unless they have input.x11_driver set. If you end up with no devices at all, then your HAL setup is probably broken.

To test your installation, run hal-device to obtain a list of all devices and look for the input.x11* keys. If they are not present, modify the fdi file and restart HAL.

Your X server is now hot-plug capable. It will add all mice and keyboards automatically, even if you add/remove them at runtime. There's modified fdi files floating around to add hotplug for wacom tablets and synaptics touchpad, finding them is left as an exercise for the reader.

What to do with the xorg.conf
We have two configuration files now. Yay. One is xorg.conf, the other one is the fdi file. And they both don't know about each other, leading to interesting results. The server parses xorg.conf first, then gets the devices through HAL. And here we have a big culprit: if add a InputDevice section with the mouse driver, it will conflict with the evdev driver. Evdev grabs the files, remember? So when all mice are added through the HAL evdev hotplugging mechanism, all mice stop sending to the /dev/input/mice file. So although you still have a valid input device in the server, it will never emit any events.
The only solution here? Either stop hotplugging alltogether by adding Option "AutoAddDevices" "off" in your ServerLayout, or modify the fdi file that it doesn't merge input.x11_driver for the specific mice you don't want hotplugged (or all mice).
On the kindle 5 we have an xorg that defines the touchscreen device so that needs to be considered also

Quote:

Troubleshooting list:
I have no input devices. HAL setup needs to be configured. Make sure the x11-input.fdi file is in /etc/hal/fdi/policy, and that hal-device lists mice and keyboards with input.x11_driver = "evdev".

My xorg.conf settings are ignored. HAL adds your devices without settings, and evdev grabs all devices away. Modify the fdi and add your settings there, or add Option "AutoAddDevices" "off" to your ServerLayout. Note that this will stop input hotplugging.

I'm getting a "Grab failed" in the logs. You have two evdev input devices pointing to the same device file. This usually only happens if you have a xorg.conf entry with an evdev, and then HAL tries to add the same device again. You can ignore this warning.

I have devices in my xorg.conf but still don't get any devices. Your ServerLayout doesn't reference the input devices and your HAL setup is broken. Add Option "AllowEmptyInput" "off" to your ServerLayout or simply reference the InputDevice sections in the ServerLayout. While you're at it, you may also want to configure HAL.

My touch(pad) is slow. Check the logs if the touchpad is added with the evdev driver. If so, modify the fdi file to merge synaptics as input.x11_driver, or add a InputDevice section in your xorg.conf (must be referenced by the ServerLayout).

Evdev doesn't support option "XYZ". Add a feature request to X.Org Bug 16699. Bugs with patches get preference.
etc... this is possibly worth more thought and consideration.

FYI the file referenced is:

Spoiler:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <device>
  
    <!-- The way this works: 
    
    Match against some input device (see the HAL specification for more 
    information), and then merge in keys, which you can use to specify 
    the configuration similar to the way you would in xorg.conf. You will 
    need to restart HAL after making changes. If you are having issues,
    starting X with the -logverbose 7 flag may yield useful information.
    
    Keys Supported:
    
        Key "input.x11_driver" (string)
            This specifies the driver to use. You MUST specify this option,
            or a driver will not be loaded and the rest will be ignored by
            Xorg
            
        Key "input.x11_options.<option name>" (string)
            This allows you to specify arbitrary options to pass to the driver.
            Anything you would normally specify in xorg.conf goes here. So, for
            option "Mode" in xorg.conf, you would specify the key name of
            "input.x11_options.Mode". 

	    Do not specify "input.x11_options.Device" since "input.device"
	    will be used automatically.

            You MUST specify all options as strings, otherwise the server will
            ignore them.

        Legacy Keys
	     "input.xkb.rules"
             "input.xkb.model"
             "input.xkb.layout"
             "input.xkb.variant"
             "input.xkb.options"
             
            These keys are deprecated. Use these instead:
	     "input.x11_options.XkbRules"
	     "input.x11_options.XkbModel"
	     "input.x11_options.XkbLayout"
	     "input.x11_options.XkbVariant"
	     "input.x11_options.XkbOptions"

	    See the evdev documentation for more information. 
    
    FIXME: Support tablets too. 
    TODO: I think its fixed, can't test
    
    -->
    
    <match key="info.capabilities" contains="input.mouse">
      <merge key="input.x11_driver" type="string">mouse</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.x11_driver" type="string">evdev</merge>
      </match>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="SunOS">
       <match key="input.device" contains="usb">
        <merge key="input.x11_options.StreamsModule" type="string">usbms</merge>
        <merge key="input.x11_options.Protocol" type="string">VUID</merge>
       </match>
      </match>
    </match>

    <match key="info.capabilities" contains="input.keys">
      <merge key="input.x11_options.XkbRules" type="string">base</merge>

      <!-- If we're using Linux, we use evdev by default (falling back to
           kbd otherwise). -->
      <merge key="input.x11_driver" type="string">kbd</merge>
      <merge key="input.x11_options.XkbModel" type="string">pc105</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.x11_driver" type="string">evdev</merge>
        <merge key="input.x11_options.XkbModel" type="string">evdev</merge>
      </match>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="SunOS">
       <match key="input.device" contains="usb">
        <merge key="input.x11_options.StreamsModule" type="string">usbkbm</merge>
        <merge key="input.x11_options.Protocol" type="string">VUID</merge>
       </match>
      </match>

      <merge key="input.x11_options.XkbLayout" type="string">us</merge>

      <merge key="input.x11_options.XkbVariant" type="string" />
    </match>
  </device>
</deviceinfo>


Obviously this isn't directly applicable as-is but perhaps there is milage in this. Perhaps it could be irrelevant. Time will tell. I'm looking for ways of ripping stuff out rather than putting it in - if you were wondering.
Will revisit when I know more. documented for the enlightened or interested reader.

Last edited by twobob; 09-27-2012 at 06:40 PM.
twobob is offline   Reply With Quote
Old 09-27-2012, 11:56 PM   #2
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012464
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
The hotplug stuff in Xorg is somewhat recent (1 year or two?), and has switched backends a couple of times in that timeframe (from HAL to udev, most notably).

You'd need to check the version actually used on the Touch, see if/what applies .
NiLuJe is offline   Reply With Quote
Old 09-28-2012, 07:01 AM   #3
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
I did have a shufty round. looks like HAL only. thanks for all your tips.

Attempting to hack and slash at will.

Something to pummel awesome/xorg into our subservience rather than dominance.
(for shoving rubbish in fbcon)
You know. My usual stuff

Cheers mate.
twobob is offline   Reply With Quote
Reply

Tags
kindle5 xorg

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
X apps run on native touch Xorg. geekmaster Kindle Developer's Corner 88 05-14-2014 07:58 AM
MY thoughts on my new K3 desertgrandma Amazon Kindle 26 09-18-2010 07:25 PM
Got it - First thoughts ChelC Sony Reader 4 02-25-2009 12:03 AM
First thoughts on my V2 lever HanLin eBook 14 09-09-2006 07:01 AM


All times are GMT -4. The time now is 03:18 AM.


MobileRead.com is a privately owned, operated and funded community.