Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] ELAN Touchscreen
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
zolom
n00b
n00b


Joined: 07 Apr 2012
Posts: 32

PostPosted: Sun Jul 12, 2015 7:49 pm    Post subject: [solved] ELAN Touchscreen Reply with quote

Hello all! I'm trying to get my touchscreen working on 3.19.8 gentoo sources. The Ubuntu LiveCD I installed off of, which uses 3.16, shows an "ELAN Touchscreen" in Xinput --list, and the touchscreen functions on the LiveCD. I've tried compiling the kernel with CONFIG_TOUCHSCREEN_ELAN, CONFIG_TOUCHSCREEN_USB_COMPOSITE and CONFIG_HID_MULTITOUCH but have had no luck so far. What am I missing? Thanks!

Last edited by zolom on Tue Jul 14, 2015 1:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
tclover
Guru
Guru


Joined: 10 Apr 2011
Posts: 516

PostPosted: Sun Jul 12, 2015 10:01 pm    Post subject: Reply with quote

It's working just fine here since kernel >=3.16 with only CONFIG_HID_MULTITOUCH=m and CONFIG_USB_{O,V}HCI_HCD=m--just have to insert those modules to get it working... and have to insert the usb related modules very early (initramfs) to avoid getting a flooded log with usb device detection message. I did not compile any kernel above 3.18.xy... so no idea about that new ELAN config option.

NOTE: I am not sure about the relevance of VHCI config option, although, it does depend on OHCI USB module IIRC.
_________________
home/:mkinitramfs-ll/:supervision/:e-gtk-theme/:overlay/
Back to top
View user's profile Send private message
zolom
n00b
n00b


Joined: 07 Apr 2012
Posts: 32

PostPosted: Sun Jul 12, 2015 11:35 pm    Post subject: Reply with quote

I have compiled it into the kernel, and I can see it being detected in /var/log/messages, but there are no dmesg messages and it seems to be missing from lsusb. I guess they must be compiled as modules? In that case, I might live without it for a while -- I'm reluctant about building a custom initramfs. Isn't VHCI_HCD for USB over IP?
Back to top
View user's profile Send private message
tclover
Guru
Guru


Joined: 10 Apr 2011
Posts: 516

PostPosted: Mon Jul 13, 2015 7:22 am    Post subject: Reply with quote

Ah... yes, you should have CONFIG_INPUT_TOUCHSCREEN=y set of course (and CONFIG_MOUSE_PS2_ALPS=y) and CONFIG_MOUSE_PS2_ELANTECH=y because of... ELAN input touch screen would be used as ETPS/2 (so ElanTech PS/2) input device. I did had some trouble getting everything working without being flooded by detection message because there is no proper device driver prior to 3.19. So, I do not know why that CONFIG_TOUCHSCREEN_ELAN=y does not suffice to get a proper device driver. I have read some emails exchange on LKML about that ELAN touch screen driver but I did not quite follow the discussion because I got it working before that. So to speak, the USB dependency was not clear for me although I did know of some USB hard wiring for web-cam/mic/touch-screen in new laptop.

If you did search in the intertubes, you'd get to old ARCH forums threads about that ALPS and ELANTECH PS/2 driver to get ELAN touch sscreen working for kernel prior to 3.19. I am not sure about the ALPS config anymore but it won't hurt anyway.

Finaly this is what you should got or something similar.
grep -i elan /var/log/dmesg:

[    1.775917] psmouse serio4: elantech: assuming hardware version 4 (with firmware version 0x381f05)
[    1.790475] psmouse serio4: elantech: Synaptics capabilities query result 0x10, 0x14, 0x0e.
[    1.864809] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio4/input/input8
[    2.503287] usb 1-10: Manufacturer: ELAN
[    2.512775] input: ELAN Touchscreen as /devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/0003:04F3:010C.0001/input/input14
[    2.512988] hid-multitouch 0003:04F3:010C.0001: input,hiddev0,hidraw0: USB HID v1.10 Device [ELAN Touchscreen] on usb-0000:00:14.0-10/input0


So yes, build related synaptics, ps/2 mouse, usb and touch screen drivers.
_________________
home/:mkinitramfs-ll/:supervision/:e-gtk-theme/:overlay/
Back to top
View user's profile Send private message
zolom
n00b
n00b


Joined: 07 Apr 2012
Posts: 32

PostPosted: Mon Jul 13, 2015 2:19 pm    Post subject: Reply with quote

Ah-ha! I don't have CONFIG_MOUSE_PS2_ELANTECH set; that's probably the problem. I'm in the middle of building libreoffice right now, but I'll report back in a day or two. Thanks!
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Mon Jul 13, 2015 3:05 pm    Post subject: Reply with quote

try running xev and use that mouse / trackpad ...
Back to top
View user's profile Send private message
zolom
n00b
n00b


Joined: 07 Apr 2012
Posts: 32

PostPosted: Mon Jul 13, 2015 8:06 pm    Post subject: Reply with quote

Hm, that's weird. I have TOUCHSCREEN_ELAN [=y], TOUCHSCREEN_USB_COMPOSITE [=y], MOUSE_PS2_ELANTECH [=y], CONFIG_MOUSE_PS2_ALPS=[y], HID_MULTITOUCH [=y], XHCI, EHCI, OHCI and UHCI and this touchscreen still does not appear in xinput --list. Interestingly, CONFIG_MOUSE_PS2_ALPS=y is enabled but does not appear under -> Mice, so it was enabled by default instead of manually enabled by me. Running xev shows that the trackpad (the actual mouse) is registering, but delivers no output for touchscreen presses. There are no hits for Touchscreen or ELAN in dmesg, and there is certainly no flooding. However, it does appear in /var/log/messages:
Code:

kernel: [    4.518087] usb 4-3: new full-speed USB device number 3 using ohci_hcd
kernel: [    4.663118] usb 4-3: New USB device found, idVendor=04f3, idProduct=009d
kernel: [    4.663130] usb 4-3: New USB device strings: Mfr=4, Product=14, SerialNumber=0
kernel: [    4.663138] usb 4-3: Product: Touchscreen
kernel: [    4.663144] usb 4-3: Manufacturer: ELAN


Lsusb does not see to find list the same device (I presume usb 4-3 translates to Bus 004 Device 003?):
Code:

linux # lsusb
Bus 004 Device 002: ID 1bcf:2c17 Sunplus Innovation Technology Inc.
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


I've posted my .config here: https://bpaste.net/show/9be98ca158cb . Does the touchscreen require firmware?
Back to top
View user's profile Send private message
tclover
Guru
Guru


Joined: 10 Apr 2011
Posts: 516

PostPosted: Mon Jul 13, 2015 10:47 pm    Post subject: Reply with quote

That's weird... That first code snippet is what I have when ohci usb module is not loaded--that's the autodection flooding message I was talking about. Once, ohci is loaded, `lsusb should take care of the device and register the usb bus properly.
lsusb:
Bus 001 Device 005: ID 04f3:010c Elan Microelectronics Corp.

And once, hid-multitouch is loaded, the touch screen should be usable--at least this what is happening on kernel prior or equal to 3.18.
dmesg:
[    1.864809] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio4/input/input8
[    1.887224] tsc: Refined TSC clocksource calibration: 2394.455 MHz           
(...)                         
[    2.337593] usb 1-10: new full-speed USB device number 5 using xhci_hcd     
[    2.503283] usb 1-10: New USB device found, idVendor=04f3, idProduct=010c   
[    2.503285] usb 1-10: New USB device strings: Mfr=4, Product=14, SerialNumber=0
[    2.503286] usb 1-10: Product: Touchscreen                                   
[    2.503287] usb 1-10: Manufacturer: ELAN                                     
[    2.503387] usb 1-10: ep 0x2 - rounding interval to 64 microframes, ep desc says 80 microframes
[    2.512775] input: ELAN Touchscreen as /devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/0003:04F3:010C.0001/input/input14
[    2.512988] hid-multitouch 0003:04F3:010C.0001: input,hiddev0,hidraw0: USB HID v1.10 Device [ELAN Touchscreen] on usb-0000:00


No idea what happened with the new ELAN driver... you could try looking for either info on ELANTECH touch screen in Linux Kernel Mail Archive or some forums like ARCH because users should have updated their kernels since the old days. I plan to test kernel 4.1 in the upcoming days once hardened patchset is released on Gentoo in a week or two before I back up my system; or else, I'd wait for kernel 4.2. So, I won't be able to help with newer kernels. And your kernel config looks fine in the input device drivers section. Are you using a tool to enable or disable options like `make nconfig' in the kernel source? Just checking if you're not setting up a few options manually which could break some module dependencies.

Else, you can build ELANTECH touch screen driver (and related drivers), hid-multitouch (and maybe ohci--WARN: it seems xhci is needed here while ohci is needed there!) as modules because you won't need those before a complete boot up.

Normally, you won't need any firmware for those drivers that I am aware of, so, this should not be related to your issue. Your issue may be related to a complicated [in]direct dependency or that CONFIG_ELANTECH_TOUCHSCREEN. --So, try building it as a module.
_________________
home/:mkinitramfs-ll/:supervision/:e-gtk-theme/:overlay/
Back to top
View user's profile Send private message
zolom
n00b
n00b


Joined: 07 Apr 2012
Posts: 32

PostPosted: Tue Jul 14, 2015 12:05 am    Post subject: Reply with quote

You were right! I compiled the kernel again with the modules, then used genkernel with an edited modules-load file to build the initramfs. Upon further investigation, it only seems to rely upon hid-multitouch and ohci-hcd. Everything is working now, thanks!
Back to top
View user's profile Send private message
tclover
Guru
Guru


Joined: 10 Apr 2011
Posts: 516

PostPosted: Tue Jul 14, 2015 6:47 am    Post subject: Reply with quote

zolom wrote:
You were right! I compiled the kernel again with the modules, then used genkernel with an edited modules-load file to build the initramfs. Upon further investigation, it only seems to rely upon hid-multitouch and ohci-hcd. Everything is working now, thanks!

Right. Again, you do *not* need that initramfs for this because you won't *ever* need the touch screen input capabilities early in boot up; so, just set up modules loading somewhere e.g. `/etc/conf.d/modules' if using OpenRC. (No idea for SystemDebug here, sorry.)

And sorry to have mis-guided you with a bit of ETPS/2 (ELANTECH PS/2) because it's not related in any way to the toush screen--just some confusion when I had to get both working the first time and then forget the what/when/how per device!

You may mark this thread solved for future reference.

LAST (IMPORTANT) NOTE: That advice to compile everything into the kernel is not mine in any respect because I find it more convenient to only compile in important drivers to be able to boot and then build everything else as modules--especially the extra craft nobody would ever use for early boot/set up.
_________________
home/:mkinitramfs-ll/:supervision/:e-gtk-theme/:overlay/
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Tue Jul 14, 2015 9:54 am    Post subject: Reply with quote

some stuff only works when compiled as kernel module in my expierence.
modular kernel is less bloated
Back to top
View user's profile Send private message
zolom
n00b
n00b


Joined: 07 Apr 2012
Posts: 32

PostPosted: Tue Jul 14, 2015 1:23 pm    Post subject: Reply with quote

I've always been a bit module phobic -- I figure if it's a driver for hardware I actually have, I always want it loaded so what's the point in building it as a module which may require extra configuration? I built it into the initramfs because of what you were talking about earlier about making sure it was loaded very early, but I already use a genkernel initramfs for encryption anyways so I'm not going to mess around with something that works :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum