Elan touchpad для linux

9. Elantech Touchpad DriverВ¶

Extra information for hardware version 1 found and provided by Steve Havelka

Version 2 (EeePC) hardware support based on patches received from Woody at Xandros and forwarded to me by user StewieGriffin at the eeeuser.com forum

9.1. IntroductionВ¶

Currently the Linux Elantech touchpad driver is aware of four different hardware versions unimaginatively called version 1,version 2, version 3 and version 4. Version 1 is found in “older” laptops and uses 4 bytes per packet. Version 2 seems to be introduced with the EeePC and uses 6 bytes per packet, and provides additional features such as position of two fingers, and width of the touch. Hardware version 3 uses 6 bytes per packet (and for 2 fingers the concatenation of two 6 bytes packets) and allows tracking of up to 3 fingers. Hardware version 4 uses 6 bytes per packet, and can combine a status packet with multiple head or motion packets. Hardware version 4 allows tracking up to 5 fingers.

Some Hardware version 3 and version 4 also have a trackpoint which uses a separate packet format. It is also 6 bytes per packet.

The driver tries to support both hardware versions and should be compatible with the Xorg Synaptics touchpad driver and its graphical configuration utilities.

Note that a mouse button is also associated with either the touchpad or the trackpoint when a trackpoint is available. Disabling the Touchpad in xorg (TouchPadOff=0) will also disable the buttons associated with the touchpad.

Additionally the operation of the touchpad can be altered by adjusting the contents of some of its internal registers. These registers are represented by the driver as sysfs entries under /sys/bus/serio/drivers/psmouse/serio? that can be read from and written to.

Currently only the registers for hardware version 1 are somewhat understood. Hardware version 2 seems to use some of the same registers but it is not known whether the bits in the registers represent the same thing or might have changed their meaning.

On top of that, some register settings have effect only when the touchpad is in relative mode and not in absolute mode. As the Linux Elantech touchpad driver always puts the hardware into absolute mode not all information mentioned below can be used immediately. But because there is no freely available Elantech documentation the information is provided here anyway for completeness sake.

9.2. Extra knobsВ¶

Currently the Linux Elantech touchpad driver provides three extra knobs under /sys/bus/serio/drivers/psmouse/serio? for the user.

Turn different levels of debugging ON or OFF.

By echoing “0” to this file all debugging will be turned OFF.

Currently a value of “1” will turn on some basic debugging and a value of “2” will turn on packet debugging. For hardware version 1 the default is OFF. For version 2 the default is “1”.

Turning packet debugging on will make the driver dump every packet received to the syslog before processing it. Be warned that this can generate quite a lot of data!

Turns parity checking ON or OFF.

By echoing “0” to this file parity checking will be turned OFF. Any non-zero value will turn it ON. For hardware version 1 the default is ON. For version 2 the default it is OFF.

Hardware version 1 provides basic data integrity verification by calculating a parity bit for the last 3 bytes of each packet. The driver can check these bits and reject any packet that appears corrupted. Using this knob you can bypass that check.

Читайте также:  Сборки windows для bochs

Hardware version 2 does not provide the same parity bits. Only some basic data consistency checking can be done. For now checking is disabled by default. Currently even turning it on will do nothing.

Sets crc_enabled to 0/1. The name “crc_enabled” is the official name of this integrity check, even though it is not an actual cyclic redundancy check.

Depending on the state of crc_enabled, certain basic data integrity verification is done by the driver on hardware version 3 and 4. The driver will reject any packet that appears corrupted. Using this knob, The state of crc_enabled can be altered with this knob.

Reading the crc_enabled value will show the active value. Echoing “0” or “1” to this file will set the state to “0” or “1”.

9.3. Differentiating hardware versionsВ¶

To detect the hardware version, read the version number as param[0].param[1].param[2]:

In the wild, there appear to be more versions, such as 00.01.64, 01.00.21, 02.00.00, 02.00.04, 02.00.06:

In the wild, there appear to be more versions, such as 04.03.01, 04.04.11. There appears to be almost no difference, except for EF113, which does not report pressure/width and has different data consistency checks.

Probably all the versions with param[0] = 02.08.00 can be considered as 6 bytes.

9.4. Hardware version 1В¶

9.4.1. RegistersВ¶

By echoing a hexadecimal value to a register it contents can be altered.

Источник

Настройка тачпада ELAN в *buntu

Проблема

Многие «счастливые» обладатели ноутбуков Acer, Asus, Packard Bell и других «антилинуксоидных» производителей наверное зпметили, что их мультисенсорный тачпад ELAN определяется операционной системой Linux как PS/2 мышь. И естественно никаких мультисенсорных жестов от нее не добиться.

То, как ее пытаются решить Линуксоиды

Начинающие линуксоиды сразу бегут на сайт производителя своего ноутдруга за драйвером, но обнаруживают, что большинство драйверов написано под софтверного гиганта Windows, а для Linux есть драйвер на несколько устройств, но не на тачпад ELAN, что обидно. После этого наш линуксоид бежит на сайт производителя тачпада — и, поковырявшись в меню, видит следующую картину:

Неправда ли это обидно? Последнее, что может сделать обделенный линуксоид — обратиться за помощью к гуглу или на разные форумы. Я, как обладатель именно такого «проблемного» ноутдруга, лазал по гуглу и форумам около недели, но везде мне советовали поставить драйвер Synaptics, но ни одна статья и ни один совет не помогли. Вот 2 из множества перелопаченных мною статей, которые мне не помогли: , . Как видите, пока все очень печально

То, как надо решать данную проблему

Я как то раз наткнулся на тему на официальном форуме ubuntu, в которой линуксоид с Arch Linux столкнулся с этой же проблемой и решил ее. Вот ссылка на этот топик: url.

Для тех, кто плохо знает английский, я вкратце донесу до Вас смысл данной статьи. Участник форума transmition имеет на своем компьютере тачпад Elantech (ELAN), и он не работает, а только видится как PS/2 мышь. transmition где-то вычитал, что эта проблема пофикшена в ядре линукса версии 2.6.34. transmition обновился до этой версии кернела, но проблема осталось. Тогда transmition ввел в консоль 2 команды, предварительно отредактировав файлы xinputOutput и xorg.conf, лежащие в директории «/etc/X11». Сами конфиги файлов transmition приложил. В этих конфигах прописано устройство ввода Elan таким образом, чтобы оно работало как тачпад, а не как PS/2 мышь. Для начинающих пользователей линукс: не надо заменять свои файлы файлами пользователя transmition, т.к. это может привести к тому, что у вас при перезапуске системы перестанет работать X сервер. В ваших файлах надо будет лишь изменить/добавить пару строчек, у каждого по-разному, по этому не буду давать общую инструкцию, чтобы потом не полчать гневные комментарии. Просто наведу вас на статью, где объяснено, как надо конфигурировать один из этих файлов, а точнее объясняется, что и для чего в этом файле прописано. Вот ссылка: . После того как вы сконфигурировали файлы, наберите в консоли две комманды, желательно от рута:

Читайте также:  Не работает windows media player classic

echo «options psmouse force_elantech=1» | sudo tee -a /etc/modprobe.d/psmouse.conf
sudo rmmod psmouse && sudo modprobe psmouse

После этого тачпад должен заработать, т.к. после выполнения вышеописанных действий он заработал и у меня, и у парочки моих знакомых с ноутбуками, на которых стоит тачпад Elan. Удачи вам при изучении Linux.

Источник

Elantech Touchpad не работает в Ubuntu 16.04 и Arch Linux

Так у меня есть и ноутбук Asus R558UF с сенсорной панелью Elantech. После установки Ubuntu 16.04 тачпад работал один раз, но после перезапуска он не работал и с тех пор не работал.

Это результат xinput :

В настройках мыши и тачпада тачпад включен. Что я должен сделать, чтобы это исправить?

У меня такая же проблема. После долгих поисков я нашел обходной путь: в /etc/defaut/grub

Я добавил i8042.reset в строку GRUB_CMDLINE_LINUX_DEFAULT

Наконец после перезагрузки тачпад работает нормально (мультитач включен).

Итак, я нашел решение для этой проблемы.

Спасибо @Guillaume за указание мне в правильном направлении. Эта проблема очень красиво объяснена здесь на unix stackexchange.

Это возникает для некоторых конкретных, редких устройств, таких как мое (New Elantech Touchpad).

Иногда тачпад работал, а иногда нет, он как-то связан с мультиплексированием.

Чтобы решить эту проблему, я следовал за ответом @Guillaume и добавил i8042.kbdreset=1 к параметрам /etc/default/grub , выполнив те же самые шаги в другом ответе.

i8042.reset не работал для меня

У меня такая же тачпад на ноутбуке ASUS. Ядра Linux ниже 4.5 не имеют драйверов для этой сенсорной панели, поэтому все, что вам нужно сделать, это обновить ядро. Несмотря на то, что на момент написания этой статьи ядра Linux прошли весь путь до 4.10, я бы хотел отследить технологические новшества, поэтому, если вы просто перейдете на 4.5, вам будет хорошо.

Вы можете найти последние версии ядер для Ubuntu по адресу http://kernel.ubuntu.com/

Например, чтобы перейти на 4.5.7, перейдите по ссылке выше на ядра ubuntu и перейдите по ссылке http://kernel.ubuntu.com/

Затем загрузите универсальные пакеты .deb. Для 64-битных это будет:

Они окажутся в вашем каталоге загрузок, поэтому просто откройте там терминал и введите следующее:

и приступить к восстановлению загрузчика grub

Затем перезагрузите компьютер и выберите новое ядро, и ваша сенсорная панель должна появиться.

Источник

unixforum.org

Форум для пользователей UNIX-подобных систем

  • Темы без ответов
  • Активные темы
  • Поиск
  • Статус форума

[Решено] Настройка тачпада Elantech.

[Решено] Настройка тачпада Elantech.

Сообщение baldman88 » 29.10.2011 23:21

Re: [Решено] Настройка тачпада Elantech.

Сообщение vr13 » 30.10.2011 08:56

покажите правило и скрипт. ну и фрагменты вывода dmesg, где говорится про touchpad и время включения/отключения мыши

кстати, а что там такого, что заставляет скрипт создавать? казалось, что кроме synclient Touchpad=0|1 больше ничего делаеть не нужно. elantech — это какое-то специальное устройство?

Re: [Решено] Настройка тачпада Elantech.

Сообщение baldman88 » 30.10.2011 13:49

]$ dmesg | grep elantech [ 7.037251] elantech.c: assuming hardware version 2, firmware version 4.1.1 [ 7.084981] elantech.c: Synaptics capabilities query result 0x7e, 0x13, 0x0d. [11:32:29][baldman@bcs-laptop][

]$ dmesg | grep touchpad [ 9.197516] Registered led device: asus::touchpad [11:33:39][baldman@bcs-laptop][

А вот вывод при отключении и включении мыши:

]$ dmesg [ 912.349271] usb 2-2: USB disconnect, address 2 [ 914.792096] usb 2-2: new low speed USB device using ohci_hcd and address 3 [ 915.006851] usb 2-2: configuration #1 chosen from 1 choice [ 915.017115] input: Genius Laser Mouse as /devices/pci0000:00/0000:00:04.0/usb2/2-2/2-2:1.0/input/input12 [ 915.017302] generic-usb 0003:0458:003A.0002: input,hidraw0: USB HID v1.10 Mouse [Genius Laser Mouse] on usb-0000:00:04.0-2/input0 [11:39:23][baldman@bcs-laptop][

Читайте также:  Canoscan lide 100 драйвера windows 10

И да, на synclient TouchpadOff=0|1 тачпад вообще не реагирует.

Источник

Elan touchpad для linux

ELAN1200 04F3:3022 Touchpad

The code in the repository has been tested and being used with the touchpad installed in Asus UX310UQ laptops, vendor/device 04F3:3022. The OS is Debian 10 with backports enabled. I can’t guarantee it working with other models, revisions, Linux distibutions etc.


Normal two finger touch state


When fingers are close enough, the touchpad recognises it as one touch and sends a release report for the second contact


When fingers go apart again, the touchpad sends another release for the remaining contact and immediately sends a report with two fingers touching the surface

The aforementioned redundant release report results in random right-click events during scrolling when «double tap» and «two-finger scroll» are enabled.

The repository contains three options to resolve this issue, all of them are basically do the same:

  • Got the release report from the hardware
  • Save the event data and set timer for a very short time fraction
  • If next event is immediatelty received, then the release was the malicious one, ignore it
  • If there’re no subsecuent events, and the timer is triggered, the release was correct, so emit the saved event

All the solutions have some issuses and limitations yet nonetheless they minimise the annoying behaviour of the touchpad.

Patch the Synaptics Xorg driver. It would be something like that:

Obviously it is limited to Xorg and Synaptics driver and since I’ve hacked into the driver’s source code it doesn’t work ideally.

Use the userspace driver. It can work without hid-multitouch module. It takes raw HID data from a /dev/hidraw* device, creates a virtual /dev/input/event* device using the uinput module and reports input events according to the Linux Multi-touch (MT) Protocol Type B specification.

Possibly delay time should be adjusted adding -DMEASURE_TIME flag to gcc will print relevant time, when moving fingers close to each other and appart without lifting.

The directory also contains example Xorg configurations for Synaptics and Libinput drivers which ignore the real device and use the virtual device and a simpe systemd service file for autoload, optionally hid-multitouch module can be blacklisted.

The mirror_elan1200.c in the directory just mirrors input events from the input device created by hid-multitouch without any modifications. It’s my previous attempt to filter hardware reports in userspace.

Use the kernel module. Technically it does the same as the userspace driver, the difference is in an API. Linux Kernel’s API tends to change, I use Debian stable with backports, the only kernel I can test is that one from the distribution. The latest version I tested it with is 5.8. Installation is typical as for any other module. Timings can also be measured compiling the module with the command make CFLAGS=-DMEASURE_TIME and watching prints in dmesg -w .

The code of the module in many parts is based on hid-multitouch , the difference is in handling the reports from the device.

The directory also contains dkms.conf for installing and auto-recompiling during kernel updates.

Blacklisting hid-multitouch may be needed. Sample Xorg conf are the same as for the userspace driver, they handle both names of the exposed input devices.

Misc for ASUS UX310UQ

There’s also an ACPI problem related to the laptop. When the battery is fully charged, it goes into the state of «discharging at zero rate». XFCE Power Manager sets the icon which doesn’t reflect if power cable is connected. I made a patch asus_ux310u_1.6.1.diff in the corresponding directory, for xfce4-power-manager-1.6.1 which shows a correct icon when an AC cable is plugged in.

Источник

Оцените статью