A point in the right direction

521 views
Skip to first unread message

Scott Wadsworth

unread,
Sep 21, 2016, 1:55:13 PM9/21/16
to Android-x86
So I have a HP touchsmart 9100 that I can't get the touchscreen to work on. The built in drivers don't work and I found https://github.com/awakecoding/nwfermi/blob/master/nw-fermi.c for older linux builds. Is there a way that anyone knows to modify this code to get it working with the most recent version of Android x86.

The touchscreen is a nextwindow 1950. Everything else works great and really smoothly.

Povilas Staniulis

unread,
Sep 22, 2016, 7:44:40 AM9/22/16
to andro...@googlegroups.com
On 2016.09.21 19:48, Scott Wadsworth wrote:
> So I have a HP touchsmart 9100 that I can't get the touchscreen to work on. The built in drivers don't work and I found https://github.com/awakecoding/nwfermi/blob/master/nw-fermi.c for older linux builds. Is there a way that anyone knows to modify this code to get it working with the most recent version of Android x86.
>
> The touchscreen is a nextwindow 1950. Everything else works great and really smoothly.
>
Try building a module.

You'll need to download Android x86 kernel source code and modify the
nwfermi Makefile.

https://github.com/awakecoding/nwfermi/blob/master/Makefile:

KERNEL_SOURCE - should point to your Android x86 kernel source

KERNEL_VERSION - Android x86 kernel version (run uname -r on your
Android device).


The module is quite old, not sure if it will work (or even build) with
current Android x86 kernel, but it's worth a try anyways.

Scott Wadsworth

unread,
Sep 22, 2016, 10:32:06 AM9/22/16
to Android-x86
I'll give that a try. Time to dust off my programming.

Chih-Wei Huang

unread,
Sep 30, 2016, 3:44:55 AM9/30/16
to Android-x86
2016-09-22 0:48 GMT+08:00 Scott Wadsworth <guswads...@gmail.com>:
> So I have a HP touchsmart 9100 that I can't get the touchscreen to work on. The built in drivers don't work and I found https://github.com/awakecoding/nwfermi/blob/master/nw-fermi.c for older linux builds. Is there a way that anyone knows to modify this code to get it working with the most recent version of Android x86.
>
> The touchscreen is a nextwindow 1950. Everything else works great and really smoothly.

I've added the driver to the kernel-4.4 branch.

The cm-x86-13.0-rc1 contains the driver.
You may try it.


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Scott Wadsworth

unread,
Oct 3, 2016, 12:16:01 AM10/3/16
to Android-x86
Thank you very much I will try it when i get home!

zefie altimitmine

unread,
Aug 14, 2017, 2:20:44 AM8/14/17
to Android-x86
Tried working with one of these the other day, it seems there is a need for a "nwfermi_daemon", which is closed source. There are a few floating around, but the x86 ones seem dynamically linked and won't run on Android X86. I was able to find an arm edition at https://bugs.launchpad.net/nwfermi/+bug/811760/+attachment/2388899/+files/nwfermi_daemon_arm.zip, which will work after enabling nativebridge. That said, I still have not been able to get the touchscreen to respond correctly. It responds, but not in the way you'd expect of desire. It seems to act more like a keyboard than anything, tapping around on the upper left hand side of the initial setup screen will make the language list scroll, then tapping again at the bottom of the left side will make it stop or scroll the other way. its very weird, and not at all what we want, but at least its a sign of life.

Running strings against nwfermi_daemon shows a couple of secret options

/instanceid will select which device (usually 0, which is the default)
/rawmouse is an option but I have not had much luck with it
/daemon to fork it
/dbgprint for some less-than-helpful debugging messages
/nocalib is still unknown.

zefie altimitmine

unread,
Aug 14, 2017, 3:46:35 AM8/14/17
to Android-x86
Further testing has shown that the nwfermi_daemon from launchpad will work (at least on x86 cm13), but still no luck getting proper results. Android seems to ignore the /dev/input files created (as I have tried removing event9 and mouse1, which were the touchscreen) and it still behaves the same. Rather than acting like a touchscreen, it acts more like a joystick, tapping the top of the screen will cause it to emulate holding the up key. tapping the center cancels the emulated hold. same with left right and down. I'm not sure this can be fixed from usermode.

Chih-Wei Huang

unread,
Aug 15, 2017, 3:18:15 AM8/15/17
to Android-x86
2017-08-14 15:46 GMT+08:00 zefie altimitmine <rkuc...@gmail.com>:
> Further testing has shown that the nwfermi_daemon from launchpad will work
> (at least on x86 cm13), but still no luck getting proper results. Android
> seems to ignore the /dev/input files created (as I have tried removing
> event9 and mouse1, which were the touchscreen) and it still behaves the
> same. Rather than acting like a touchscreen, it acts more like a joystick,
> tapping the top of the screen will cause it to emulate holding the up key.
> tapping the center cancels the emulated hold. same with left right and down.
> I'm not sure this can be fixed from usermode.

You can use 'getevent -l' to see
what events it read exactly.

Read the inputflinger code under
frameworks/native/services/inputflinger/
to see what you can do.

zefie altimitmine

unread,
Jan 13, 2018, 5:56:00 PM1/13/18
to Android-x86
Finally got a chance to look into this more. It seems it is abiding by the MT standards set at https://source.android.com/devices/input/touch-devices, EXCEPT instead of sending BTN_TOUCH it is sending BTN_MOUSE.

zefie altimitmine

unread,
Jan 13, 2018, 8:04:59 PM1/13/18
to Android-x86
Update: I got it to work with the following modifications to the kernel driver (see attachment)

Steps:
  1. Build kernel with my patch and install new kernel and modules
  2. make sure nativebridge is enabled
  3. make sure nwfermi_daemon is running
  4. success!

Notes: not sure if changes to NW1950_DEFAULT_W and NW1950_DEFAULT_H are required.
nwfermi.patch

zefie altimitmine

unread,
Jan 13, 2018, 9:41:13 PM1/13/18
to Android-x86
One more update:
The native x86 version can use used if loaded in the pre-init (before chroot to android).
It is dynamically linked, but, at least on cm-14.1-rc1 (x86), it can be loaded before chroot to Android.


Then added it to /sbin of "initrd.img"

then added this to "init" in "initrd.img", right after "post_detect"

# If we need nwfermi, load it before switching
# Because we cannot load it once in Android
# Due to dynamically linked closed source binary

if [ $(cat /sys/bus/*/devices/*/uevent | grep "PRODUCT=1926" | wc -l) -gt 1 ]; then
# There is a nextwindow device so wait for nwfermi
# Probably not the best way...
echo -n "Detected NextWindow TS: Loading support..."
modprobe nw-fermi
while [ $(ls -1 /dev/nwfermi* | wc -l) -eq 0 ]; do
sleep 1;
echo -n .
done
echo -e " done.\n"
/sbin/nwfermi_daemon /daemon > /dev/null 2>&1
fi




zefie altimitmine

unread,
Jan 15, 2018, 10:54:39 PM1/15/18
to Android-x86
I've made an ISO of the working status of my HP TouchSmart 300 with the same touchscreen, it may work for your 9100.

If "Live Boot" does not have touchscreen, choose "Debug", and when the first shell appears, wait a bit for the other devices to show up, then type exit on both shells as you normally would. Touch should then work.

Reply all
Reply to author
Forward
0 new messages