Important: Please read the Qt Code of Conduct -

Error Message: selected device is not a touchscreen I understand

  • Hello,

    I am developing qt on Mini2440 board and I have compiled qt for embedded linux (qt-everywhere-opensource-src-4.6.2) and tslib successfully and set the environment on Mini2440 with following.



    export TSLIB_FBDEVICE=/dev/fb0

    export TSLIB_TSDEVICE=/usr/input/ts

    export TSLIB_CALIBFILE=/usr/etc/pointercal

    export TSLIB_CONFFILE=/usr/etc/ts.conf

    export TSLIB_PLUGINDIR=/usr/lib/ts

    export LD_LIBRARY_PATH=/usr/local/Trolltech/QtEmbedded-4.6.3-arm/lib

    export QTDIR=/usr/local/Trolltech/QtEmbedded-4.6.3-arm

    export QWS_MOUSE_PROTO=tslib:/usr/input/ts

    When I gave ./myapp -qws it comes on the display. But if I touch the screen my application immediately closes. When I have tried to run ts_calibrate, ts_test it gives me an error as

    "Error Message is: selected device is not a touchscreen I understand"

    In some forum I have seen that I need to change QWS_MOUSE_PROTO & TSLIB_TSDEVICE. So I have tried with the following

    export TSLIB_TSDEVICE=/dev/input/event0
    export QWS_MOUSE_PROTO=tslib:/dev/input/event0
    export TSLIB_PLUGINDIR=/usr/local/tslib/lib

    But still same error.

    Please let me know what went wrong.

    Thanks in advance

  • What device file does your touch screen device appear as. Look at the output of


    and look for some clue in there. It will surely not be somethign in the /usr dir though!

    Another way to find out is to cat /dev/input/event* one at a time for each file in there and whilst cat'ing it, prod the touch screen so that it generates some events. If you see nothign you have wrong device. If you see random garbage being printed to the terminal it's that device. ;-)

  • Thanks for your reply

    I gave cat /dev/input/event0 and some random things are displayed on the screen.

    Yes. I had "mice" apart from event0 in the above mentioned location (/dev/input/mice). I have tried this as well. When I have tried to use this event, the screen of Mini2440 has completely frozen. It is completely hangup with out responding for the touches.

    Below is the way how I compiled embedded library qt4.6.2

    ./configure -release -embedded arm -xplatform qws/linux-arm-g++ -prefix /usr/local/mytest -qt-mouse-tslib -little-endian -no-webkit -no-qt3support -no-cups -no-largefile -nomake examples -optimized-qmake -no-openssl -nomake tools

    Please help me out to come out of this problem

  • Here is what I have set in an init script to launch our Qt embedded application:

    export QWS_MOUSE_PROTO="Tslib"
    export TSLIB_TSDEVICE=/dev/input/touchscreen

    where /dev/input/touchscreen is a symlink to whatever device was the touchscreen on that particular board (I think I used udev to set this alias up).

    Have you managed to calibrate your ts device using the calibration application - I seem to recall there is one shipped with tslib itself and another with Qt Embedded.

  • Here are the steps how I have done Qt installation.

    I am using qt-everywhere-opensource-src-4.6.2.tar.gz downloaded from qt

    1. I have set the path to my tool chain location after installing it as
      export PATH=/opt/usr/local/arm/4.3.2/bin:$PATH

    CC=/opt/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc CFLAGS="-O0
    -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t"

    CXX="opt/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++ -O0
    -msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t"

    1. tar qt-everywhere-opensource-src-4.6.2.tar.gz

    2. cd qt-everywhere-opensource-src-4.6.2

    3. I have updated the mkspecs/qws/linux-arm-g++/qmake.conf as below


    qmake configuration for building with arm-linux-g++


    modifications to g++.conf

    QMAKE_CC =
    /opt/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc -msoft-float-
    D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0
    /opt/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++ -msoft-float-
    D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0
    /opt/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++ -msoft-float-
    D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0
    /opt/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++ -msoft-float-
    D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0

    modifications to linux.conf

    QMAKE_AR =
    /opt/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-ar cqs

    QMAKE_INCDIR +=/root/Desktop/today24-5/mytslib/include
    QMAKE_LIBDIR +=/root/Desktop/today24-5/mytslib/lib


    (Here QMAKE_INCDIR and QMAKE_LIBDIR are pointing to the location where
    tslib is installed in my host)

    1. mkspecs/common/g++.conf


    ./configure -release -embedded arm -xplatform qws/linux-arm-g++ -prefix
    /root/Desktop/today24-5/myqtfolder -qt-mouse-tslib -little-endian
    -no-webkit -no-qt3support -no-cups -no-largefile -nomake examples
    -optimized-qmake -no-openssl -nomake tools

    1. make

    2. make install

    This is how I have installed tslib

    1 echo "ac_cv_func_malloc_0_nonnull=yes" > arm-linux.autogen

    2 export CONFIG_SITE=arm-linux.autogen

    3 ./

    4 ./configure --build=i386-linux --host=arm-linux --target=arm
    --disable-inputapi --prefix=/root/Desktop/today24-5/mytslib

    5 make

    6 make install

    Please let me know if there is anything wrong with these steps

    [EDIT: code formatting, please wrap in @-tags, Volker]

  • I got the similar problem with tslib in mini2440 board but I used openembedded to compile both tslib and Qt. Run cat /dev/input/event0 will give garbage chars on the screen but give "selected device is not a touchscreen I understand" if I run ts_calibrate. I found out that openembedded compiled tslib againt a different kernel version that I use for mini2440. So EV_VERSION in plugins/input_raw.c of tslib is expected to get something like 0x10001 but the kernel give 0x10000.

    To avoid the problem, I did a dirty hack by changing a line of code in plugins/input_raw.c from

    version == EV_VERSION to version == EV_VERSION -1 in check_fd function.

Log in to reply