FS#69375 - Touching the screen with Wacom pen causes system to crash

Attached to Project: Arch Linux
Opened by Jonas Mayerhofer (jon_ma) - Tuesday, 19 January 2021, 21:52 GMT
Last edited by Jan Alexander Steffens (heftig) - Sunday, 24 January 2021, 00:56 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To No-one
Architecture x86_64
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

After Upgrading to Kernel Version 5.10.8 the system crashes as soon as i touch the screen with the Wacom AES Pen.
System: IBM Thinkpad X1 Yoga 2017, Built-in Wacom digitizer: Wacom ISDv4 50b4.
Issue does not affect using the touchscreen with fingers.
Downgrading the Kernel to Version 5.10.7 fixed the issue for me.
This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Sunday, 24 January 2021, 00:56 GMT
Reason for closing:  Fixed
Additional comments about closing:  linux 5.10.10.arch1-1
Comment by Jonas Mayerhofer (jon_ma) - Tuesday, 19 January 2021, 22:04 GMT
Contains Information about the as 'stylus' being invalid for the Wacom Device
Comment by loqs (loqs) - Tuesday, 19 January 2021, 22:19 GMT Comment by Devyn Keeney (devyntk) - Wednesday, 20 January 2021, 01:38 GMT
Using wayland with gnome-shell here, so I don't have the same X logs as linked above but attached is the kernel error that I get when I attempt to use the pen on my Dell XPS 13 2-in-1 7390 using a AES 2.0 Pen. Touchscreen works before the pen usage, and not after. Downgrading also has fixed the issue for me.
Comment by loqs (loqs) - Wednesday, 20 January 2021, 02:57 GMT
If the issue is still present using linux 5.10.9.arch1-1 (currently in testing) try building the package from source with the attached diff applied.
Comment by dfessor (fessor) - Wednesday, 20 January 2021, 05:56 GMT
I also have an issue with my touchscreen. After updating on 19.01.21 (last update was 09.01.21) my touchscreen (including Pen) stopped working. My guess was, that it's an issue with the *nvidia* package, because using 'pacman -U /var/cache/pacman/pkg/nvidia-460.32.03-1-x86_64.pkg.tar.zst' fixed the issue for one boot. But now it crashes after I touch the Screen with the pen.

Should I file another/different Task?

Further Information:
* Hardware: Lenovo Ideapad C340
* Issue happend after updating on 19.01.21. Last update was 09.01.21
* Error: wacom_wac_queue_insert: kfifo has filled, starting to drop events
(for more information see dmesg.log)

Edit:
- Downgrading linux-headers (5.10.8.arch1-1 -> 5.10.5.arch1-1) did not help
- Upgrading to 5.10.9-arch1-1 in testing didn't resolve the problem either. I'll try building the package from source with the attached diff from above later.
- I don't seem to understand the process of "applying the PKGBUILD.diff". I cloned the repository of linux ('git clone https://git.archlinux.org/linux.git';) and copied PKGBUILD.diff into the linux-folder. Then I used 'git apply -v PKGBUILD.diff' which output:
Checking patch trunk/PKGBUILD...
error: trunk/PKGBUILD: No such file or directory
- Downgrading linux AND linux-headers to 5.10.5.arch1-1 via 'pacman -U /var/cache/pacman/pkg/linux-5.10.5.arch1-1-x86_64.pkg.tar.zst /var/cache/pacman/pkg/linux-headers-5.10.5.arch1-1-x86_64.pkg.tar.zst' did work.
Comment by loqs (loqs) - Wednesday, 20 January 2021, 16:05 GMT
@fessor
git clone git://git.archlinux.org/svntogit/packages.git --single-branch --branch "packages/linux"
cd packages/trunk
curl -o PKGBUILD.diff https://bugs.archlinux.org/task/69375?getfile=19649
git apply -v PKGBUILD.diff
makepkg -rsi
Comment by Zer0 (zZer0) - Wednesday, 20 January 2021, 21:19 GMT
@loqs
Unfortunately your solution did not solve the problem.
Comment by Zer0 (zZer0) - Wednesday, 20 January 2021, 21:26 GMT
As OP and dfessor stated, downgrading to 5.10.5.arch1-1 did work.
Comment by loqs (loqs) - Wednesday, 20 January 2021, 21:50 GMT
@zZero did you try downgrading to 5.10.7-arch1-1?

@zZero please try the following which will build 5.10.8 without local Arch patches to see if they are the cause

cd packages/trunk/src/archlinux-linux
git reset --hard
git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
git fetch stable
git checkout v5.10.8
cd ../..
makepkg -ersif

If that fails test if locally built v5.10.7 has the issue
cd packages/trunk/src/archlinux-linux
git checkout v5.10.7
cd ../..
makepkg -ersif
Comment by SATO Tatsuya (tattsan) - Thursday, 21 January 2021, 06:58 GMT
It seems that the author of the driver has figured out the issue.

https://github.com/linuxwacom/input-wacom/issues/230
Comment by SATO Tatsuya (tattsan) - Thursday, 21 January 2021, 07:07 GMT
I've tried the fixed module above with kernel 5.10.9, the issue has gone.
Comment by loqs (loqs) - Thursday, 21 January 2021, 15:40 GMT
@tattsan so the bug was in a kernel module provided by the AUR package input-wacom-dkms?
Edit:
Misunderstood you are using input-wacom-dkms as a work-around to fix a bug still present in the in kernel wacom module.

attached patch change paths inside [1] so it can be applied to kernel tree without using special patch arguments.

[1] https://github.com/jigpu/input-wacom/commit/6912b5b2e86a82b3d11d2634850ba10bbc729dac.patch
Comment by SATO Tatsuya (tattsan) - Thursday, 21 January 2021, 16:21 GMT
@loqs That's right.
Comment by loqs (loqs) - Thursday, 21 January 2021, 16:25 GMT
@tattsan I patched the kernel source then rebuilt the kernel. Both methods should work equally as well.
Comment by dfessor (fessor) - Friday, 22 January 2021, 05:44 GMT
@loqs: Although downgrading to 5.10.5-arch1-1 worked for me I'm willing to test the solution you posted at Wednesday, 20 January 2021, 21:50 GMT if it helps you in any way. Please answer if I should.
Comment by shapeshifter (shapeshifter) - Saturday, 23 January 2021, 03:32 GMT
I can confirm this problem exists with 5.10.9-arch1-1 on a Dell XPS 2-in-1 (7390) and that building and installing the version referenced above (git clone -b fix-230 https://github.com/jigpu/input-wacom.git) fixes the problem. For me, there's no complete system crash but the kernel crashes and recovers, disabling the touch functionality permanently until a reboot.
Comment by loqs (loqs) - Sunday, 24 January 2021, 00:06 GMT
@fessor thank you but no no need it should be fixed in 5.10.10-arch1 by [1]

[1] https://git.archlinux.org/linux.git/commit/?id=85c0c0e3a81f87290db5e881af609d51021b54b7

Loading...