Code Monkey home page Code Monkey logo

intel-precise-touch's Introduction

Linux Surface

Linux running on the Microsoft Surface devices. Follow the instructions below to install the latest kernel.

Announcements and Updates | Upstream Status

Why / About this Project

These days, Linux supports a lot of devices out-of-the-box. As a matter of fact, this includes a good portion of the Microsoft Surface devices—for most parts at least. So why would you need a special kernel for Surface devices? In short, for the parts that are not supported upstream yet.

Unfortunately, Surface devices tend to be a bit special. This is mostly because some hardware choices Microsoft made are rarely (if at all) used by other, more "standard", devices. For example:

  • Surface devices (4th generation and later) use their own embedded controller (the Surface Aggregator Module, or SAM). In contrast to other devices, however, some newer Surface devices route their keyboard and touchpad input via this controller. Unfortunately, every new Surface device requires some (usually small) patch to enable support for it, since devices managed by SAM are generally not auto-discoverable.
  • Surface devices (4th generation and later, excluding the Go series) use a rather special system for touch and pen input. In short, this requires user-space processing of touch and pen data to enable multitouch support and has not been upstreamed yet.
  • Surface devices rely on Intel's ISP for camera image processing. This means that the webcam also requires some user-space processing. While patches are being upstreamed, not all devices are supported (even with this project), and more work remains to be done.

We aim to send all the changes we make here upstream, but this may take time. This kernel allows us to ship new features faster, as we do not have to adhere to the upstream release schedule (and, for better or worse, code standards). We also rely on it to test and prototype patches before sending them upstream, which is crucial because we maintainers cannot test on all Surface devices (which also means we may break things along the way).

So should you install this custom kernel and the associated packages? It depends: We generally recommend you try your standard distribution kernel first. If that works well for you, great! But if you're missing any features or experiencing issues, take a look at our feature matrix and give our kernel and packages a try. If your device is not listed as supported yet, feel free to open an issue.

Supported Devices

  • Surface Book
  • Surface Book 2
  • Surface Book 3
  • Surface 3
  • Surface Go
  • Surface Go 2
  • Surface Go 3
  • Surface Laptop
  • Surface Laptop 2
  • Surface Laptop 3
  • Surface Laptop 4
  • Surface Laptop 5
  • Surface Laptop Go
  • Surface Laptop Go 2
  • Surface Laptop Studio
  • Surface Pro 1
  • Surface Pro 3
  • Surface Pro 4
  • Surface Pro (5th Gen) / Surface Pro 2017
  • Surface Pro 6
  • Surface Pro 7
  • Surface Pro 7+
  • Surface Pro 8
  • Surface Pro 9
  • Surface Studio

Features / What's Working

See the feature matrix for more information about each device.

Disclaimer

  • For the most part, things are tested on a Surface Book 2. While most things are reportedly fully working on other devices, your mileage may vary. Please look at the issues list for possible exceptions.

Installation and Setup

We provide package repositories for the patched kernel and other utilities. Please refer to the detailed installation and setup guide. There, you may also find device-specific caveats. In case you have disk encryption set up or plan to use it, take care to follow the respective instructions in the installation guide and have a look at the respective wiki page. After installation, you may want to have a look at the wiki and the contrib/ directory for useful tweaks.

If you want to compile the kernel yourself (e.g. if your distribution is not supported), please have a look at the wiki.

Additional Information

Notes

  • If you are getting stuck at boot when loading the ramdisk, you need to install the Processor Microcode Firmware for Intel CPUs (usually found under Additional Drivers in Software and Updates).
  • Using TLP can cause slowdowns, laggy performance, and occasional hangs if not configured properly! You have been warned.
  • If you want to use hibernate instead of suspend, you need to create a swap partition or file, please follow your distribution's instructions (or here).

Support

If you have questions or need support, please join our Matrix Space! This space contains

License

This repository contains patches, which are either derivative work targeting a specific already licensed source, i.e. parts of the Linux kernel, or introduce new parts to the Linux kernel. These patches fall thus, if not explicitly stated otherwise, under the license of the source they are targeting, or if they introduce new code, the license they explicitly specify inside of the patch. Please refer to the specific patch and source in question for further information. License texts can be obtained at https://github.com/torvalds/linux/tree/master/LICENSES.

intel-precise-touch's People

Contributors

hmtheboy154 avatar jasisonee avatar quo avatar qzed avatar stolld avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

intel-precise-touch's Issues

Module does not work when intel_iommu=on is set

When intel_iommu=on is set no touch or stylus events are received even with iommu=pt also set. evtest does not show any events and gnome shell does not respond either. modprobe -r ipts does not remove the device file from /dev/input/ and programs that try to access the old device file hang.

Expected behaviour: Working singletouch or stylus input; Clean module removal to allow switching between touch modes.

Kernel: 5.6.11-surface (behaviour was the same when I tested 5.5.13 and 5.6.7)
OS: Debian Unstable
IPTS firmware: 20200402-1

How can I install it as DKMS module on a unsupported distribution?

I am using openSUSE which is unsupported in this repo. So I cannot install linux-surface-headers below.

#7

I refered to this issue and it says I need to install linux-surface-headers package which is not available in my distribution. So I installed kernel-default-devel (headers of my present kernel in use) to provide headers.

But I can't apply patch to my kernel for can't find file to patch. And I find that in /lib/modules/5.18.6.1-default/kernel/drivers/misc/mei/ actually doesn't exist hw-me-regs.h and pci-me.c two files.
So I ignored this step. I succeed in installing DKMS but iptsd cannot work with errors:

ERROR: ../src/control.c:139: Failed to open /dev/ipts/0: No such file or directory
ERROR: ../src/main.c:106: Failed to start IPTS: No such file or directory

Which step is wrong?

Question about polling rate

First of all, I must say I don't know much about this driver, so I might be completely wrong in what I'm asking, but I'll try nonetheless.
Does the driver have a configurable polling rate? I noticed the touchscreen reporting is kinda choppy, especially compared to the touchpad builtin my Surface Pro 6 type cover, so I thought this might be because of a slower polling rate. I don't have a windows install anymore so I can't check if it happens there too, but in case it does it might be an hardware limitation.

Thank you for your time

[SB3] Not able to start iptsd on Debian 12

Hi there, and thanks for all your work on this!

This is a very similar issue to linux-surface/iptsd#137. On a stock Debian 12 install, either iptsd isn't able to detect the touchscreen device or it's not getting registered as a hidraw device. All of the patched kernel packages are installed, the touchpad and keyboard work, dtx works, etc.

I get no output when I run iptsd-find-hidraw and systemctl status $(iptsd-find-service) results in this output:

root@***********:~# systemctl status $(iptsd-find-service)
Input '' is not a valid file system path, escaping is likely not going be reversible.
○ [email protected] - Intel Precise Touch & Stylus Daemon
     Loaded: loaded (/lib/systemd/system/[email protected]; static)
     Active: inactive (dead)
       Docs: https://github.com/linux-surface/iptsd

Output for ps aux | grep iptsd:

root        3593  0.0  0.0   6332  2176 pts/1    S+   10:52   0:00 grep iptsd

Output for dmesg | grep hidraw:

[    3.947899] hid-generic 001F:8087:0AC2.0001: hidraw0: SENSOR HUB HID v2.00 Device [hid-ishtp 8087:0AC2] on 
[    3.954903] hid-sensor-hub 001F:8087:0AC2.0001: hidraw0: SENSOR HUB HID v2.00 Device [hid-ishtp 8087:0AC2] on 
[    4.878284] hid-generic 0019:045E:09A6.0002: hidraw1: <UNKNOWN> HID v1.11 Device [Microsoft Surface 045E:09A6] on 01:15:02:06:00
[    4.884866] hid-generic 0019:045E:09AE.0003: input,hidraw2: <UNKNOWN> HID v1.11 Keyboard [Microsoft Surface 045E:09AE] on 01:15:02:01:00
[    4.893217] hid-generic 0019:045E:09A6.0004: hidraw3: <UNKNOWN> HID v1.11 Device [Microsoft Surface 045E:09A6] on 01:15:02:05:00
[    4.897773] hid-generic 0019:045E:09AF.0005: input,hidraw4: <UNKNOWN> HID v1.11 Mouse [Microsoft Surface 045E:09AF] on 01:15:02:03:00
[    5.114906] hid-multitouch 0019:045E:09AF.0005: input,hidraw4: <UNKNOWN> HID v1.11 Mouse [Microsoft Surface 045E:09AF] on 01:15:02:03:00

Output for dmesg | grep "ipts\|IPTS":

[    4.721270] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Starting IPTS
[    4.721843] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: IPTS EDS Version: 2
[    4.722730] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: GET_DESCRIPTOR: cmd failed: 8
[    4.722751] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Failed to fetch HID descriptor: -53
[    4.722769] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Failed to start IPTS: -53
[    4.722785] ipts: probe of 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04 failed with error -53

I did notice that although /usr/share/iptsd/ has configurations for surface books 1 and 2 (13" and 15"), it doesn't have SB3 in either size. I tried specifying the vendor and product ids in /etc/iptsd.conf directly, going through all 5 hidraw devices and using their vid/pid, but still could not start iptsd directly with iptsd /dev/hidrawN.

I've reached a point where I really don't know where to go next. I'm dual booting, and the device works as expected in Windows, so I'm fairly confident it's not a hardware issue. I was dual booting this same machine last summer and I remember being affected by the bug reported in linux-surface/iptsd#137, but the fix worked once it got released.

Any help or advice to point me in the right direction would be much appreciated. Thanks!

Mmap and align heatmap to 4096-byte boundary for AVX512

This would improve the efficiency of ipts#88.

It would be nice to align the heatmap portion of the messages to 4096-byte boundaries or whatever AVX512 needs. This will avoid either bus fault crashes, or slow unaligned accesses. I am currently relying on the workaround of doing a manual copy loop before passing things to AVX512. It would save battery and speed things up if I could avoid this copy.

To be precise, the heatmap specifically, not the whole buffer needs to be page-aligned. This means I imaging something like allocating two contiguous pages and telling the hardware to place the buffer a little before the middle of the two pages. This way I can mmap and do AVX512 directly without copying. If the hardware supports this, it would be nice if this driver provided this alignment.

IPTS on Surface Gen7

On the surface gen7 devices, IPTS has undergone several changes:

The binary firmware that was used for previous models does not exist anymore. Due to the changes in the GuC firmware it seems like Intel / Microsoft are now forwarding the data to userspace(?) using HID reports, and parsing it using a daemon (or another driver?). The HID descriptor is also not loaded from a binary anymore and needs to be dumped in Windows to analyze it.

The SET_MODE command will not accept any parameter except for IPTS_SENSOR_MODE_MULTITOUCH. Other parameters will result in the status IPTS_ME_STATUS_INVALID_PARAMS being returned.

Even though we can only initialize the device in "multitouch" mode, once the initialization was finished, the only that that is being sent are HID reports: the ones for singletouch, as well as a new report (with report ID 07). Other than that the device behaves exactly expected for multitouch mode (doorbell is incremented instead of signaling new data via. MEI responses).

This issue will be for tracking the progress on full IPTS support for gen7 surface devices.

We suspect that the new IPTS needs HID feature reports to enable proper multitouch mode. The old driver from intel has some hints towards sending HID reports using a special type of feedback, but some quick tests didn't appear to be working. It also has no proper documentation so it is mostly just guessing how the different parts behave.

Another thing that has no been tested is simply not sending the SET_MODE event and directly sending SET_MEM_WINDOW. Maybe there was a change so that multitouch mode is the default, and sending anything will change it to singletouch mode? (i.e redefining SET_MODE as sth. like SET_SINGLETOUCH_MODE)

How can i install this drivers? Help me

I have just installed Arch on my SP8. I'm trying to install these drivers, but when i have to patch the kernel i can't find the "/drivers/misc/mei/hw-me-regs.h" and "/drivers/misc/mei/pci-me.c" files to apply the patches. Can someone help me?

Avoid polling and other inefficiencies

I found that the userspace drivers are wasting a lot of CPU (~3%) while waiting, even when the touchscreen is completely idle. The only way userspace becomes knowledgeable of changes is by polling get_device_ready and get_doorbell every millisecond, and that is wasting power. Decreasing the polling frequency isn't a solution because that would only introduce latency.

There are many better alternatives to polling:

  • Have get_device_ready and get_doorbell block until new data is ready
  • Support actual nonblocking IO such as select, poll, and epoll
  • Have those be blocking character devices

Additionally, I'm not sure how efficient copying the buffers to userspace is. Performance might be improved if we allow userspace to mmap the 16 buffers instead of reading from them

Getting Multi-touch & Pen support

I'm having problems getting pen support and multi touch working
I can manually start it
systemctl start $(iptsd-find-service)
I get the status by running

systemctl status $(iptsd-find-service)

[email protected] - Intel Precise Touch & Stylus Daemon
Loaded: loaded (/lib/systemd/system/[email protected]; static)
Active: inactive (dead)
Docs: https://github.com/linux-surface/iptsd

Then Logs...
Oct 03 15:12:37 adam-Surface-Pro-7 systemd[1]: Started Intel Precise Touch & Stylus Daemon.
Oct 03 15:12:37 adam-Surface-Pro-7 systemd[1]: Stopping Intel Precise Touch & Stylus Daemo>
Oct 03 15:12:37 adam-Surface-Pro-7 systemd[1]: [email protected]: Deactivated succ>
Oct 03 15:12:37 adam-Surface-Pro-7 systemd[1]: Stopped Intel Precise Touch & Stylus Daemon.

Running which iptsd
Give me /usr/bin/iptsd

Any pointers/ help would be apprecitated

Sensor keeps reseting after load ipts module

I have compiled ipts from hid branch but after sudo rmmod ipts and sudo insmod ipts.ko, ipts keeps reporting sensor was reset and restarting like below, dkms has the same problem, where the problem might be? I'm using Fedora 36 with kernel from linux-surface latest release on surface pro 7
图片

Support for Touch Host Controller (Tigerlake+)

Hi,
I know this repo is for surface devices, but the new Intel NUC M15 Laptop seems to use the same touchscreen controler. Windows recognizes it as Intel Precision Touch & Stylus or similar (currently booted on Linux but can look up the exact name if it becomes relevant). Linux sudo lspci -vvnn:

00:10.6 Digitizer Pen [0901]: Intel Corporation Device [8086:a0d0] (rev 20)
	DeviceName: Onboard - Other
	Subsystem: Intel Corporation Device [8086:2097]
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 255
	IOMMU group: 10
	Region 0: Memory at 603e1d0000 (64-bit, non-prefetchable) [disabled] [size=32K]
	Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
		Address: 0000000000000000  Data: 0000
	Capabilities: [70] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
		Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-

I'm on linux-surface kernel 5.10 which correctly recognizes the MEI:

00:16.0 Communication controller [0780]: Intel Corporation Tiger Lake-LP Management Engine Interface [8086:a0e0] (rev 20)
	DeviceName: Onboard - Other
	Subsystem: Intel Corporation Device [8086:2097]
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 156
	IOMMU group: 15
	Region 0: Memory at 603e1ed000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
		Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [8c] MSI: Enable+ Count=1/1 Maskable- 64bit+
		Address: 00000000fee00638  Data: 0000
	Capabilities: [a4] Vendor Specific Information: Len=14 <?>
	Kernel driver in use: mei_me
	Kernel modules: mei_me

However regardless of using the dkms or the builtin driver the ipstd service crashes on start:

● iptsd.service - Intel Precise Touch & Stylus Daemon
     Loaded: loaded (/usr/lib/systemd/system/iptsd.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Thu 2021-02-18 12:49:47 CET; 5h 30min ago
       Docs: https://github.com/linux-surface/iptsd
    Process: 1361 ExecStart=/usr/bin/iptsd (code=exited, status=237/KEYRING)
   Main PID: 1361 (code=exited, status=237/KEYRING)

Feb 18 12:49:42 test-pc systemd[1]: Started Intel Precise Touch & Stylus Daemon.
Feb 18 12:49:47 test-pc iptsd[1361]: ERROR: ../src/control.c:52: Failed to send feedback: No such device
Feb 18 12:49:47 test-pc iptsd[1361]: ERROR: ../src/control.c:75: Failed to flush buffers: No such device
Feb 18 12:49:47 test-pc iptsd[1361]: ERROR: ../src/main.c:83: Failed to start IPTS: No such device
Feb 18 12:49:47 test-pc systemd[1]: iptsd.service: Main process exited, code=exited, status=237/KEYRING
Feb 18 12:49:47 test-pc systemd[1]: iptsd.service: Failed with result 'exit-code'.

Could it be that the Surface devices use the same controller, but connect it differently than the NUC M15? Some hints that lead me to this theory:

  • The surface devices seem to not have the Digitizer Pen PCI device (I have no Surface device, so my source is linux-hardware.org)
  • I extracted the driver package for the NUC M15 as well as one of the Surface devices supported by this repo. I grep'd for strings found in the NUC Touchscreen driver .inf file but could not find any hints for this driver in the Surface driver package.
    My Theory: While on the Surface devices the Touchscreen controler is managed by the ME (which this driver is for) und the NUC M15 the controler is directly accessed over the pci bus, which would require a completly differend driver.

I hope I'm wrong ^^.

Slim Pen 2 Haptic Feedback

I am not sure where I could pose this question so please delete if it's not allowed here.

Does anyone know of the current state of the slim pen 2's haptic feedback support?

I am currently running Fedora 39 on a Surface 9 Pro and it's working very well (better than windows). The only thing that isn't working is the haptic feedback of the slim pen 2.

Is there any way to turn on the haptic feedback whenever the slim pen 2 touches the screen regardless what app is running?

Thanks and Lots of Hidraw devices

First I wanted to thank @StollD for all the recent commits in January, some of the bug fixes have really increased the stability of the ipts driver, especially resuming out of suspend on a Surface Pro 7.

One issue, however, is the driver seems to create a new hidrawXX device after resuming from suspend and these are piling up after some time. Is there anyway to resolve that?

Thanks again,
Jordan

Support touchscreen intel 11th gen (SP7+)

Hi!,

I see this video on youtube:
https://www.youtube.com/watch?v=RAoJIdMJInw

The guy in that vide install ubuntu 21.04 on a Lenovo IdeaPad Flex with 11th Gen Intel Core i5-1135G7 processor and the touchscreen works "out of the box" (min 3.05)

This is exactly the same processor of my SP7+.

In my first post in this linux-surface hub i understand that the problem was related with the 11th intel touch driver, but in this video works fine.

The are something i can try to make it work?

I tryied too 21.04 with the latest mainline kernel 5.12.7 and the latest availible on surface-linux (5.12.6), and dont work in booth latest kernels.

Regards.

Pen calibration

I'm using Surface Book 2 with Manjaro 21.2 GNOME

My pen is functioning as if only the top-left quadrant of the screen was the entire screen. It tracks movements there, and then it multiplies all of those movements by 2 to position the cursor. For example. In the top left it is perfect. In the center of the screen it is the bottom right. Halfway down the screen on the left side it is all the way down on the left. Halfway across the screen on the top it is all the way to the right on the top.

It was working fine until I went to the Settings -> Wacom Tablet -> Calibrate, then calibrated using the pen. Calibration did not work with just my finger. After calibration, I am experiencing the effects described above.

What might be causing this issue and how can I fix it?

Reverse-Engineering Gen7+ Pen Data Format

This is a technical discussion for the gen7+ pen data format. Please don't post any issues/problems in this thread and keep this a discussion about technical aspects/the protocol.

Some information from other threads:

More info about the protocol can also be found in #4.

SP7 Singletouch & Multitouch Support

Hi, I have a Surface Pro 7 running Fedora 37 and up until now I've been using the quo/iptsd solution with linux-surface's ipts.
Installing an updated iptsd from github actions of linux-surface/iptsd I now have lost the touchscreen since running ./iptsd-find-hidraw returns nothing and running ./iptsd returns "DEVICE is required" as you can see here:
image
I've tried following the advice of some discussions here and there in the issues of the intel-precise-touch and the iptsd repositories telling me to build linux-surface/intel-precise-touch using DKMS and that's exactly what I've done.
I had to change a thing in the Makefile, where I put a "--force" onto the dkms install comand since it told me that the ipts-1.0.0 was already there, in the stock 6.1.6-1.surface.fc37.x86_64 kernel.
Having said this, it seems like it's working as you can see here:
image
Oh yeah, I also renamed the version to 1.1.0 instead of 1.0.0 just to make sure, as you can see from this photo, but that shouldn't be a problem anyway.

So my problem right now is that I've followed the procedure but still can't find any hidraw devices using iptsd.
Do you know how to solve this? Also how can I make sure dkms actually did his thing? When rebooting and running "uname -a" I get the right kernel version 6.1.6-1.surface but how do I know it's been succesfully patched by dkms?
image

Running lsmod | grep "ipts" I can't seem to find it, while with the stock linux-surface kernel it was there, do you know why or if this might be the problem?

stylus (only) not not working in ubuntu 23.04

hardware : surface pro 4
distro : kubuntu , ubuntu (both 23.04)
kernel: 6.2.12-surface (64-bit)

problem occurred after upgrading kubuntu and using stylus once.

tried reinstalling : iptsd , libwacom-surface (with all dependencies) but no change.
also, tried libwacom-surface-dev but no change.
reinstalled OS twice.
the stylus is not showing in tablet settings in both gnome and kde plasma.
the program that tries to find tablets crashes.
however, touch is working normally.

dmesg :

[ 5784.853415] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Stopping IPTS
[ 5785.088053] ACPI: EC: interrupt blocked
[ 5785.088832] intel_pch_thermal 0000:00:14.2: CPU-PCH is cool [31C]
[ 5785.123470] ACPI Warning: Time parameter 255 us > 100 us violating ACPI spec, please fix the firmware. (20221020/exsystem-141)
[ 9290.832234] ACPI: EC: interrupt unblocked
[ 9291.206359] i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
[ 9291.206706] i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
[ 9291.207043] i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
[ 9291.207374] i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
[ 9291.207706] i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
[ 9291.208042] i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
[ 9291.208373] i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
[ 9291.208710] i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
[ 9291.209039] i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
[ 9291.287535] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Starting IPTS
[ 9291.287686] OOM killer enabled.
[ 9291.287692] Restarting tasks ... 
[ 9291.290376] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: IPTS EDS Version: 1
[ 9291.295693] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: IPTS running in event mode
[ 9291.296900] input: IPTS 1B96:006A as /devices/pci0000:00/0000:00:16.4/0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04/0000:1B96:006A.0005/input/input17
[ 9291.300129] done.
[ 9291.300163] random: crng reseeded on system resumption
[ 9291.469707] PM: suspend exit
[ 9291.498748] hid-multitouch 0000:1B96:006A.0005: input,hidraw0: <UNKNOWN> HID v0.00 Device [IPTS 1B96:006A] on 
[ 9357.918635] hid-generic 0005:1345:1002.0006: unknown main item tag 0x0
[ 9357.919208] input: Bluetooth Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/bluetooth/hci0/hci0:1/0005:1345:1002.0006/input/input19
[ 9357.920261] input: Bluetooth Keyboard Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/bluetooth/hci0/hci0:1/0005:1345:1002.0006/input/input20
[ 9357.922955] hid-generic 0005:1345:1002.0006: input,hidraw1: BLUETOOTH HID v1.1b Keyboard [Bluetooth Keyboard] on 98:5f:d3:c5:ad:88
[ 9657.089364] GpuWatchdog[8003]: segfault at 0 ip 00007fa540f927e6 sp 00007fa537530430 error 6 in libcef.so[7fa53caef000+7770000] likely on CPU 3 (core 1, socket 0)
[ 9657.089376] Code: 89 de e8 0d ef 6e ff 80 7d cf 00 79 09 48 8b 7d b8 e8 4e 66 2c 03 41 8b 84 24 e0 00 00 00 89 45 b8 48 8d 7d b8 e8 1a d4 b5 fb <c7> 04 25 00 00 00 00 37 13 00 00 48 83 c4 38 5b 41 5c 41 5d 41 5e
[ 9792.194471] perf: interrupt took too long (3197 > 3128), lowering kernel.perf_event_max_sample_rate to 62500

sudo journalctl -p 3 -xb :

11:08:26 ECO-Origami kernel: i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
أبريل 28 11:08:26 ECO-Origami kernel: i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
أبريل 28 11:08:26 ECO-Origami kernel: i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
أبريل 28 11:08:26 ECO-Origami kernel: i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
أبريل 28 11:08:26 ECO-Origami kernel: i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
أبريل 28 11:08:26 ECO-Origami kernel: i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
أبريل 28 11:08:26 ECO-Origami kernel: i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
أبريل 28 11:08:26 ECO-Origami kernel: i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
أبريل 28 11:08:26 ECO-Origami kernel: i2c_hid_acpi i2c-MSHW0030:00: failed to set a report to device: -121
أبريل 28 11:09:33 ECO-Origami systemd-udevd[18065]: hidraw1: Process '/usr/bin/iptsd-check-device --quiet /dev/hidraw1' terminated by signal ABRT.
أبريل 28 11:09:33 ECO-Origami systemd-udevd[18065]: hidraw1: Failed to wait for spawned command '/usr/bin/iptsd-check-device --quiet /dev/hidraw1': Input/output error
أبريل 28 11:25:46 ECO-Origami systemd-udevd[22858]: hidraw1: Process '/usr/bin/iptsd-check-device --quiet /dev/hidraw1' terminated by signal ABRT.
أبريل 28 11:25:46 ECO-Origami systemd-udevd[22858]: hidraw1: Failed to wait for spawned command '/usr/bin/iptsd-check-device --quiet /dev/hidraw1': Input/output error

UAPI module + iptsd hangs on SB1

I would occasionally get hangs when using the uapi driver with iptsd. Nothing is outputted to journal when the hang happens.

When printing the doorbell to dmesg, it stops increasing when the hang happens.

When I comment out https://github.com/linux-surface/intel-precise-touch/blob/master/control.c#L27, the driver crashes very quickly. Here's the journal:

-- Logs begin at Sat 2020-05-09 20:09:55 EEST. --
авг 04 21:21:26 todor-surface sudo[6741]:    todor : TTY=pts/1 ; PWD=/home/todor/kernel/intel-precise-touch ; USER=root ; COMMAND=/usr/bin/rmmod ipts
авг 04 21:21:26 todor-surface sudo[6741]: pam_unix(sudo:session): session opened for user root by (uid=0)
авг 04 21:21:26 todor-surface kernel: audit: type=1105 audit(1596565286.827:190): pid=6741 uid=0 auid=1000 ses=2 msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
авг 04 21:21:26 todor-surface audit[6741]: USER_START pid=6741 uid=0 auid=1000 ses=2 msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
авг 04 21:21:26 todor-surface kernel: ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Removing IPTS
авг 04 21:21:26 todor-surface sudo[6741]: pam_unix(sudo:session): session closed for user root
авг 04 21:21:26 todor-surface audit[6741]: USER_END pid=6741 uid=0 auid=1000 ses=2 msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
авг 04 21:21:26 todor-surface audit[6741]: CRED_DISP pid=6741 uid=0 auid=1000 ses=2 msg='op=PAM:setcred grantors=pam_unix,pam_permit,pam_env acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
авг 04 21:21:26 todor-surface kernel: audit: type=1106 audit(1596565286.863:191): pid=6741 uid=0 auid=1000 ses=2 msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
авг 04 21:21:26 todor-surface kernel: audit: type=1104 audit(1596565286.863:192): pid=6741 uid=0 auid=1000 ses=2 msg='op=PAM:setcred grantors=pam_unix,pam_permit,pam_env acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
авг 04 21:21:35 todor-surface audit[6802]: USER_ACCT pid=6802 uid=1000 auid=1000 ses=2 msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="todor" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
авг 04 21:21:35 todor-surface sudo[6802]:    todor : TTY=pts/1 ; PWD=/home/todor/kernel/intel-precise-touch ; USER=root ; COMMAND=/usr/bin/insmod ipts.ko
авг 04 21:21:35 todor-surface audit[6802]: CRED_REFR pid=6802 uid=0 auid=1000 ses=2 msg='op=PAM:setcred grantors=pam_unix,pam_permit,pam_env acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
авг 04 21:21:35 todor-surface kernel: audit: type=1101 audit(1596565295.770:193): pid=6802 uid=1000 auid=1000 ses=2 msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="todor" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
авг 04 21:21:35 todor-surface kernel: audit: type=1110 audit(1596565295.770:194): pid=6802 uid=0 auid=1000 ses=2 msg='op=PAM:setcred grantors=pam_unix,pam_permit,pam_env acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
авг 04 21:21:35 todor-surface sudo[6802]: pam_unix(sudo:session): session opened for user root by (uid=0)
авг 04 21:21:35 todor-surface audit[6802]: USER_START pid=6802 uid=0 auid=1000 ses=2 msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
авг 04 21:21:35 todor-surface kernel: audit: type=1105 audit(1596565295.773:195): pid=6802 uid=0 auid=1000 ses=2 msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
авг 04 21:21:35 todor-surface kernel: ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Probing IPTS
авг 04 21:21:35 todor-surface kernel: ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: IPTS using DMA_BIT_MASK(64)
авг 04 21:21:35 todor-surface kernel: audit: type=1106 audit(1596565295.790:196): pid=6802 uid=0 auid=1000 ses=2 msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
авг 04 21:21:35 todor-surface kernel: audit: type=1104 audit(1596565295.790:197): pid=6802 uid=0 auid=1000 ses=2 msg='op=PAM:setcred grantors=pam_unix,pam_permit,pam_env acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
авг 04 21:21:35 todor-surface kernel: ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Device 1B96:005E found
авг 04 21:21:35 todor-surface audit[6802]: USER_END pid=6802 uid=0 auid=1000 ses=2 msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
авг 04 21:21:35 todor-surface audit[6802]: CRED_DISP pid=6802 uid=0 auid=1000 ses=2 msg='op=PAM:setcred grantors=pam_unix,pam_permit,pam_env acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
авг 04 21:21:35 todor-surface sudo[6802]: pam_unix(sudo:session): session closed for user root
авг 04 21:21:35 todor-surface kernel: ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: IPTS enabled
авг 04 21:21:38 todor-surface audit[6838]: USER_ACCT pid=6838 uid=1000 auid=1000 ses=2 msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="todor" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
авг 04 21:21:38 todor-surface sudo[6838]:    todor : TTY=pts/0 ; PWD=/home/todor ; USER=root ; COMMAND=/usr/bin/iptsd
авг 04 21:21:38 todor-surface audit[6838]: CRED_REFR pid=6838 uid=0 auid=1000 ses=2 msg='op=PAM:setcred grantors=pam_unix,pam_permit,pam_env acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
авг 04 21:21:38 todor-surface kernel: audit: type=1101 audit(1596565298.407:198): pid=6838 uid=1000 auid=1000 ses=2 msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="todor" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
авг 04 21:21:38 todor-surface kernel: audit: type=1110 audit(1596565298.407:199): pid=6838 uid=0 auid=1000 ses=2 msg='op=PAM:setcred grantors=pam_unix,pam_permit,pam_env acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
авг 04 21:21:38 todor-surface sudo[6838]: pam_unix(sudo:session): session opened for user root by (uid=0)
авг 04 21:21:38 todor-surface audit[6838]: USER_START pid=6838 uid=0 auid=1000 ses=2 msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
авг 04 21:21:38 todor-surface kernel: audit: type=1105 audit(1596565298.410:200): pid=6838 uid=0 auid=1000 ses=2 msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
авг 04 21:21:38 todor-surface kernel: input: IPTS Touch as /devices/virtual/input/input53
авг 04 21:21:38 todor-surface kernel: input: IPTS Stylus as /devices/virtual/input/input54
авг 04 21:21:41 todor-surface kernel: ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: MEI error while sending: 0x6:-4
авг 04 21:21:41 todor-surface sudo[6838]: pam_unix(sudo:session): session closed for user root
авг 04 21:21:41 todor-surface audit[6838]: USER_END pid=6838 uid=0 auid=1000 ses=2 msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
авг 04 21:21:41 todor-surface audit[6838]: CRED_DISP pid=6838 uid=0 auid=1000 ses=2 msg='op=PAM:setcred grantors=pam_unix,pam_permit,pam_env acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
авг 04 21:21:41 todor-surface kernel: audit: type=1106 audit(1596565301.857:201): pid=6838 uid=0 auid=1000 ses=2 msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
авг 04 21:21:41 todor-surface kernel: audit: type=1104 audit(1596565301.857:202): pid=6838 uid=0 auid=1000 ses=2 msg='op=PAM:setcred grantors=pam_unix,pam_permit,pam_env acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'

The new ipts driver implementation breaks gnome shell

Hi there, Fedora 31/Surface Pro 5 user here.
After installing the new driver and rebooting my device i noticed that gnome shell stops responding correctly to my inputs after a couple of touches and swipes on the icons.
After the bug is engaged gnome shell stops responding to the mouse inputs and the gnome shell bar only responds if the win button is pressed taking me to the opened app overview page as usual.
If I start clicking repeatedly on the bar (only through the mouse) it acts like an "Alt+Tab" trigger and switches to the next opened app without any animation.
I don't have to report any problem for the other app. Firefox keeps reciving the touches correctly and xournalpp seems faster as well while writing with the pen.

IPTS hang type 2

I got another IPTS hang. This time it actually printed errors (and not the ones we enabled for the other issue), so I'm assuming it's a different type of hang:

sep 01 12:46:16 tmarkov-surface kernel: ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: 0x80000005 failed: 11
sep 01 12:46:16 tmarkov-surface kernel: ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Sensor reset: 11
sep 01 12:46:16 tmarkov-surface kernel: ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Restarting IPTS
sep 01 12:46:16 tmarkov-surface kernel: ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: 0x80000004 failed: 3

A question about future development for touch/stylus aspects of the surface line.

I have a SP4 and have been benefiting from the community work on the project since before the jakeday days. Enjoying using the stylus labs write app for all my notes. The machine is on its last legs with the battery bulging the screen out when hot. I would like to make an informed decision about my next surface pro-like purchase. Here are some of the limited options I can think of:

  • SP6 (well supported, but hard to find now and rather expensive when available)
  • SP7 (single touch support)
  • SP7+ (best battery life but no touch or stylus support)
  • SP8 (unclear, maybe can't wait)
  • Dell latitude 7320 detachable (not clear how well linux runs on this)

Could you folks please give me your best guess on potential future support for each of these machines?
This is what I know after poking around here:

  • SP 7: it's a work in progress (#4) but I'm not sure how hopeful people are for the stylus
  • SP7+: it looks far off (#8). is it safe to assume that nobody here plans on working on this?

Any comments or advice that you have on these matters (even on the DELL machine) would be greatly appreciated! Thank you all for you great work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.