Al Johnson wrote:
On Thursday 25 June 2009, Tim Abell wrote:
Hi all,

I've got my bt keyboard connected, and according to hcidump I think the
keypress events are getting to bluez, however they aren't getting to any
applications, including xev.

Does anyone know what I need to do to troubleshoot this?

Sounds like bug #1796 [1]. It's the parameters passed when starting X that are the problem, and affects USB keyboards too. Look in /etc/X11/Xserver and compare with the diff below - beware line wrap. If this is the problem then please file a bug report.

--- a/packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/Xserver
+++ b/packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/Xserver
@@ -93,7 +93,7 @@ case `module_id` in
                 modprobe mbxfb
                 ARGS="$ARGS -br -fb /dev/fb1" ;;
         "GTA01" | "GTA02")
-                ARGS="$ARGS -dpi 285 -screen 480x640 -hide-cursor -root-
ppm/usr/share/pixmaps/xsplash-vga.ppm vt1" ;;
+                ARGS="$ARGS -dpi 285 -screen 480x640 -hide-cursor -br" ;;
         "Motorola Ezx Platform")
ARGS="$ARGS -dpi 170 -screen 240x320 -hide-cursor -root-ppm /usr/share/pixmaps/xsplash-qvga.ppm vt1" ;;
         "Nokia N800")


[1] http://docs.openmoko.org/trac/ticket/1796

Thanks Al,

My Xserver file isn't exactly the same, but I tried to make matching changes:

r...@om-gta02:/etc/X11# diff Xserver.orig Xserver
--- Xserver.orig    Thu Jun 25 19:36:17 2009
+++ Xserver    Fri Jun 26 23:30:27 2009
@@ -113,7 +113,7 @@
                else
                     DPI=140
                fi
- ARGS="$ARGS -dpi ${DPI} -screen ${SCREEN_SIZE} -mouse tslib -hide-cursor -root-ppm /usr/share/pixmaps/xsplash-vga.ppm vt1" + ARGS="$ARGS -dpi ${DPI} -screen ${SCREEN_SIZE} -hide-cursor -br"
        XSERVER=/usr/bin/Xglamo
        ;;
    "Nokia N770")


I've attached the two versions, the original from my phone (.orig) and my attempt at modifying it (.bluetooth)

The changes don't appear to have helped.

Tim

#!/bin/sh
#

# note xinit needs full server path
if [ -f /usr/bin/Xfbdev ]; then
  XSERVER=/usr/bin/Xfbdev
fi
if [ -f /usr/bin/Xepson ]; then
  XSERVER=/usr/bin/Xepson
fi
if [ -f /usr/bin/Xorg ]; then
  XSERVER=/usr/bin/Xorg
fi

. /etc/profile

fallback_screen_arg() {
    geom=`fbset | grep geometry`
    w=`echo $geom | awk '{ print $2 }'`
    h=`echo $geom | awk '{ print $3 }'`
    b=`echo $geom | awk '{ print $6 }'`
    echo -n "${w}x${h}x${b}"
}

screen_width() {
    geom=`fbset | grep geometry`
    w=`echo $geom | awk '{ print $2 }'`
    echo -n "${w}"
}


module_id() {
    ## used to read from assets, but sometimes assets is corrupted
    # grep "Module ID" /proc/hal/assets | sed "s/.*://"
    ## used to read from /proc/hal/model, but that is removed in 2.6
    # echo ' iPAQ' `cat /proc/hal/model`
    awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo
}

export USER=root

SCREEN_SIZE=`fallback_screen_arg`

ARGS=" -br -pn"

# use ucb 1x00 touchscreen if present
if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/touchscreen/ucb1x00 ]; then
  ARGS="$ARGS -mouse /dev/touchscreen/ucb1x00"
fi

# use usb mouse if present
# Xorg doesn't support "-mouse" option, and uses /dev/input/mice automatically
if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/input/mice ] && [ "$XSERVER" != "Xorg" 
]; then
  ARGS="$ARGS -mouse /dev/input/mice"
fi

# start off server in conventional location.
case `module_id` in
        "HP iPAQ H3100" | "HP iPAQ H3800")
                ARGS="$ARGS -dpi 100 -rgba vrgb -screen ${screen_si...@90" ;;
        "HP iPAQ H3600" | "HP iPAQ H3700" | "HP iPAQ H3900")
                ARGS="$ARGS -dpi 100 -rgba vbgr -screen ${screen_si...@270" ;;
        "HP iPAQ H5400" | "HP iPAQ H2200")
                ARGS="$ARGS -dpi 100 -rgba rgb" ;;
        "HP iPAQ HX4700")
                ARGS="$ARGS -dpi 200"
                IMAGEON="w3220"
                ;;
        "Ramses")
                # What is this "vt2" in aid of?
                ARGS="$ARGS -dpi 100 -rgba vrgb -screen ${screen_si...@90 vt2" 
;;
        # both 'Sharp-Collie' and just 'Collie' have been reported
        *Poodle)
                ARGS="$ARGS -dpi 100 -rgba vrgb -screen ${screen_si...@270" ;;
        *Collie)
                ARGS="$ARGS -dpi 100 -rgba vrgb -screen ${screen_si...@270" ;;
        "SHARP Shepherd" | "SHARP Husky" | "SHARP Corgi")
                if [ `screen_width` -gt 330 ] ; then
                     DPI=200
                else
                     DPI=100
                fi 
                ARGS="$ARGS -dpi ${DPI} -rgba rgb"
                IMAGEON="w100"
                ;;
        "SHARP Spitz" | "SHARP Akita" | "SHARP Borzoi")
                ARGS="$ARGS -dpi 200 -rgba rgb -screen ${screen_si...@270" ;;
        "Simpad")
                ARGS="$ARGS -dpi 100 -rgba rgb" ;;
        "Generic OMAP1510/1610/1710")
                ARGS="$ARGS -dpi 220 -mouse /dev/input/event0" ;;
        "Cellon C8000 Board")
                ARGS="$ARGS -dpi 100 -screen ${SCREEN_SIZE},10,1" ;;
        "HTC Magician")
                ARGS="$ARGS -dpi 142" ;;
        "HTC Universal")
                ARGS="$ARGS -dpi 225 -screen ${screen_si...@270" ;;
        "ARM-IntegratorCP" | "ARM-Versatile PB")
                ARGS="$ARGS -rgba vrgb" ;;
        "Compulab CM-x270")
                modprobe mbxfb
                ARGS="$ARGS -fb /dev/fb1" ;;
        "GTA01")
                if [ `screen_width` -gt 330 ] ; then
                     DPI=285
                else
                     DPI=140
                fi 
                ARGS="$ARGS -dpi ${DPI} -screen ${SCREEN_SIZE} -mouse tslib 
-hide-cursor -root-ppm /usr/share/pixmaps/xsplash-vga.ppm vt1" ;;
       "GTA02")
                if [ `screen_width` -gt 330 ] ; then
                     DPI=285
                else 
                     DPI=140
                fi 
                ARGS="$ARGS -dpi ${DPI} -screen ${SCREEN_SIZE} -mouse tslib 
-hide-cursor -root-ppm /usr/share/pixmaps/xsplash-vga.ppm vt1" 
                XSERVER=/usr/bin/Xglamo 
                ;;
        "Nokia N770")
                ARGS="$ARGS -dpi 225 -screen ${SCREEN_SIZE} -mouse tslib" 
                XSERVER=/usr/bin/Xomap ;;
        "Nokia N800")
                ARGS="$ARGS -dpi 225 -screen ${SCREEN_SIZE} -mouse tslib" 
                XSERVER=/usr/bin/Xomap ;;
        "Palm Treo 650")
                if [ -f "/usr/share/pixmaps/xsplash-qvga-square.ppm" ]; then
                  PPM="-root-ppm /usr/share/pixmaps/xsplash-qvga-square.ppm"
                fi
                ARGS="$ARGS -dpi 181 -screen 320x320 -hide-cursor $PPM" ;;
        "Motorola Ezx Platform")
                ARGS="$ARGS -dpi 170 -screen ${SCREEN_SIZE} -hide-cursor -mouse 
tslib -root-ppm /usr/share/pixmaps/xsplash-qvga.ppm vt1" ;;
        "Glofiish M800")
                ARGS="$ARGS -dpi 285 -screen ${SCREEN_SIZE} -mouse tslib 
-hide-cursor -root-ppm /usr/share/pixmaps/xsplash-vga.ppm vt1" ;;
        "Freescale MX21ADS")
         # That's what /proc/cpuinfo shows as hardware on the chumby
                ARGS="$ARGS -dpi 121 -screen 320x240 -hide-cursor -mouse tslib 
-root-ppm /usr/share/pixmaps/xsplash-qvga.ppm vt1" ;;

        *)
                # It is a device we do not know about, in which case we force
                # kdrive to use the current framebuffer geometry -- otherwise
                # it will default to trying to achieve 1024x768
                S=${SCREEN_SIZE}
                ARGS="$ARGS -screen $S" ;;
esac

if [ ! -z "$IMAGEON" ]; then
  if [ -f /usr/bin/Xw100 ]; then
    XSERVER=/usr/bin/Xw100
  fi
  if [ -f /usr/bin/Ximageon ]; then
    XSERVER=/usr/bin/Ximageon
  fi
fi

DISPLAY=':0'

exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $* >/tmp/x.log 2>&1

#!/bin/sh
#

# note xinit needs full server path
if [ -f /usr/bin/Xfbdev ]; then
  XSERVER=/usr/bin/Xfbdev
fi
if [ -f /usr/bin/Xepson ]; then
  XSERVER=/usr/bin/Xepson
fi
if [ -f /usr/bin/Xorg ]; then
  XSERVER=/usr/bin/Xorg
fi

. /etc/profile

fallback_screen_arg() {
    geom=`fbset | grep geometry`
    w=`echo $geom | awk '{ print $2 }'`
    h=`echo $geom | awk '{ print $3 }'`
    b=`echo $geom | awk '{ print $6 }'`
    echo -n "${w}x${h}x${b}"
}

screen_width() {
    geom=`fbset | grep geometry`
    w=`echo $geom | awk '{ print $2 }'`
    echo -n "${w}"
}


module_id() {
    ## used to read from assets, but sometimes assets is corrupted
    # grep "Module ID" /proc/hal/assets | sed "s/.*://"
    ## used to read from /proc/hal/model, but that is removed in 2.6
    # echo ' iPAQ' `cat /proc/hal/model`
    awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo
}

export USER=root

SCREEN_SIZE=`fallback_screen_arg`

ARGS=" -br -pn"

# use ucb 1x00 touchscreen if present
if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/touchscreen/ucb1x00 ]; then
  ARGS="$ARGS -mouse /dev/touchscreen/ucb1x00"
fi

# use usb mouse if present
# Xorg doesn't support "-mouse" option, and uses /dev/input/mice automatically
if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/input/mice ] && [ "$XSERVER" != "Xorg" 
]; then
  ARGS="$ARGS -mouse /dev/input/mice"
fi

# start off server in conventional location.
case `module_id` in
        "HP iPAQ H3100" | "HP iPAQ H3800")
                ARGS="$ARGS -dpi 100 -rgba vrgb -screen ${screen_si...@90" ;;
        "HP iPAQ H3600" | "HP iPAQ H3700" | "HP iPAQ H3900")
                ARGS="$ARGS -dpi 100 -rgba vbgr -screen ${screen_si...@270" ;;
        "HP iPAQ H5400" | "HP iPAQ H2200")
                ARGS="$ARGS -dpi 100 -rgba rgb" ;;
        "HP iPAQ HX4700")
                ARGS="$ARGS -dpi 200"
                IMAGEON="w3220"
                ;;
        "Ramses")
                # What is this "vt2" in aid of?
                ARGS="$ARGS -dpi 100 -rgba vrgb -screen ${screen_si...@90 vt2" 
;;
        # both 'Sharp-Collie' and just 'Collie' have been reported
        *Poodle)
                ARGS="$ARGS -dpi 100 -rgba vrgb -screen ${screen_si...@270" ;;
        *Collie)
                ARGS="$ARGS -dpi 100 -rgba vrgb -screen ${screen_si...@270" ;;
        "SHARP Shepherd" | "SHARP Husky" | "SHARP Corgi")
                if [ `screen_width` -gt 330 ] ; then
                     DPI=200
                else
                     DPI=100
                fi 
                ARGS="$ARGS -dpi ${DPI} -rgba rgb"
                IMAGEON="w100"
                ;;
        "SHARP Spitz" | "SHARP Akita" | "SHARP Borzoi")
                ARGS="$ARGS -dpi 200 -rgba rgb -screen ${screen_si...@270" ;;
        "Simpad")
                ARGS="$ARGS -dpi 100 -rgba rgb" ;;
        "Generic OMAP1510/1610/1710")
                ARGS="$ARGS -dpi 220 -mouse /dev/input/event0" ;;
        "Cellon C8000 Board")
                ARGS="$ARGS -dpi 100 -screen ${SCREEN_SIZE},10,1" ;;
        "HTC Magician")
                ARGS="$ARGS -dpi 142" ;;
        "HTC Universal")
                ARGS="$ARGS -dpi 225 -screen ${screen_si...@270" ;;
        "ARM-IntegratorCP" | "ARM-Versatile PB")
                ARGS="$ARGS -rgba vrgb" ;;
        "Compulab CM-x270")
                modprobe mbxfb
                ARGS="$ARGS -fb /dev/fb1" ;;
        "GTA01")
                if [ `screen_width` -gt 330 ] ; then
                     DPI=285
                else
                     DPI=140
                fi 
                ARGS="$ARGS -dpi ${DPI} -screen ${SCREEN_SIZE} -mouse tslib 
-hide-cursor -root-ppm /usr/share/pixmaps/xsplash-vga.ppm vt1" ;;
       "GTA02")
                if [ `screen_width` -gt 330 ] ; then
                     DPI=285
                else 
                     DPI=140
                fi 
                ARGS="$ARGS -dpi ${DPI} -screen ${SCREEN_SIZE} -hide-cursor -br"
                XSERVER=/usr/bin/Xglamo 
                ;;
        "Nokia N770")
                ARGS="$ARGS -dpi 225 -screen ${SCREEN_SIZE} -mouse tslib" 
                XSERVER=/usr/bin/Xomap ;;
        "Nokia N800")
                ARGS="$ARGS -dpi 225 -screen ${SCREEN_SIZE} -mouse tslib" 
                XSERVER=/usr/bin/Xomap ;;
        "Palm Treo 650")
                if [ -f "/usr/share/pixmaps/xsplash-qvga-square.ppm" ]; then
                  PPM="-root-ppm /usr/share/pixmaps/xsplash-qvga-square.ppm"
                fi
                ARGS="$ARGS -dpi 181 -screen 320x320 -hide-cursor $PPM" ;;
        "Motorola Ezx Platform")
                ARGS="$ARGS -dpi 170 -screen ${SCREEN_SIZE} -hide-cursor -mouse 
tslib -root-ppm /usr/share/pixmaps/xsplash-qvga.ppm vt1" ;;
        "Glofiish M800")
                ARGS="$ARGS -dpi 285 -screen ${SCREEN_SIZE} -mouse tslib 
-hide-cursor -root-ppm /usr/share/pixmaps/xsplash-vga.ppm vt1" ;;
        "Freescale MX21ADS")
         # That's what /proc/cpuinfo shows as hardware on the chumby
                ARGS="$ARGS -dpi 121 -screen 320x240 -hide-cursor -mouse tslib 
-root-ppm /usr/share/pixmaps/xsplash-qvga.ppm vt1" ;;

        *)
                # It is a device we do not know about, in which case we force
                # kdrive to use the current framebuffer geometry -- otherwise
                # it will default to trying to achieve 1024x768
                S=${SCREEN_SIZE}
                ARGS="$ARGS -screen $S" ;;
esac

if [ ! -z "$IMAGEON" ]; then
  if [ -f /usr/bin/Xw100 ]; then
    XSERVER=/usr/bin/Xw100
  fi
  if [ -f /usr/bin/Ximageon ]; then
    XSERVER=/usr/bin/Ximageon
  fi
fi

DISPLAY=':0'

exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $* >/tmp/x.log 2>&1

_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community

Reply via email to