touchpad and touchscreen doesn't work at all on ACER Spin 5 (SP513-54N)

Bug #1884232 reported by crysman
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned

Bug Description

Touchpad is not working at all on ACER Spin 5 SP513-54N.

According to https://wiki.ubuntu.com/DebuggingTouchpadDetection#In_case_your_Touchpad_doesn.27t_work_at_all_.28No_response_from_the_Touchpad.29 I am creating this kernel bug issue.

There are more issues, too, like touchscreen not working and Ubuntu not installable - see here if interrested https://askubuntu.com/questions/1251719/

I would like to run Ubuntu on this machine and I am willing to help with any debug or kernel tweaking... Please let me know.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-5.4.0-26-generic 5.4.0-26.30
ProcVersionSignature: Ubuntu 5.4.0-26.30-generic 5.4.30
Uname: Linux 5.4.0-26-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: ubuntu 4195 F.... pulseaudio
CasperMD5CheckResult: skip
CasperVersion: 1.445
CurrentDesktop: ubuntu:GNOME
Date: Fri Jun 19 10:44:58 2020
LiveMediaBuild: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
MachineType: Acer Spin SP513-54N
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/username.seed maybe-ubiquity quiet splash ---
RelatedPackageVersions:
 linux-restricted-modules-5.4.0-26-generic N/A
 linux-backports-modules-5.4.0-26-generic N/A
 linux-firmware 1.187
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 02/21/2020
dmi.bios.vendor: Insyde Corp.
dmi.bios.version: V1.00
dmi.board.name: Caboom_IL
dmi.board.vendor: IL
dmi.board.version: V1.00
dmi.chassis.type: 31
dmi.chassis.vendor: Acer
dmi.chassis.version: V1.00
dmi.modalias: dmi:bvnInsydeCorp.:bvrV1.00:bd02/21/2020:svnAcer:pnSpinSP513-54N:pvrV1.00:rvnIL:rnCaboom_IL:rvrV1.00:cvnAcer:ct31:cvrV1.00:
dmi.product.family: Spin 5
dmi.product.name: Spin SP513-54N
dmi.product.sku: 0000000000000000
dmi.product.version: V1.00
dmi.sys.vendor: Acer

Revision history for this message
crysman (crysman) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
crysman (crysman) wrote : Re: touchpad doesn't work at all on ACER Spin 5
Revision history for this message
crysman (crysman) wrote :

I've tried adding these kernel parameters in GRUB before boot placing them just between the "splash" and "---":

    i8042.nopnp=1 pci=nocrs

(according to here https://www.reddit.com/r/linuxquestions/comments/f9h0q4/touchpad_issue_lenovo_s14515iil/fmg277m/ )

And voila!
- Touchpad is working
- Touchscreen is working
- pen/Stylus is NOT working properly - it behaves only just like if using a finger - no additional functionality except for basic "clicking"

BUT! according to kernel documentation ( https://www.kernel.org/doc/html/v4.10/admin-guide/kernel-parameters.html ) - this is a BUG and shall be reported:

                nocrs [X86] Ignore PCI host bridge windows from ACPI.
                                If you need to use this, please report a bug.

So... what are next steps, please?

Thanks

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

[ 0.742017] pci 0000:00:15.0: BAR 0: no space for [mem size 0x00001000 64bit]
[ 0.742017] pci 0000:00:15.0: BAR 0: failed to assign [mem size 0x00001000 64bit]
[ 0.742019] pci 0000:00:15.1: BAR 0: no space for [mem size 0x00001000 64bit]
[ 0.742019] pci 0000:00:15.1: BAR 0: failed to assign [mem size 0x00001000 64bit]
[ 0.742020] pci 0000:00:15.2: BAR 0: no space for [mem size 0x00001000 64bit]
[ 0.742021] pci 0000:00:15.2: BAR 0: failed to assign [mem size 0x00001000 64bit]
...
[ 2.277616] platform i2c_designware.0: failed to claim resource 0: [mem 0x00000000-0x000001ff]

Revision history for this message
crysman (crysman) wrote :

OK, I've successfully installed Ubuntu.
Made successfully apt update && upgrade.
Modified kernel boot parameters:

$ cat /etc/default/grub | grep -i linux_default
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nopnp=1 pci=nocrs"
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

And here I am attaching current dmesg and xinput outputs.?field.comment=OK, I've successfully installed Ubuntu.
Made successfully apt update && upgrade.
Modified kernel boot parameters:

$ cat /etc/default/grub | grep -i linux_default
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nopnp=1 pci=nocrs"
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

And here I am attaching current dmesg and xinput outputs.

There are several errors out there in dmesg:

1)
[ 0.083626] DMAR: DRHD: handling fault status reg 3
[ 0.083629] DMAR: [DMA Read] Request device [00:02.0] PASID ffffffff fault addr 3b90e000 [fault reason 06] PTE Read access is not set

2)
[ 5.108760] sof-audio-pci 0000:00:1f.3: unexpected ipc interrupt raised!
[ 5.108761] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0

3)
[ 5.754153] iwlwifi 0000:00:14.3: BIOS contains WGDS but no WRDS

4)
[ 18.758249] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0

Revision history for this message
crysman (crysman) wrote :
Revision history for this message
Bjorn Helgaas (bjorn-helgaas) wrote :

This looks like a BIOS defect. BIOS programmed BAR 0 to [mem 0xfe010000-0xfe010fff], but according to the PCI0 _CRS method, that area is not routed to the PCI bus:

  ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-fe])
  pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
  pci_bus 0000:00: root bus resource [mem 0x3f800000-0xbfffffff window]
  pci 0000:00:1f.5: [8086:34a4] type 00 class 0x0c8000
  pci 0000:00:1f.5: reg 0x10: [mem 0xfe010000-0xfe010fff]
  pci 0000:00:1f.5: can't claim BAR 0 [mem 0xfe010000-0xfe010fff]: no compatible bridge window
  pci 0000:00:1f.5: BAR 0: no space for [mem size 0x00001000]
  pci 0000:00:1f.5: BAR 0: trying firmware assignment [mem 0xfe010000-0xfe010fff]
  pci 0000:00:1f.5: BAR 0: [mem 0xfe010000-0xfe010fff] conflicts with Reserved [mem 0xfc800000-0xfe7fffff]
  pci 0000:00:1f.5: BAR 0: failed to assign [mem size 0x00001000]

Can you check to see whether a BIOS update is available?

Can you please attach the contents of /proc/iomem (I think you have to save the contents as root in order to see the values).

Revision history for this message
crysman (crysman) wrote :

Here it is - which lines you need to see? I am cautious here to post all the lines due to security reasons, these data are quite confidential and good-to-have if you want to crack/penetrate a system...

Thank you very much for your effort!

Revision history for this message
crysman (crysman) wrote :

and no, unfortunately, officially there is no BIOS update available [ https://www.acer.com/ac/en/US/content/support-product/8338?b=1&pn=NX.HQUEC.003 ]

Revision history for this message
crysman (crysman) wrote :

But once there is a consensus it's a BIOS bug, I will communicate it with ACER to have it fixed (I hope).

Anyone has seen a similar error already?

Revision history for this message
Bjorn Helgaas (bjorn-helgaas) wrote :

It looks like a BIOS bug to me.

But Windows does work, and Linux should, too. It looks like there's plenty of available space for 00:1f.5 BAR 0. Can you try a current version of Linux, e.g., v5.8-rc1 with the command line argument 'dyndbg="file drivers/pci/* +p"'? There were some significant resource assignment changes in v5.5.

AIDA64 (https://www.aida64.com/) has a free trial version that should show the PCI address map under Windows. I assume it probably moved 00:1f.5 BAR 0 to somewhere inside the PCI host bridge window.

Revision history for this message
crysman (crysman) wrote :

Thank you Bjorn,

1) do you suggest building my own kernel locally according to here https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel or do you have any specific kernel to use (like from PPA ?

2) I will get AIDA info for you, meanwhile, I'm already having this output from hwinfo64 windows app (attached) - maybe it helps already (?)

many thanks, really appreciate your help!

Revision history for this message
crysman (crysman) wrote :

attaching hwinfo log...

Revision history for this message
crysman (crysman) wrote :

@Bjorn 3) would be helpful to try the kernel boot parameter dyndbg=... provided in my current kernel (5.4.0-37-generic)?

Revision history for this message
crysman (crysman) wrote :

ad 2) here you have AIDA64 ACPI report

Revision history for this message
crysman (crysman) wrote :

and here Device Resources Report

Revision history for this message
Bjorn Helgaas (bjorn-helgaas) wrote :

1) Sorry, I don't have a PPA or similar kernel image for you to try.

2) I expected that Windows would move 00:1f.5 BAR 0 to be inside the windows reported by the PCI0 _CRS, but the AIDA64 report shows otherwise:

    B00 D1F F05: Intel Ice Point-LP PCH - SPI (Flash) Controller

      Offset 000: 86 80 A4 34 06 04 00 00 30 00 80 0C 00 00 00 00
      Offset 010: 00 00 01 FE 00 00 00 00 00 00 00 00 00 00 00 00

BAR 0 is at offset 0x10, and it still contains the value BIOS put there (0xfe010000).

I don't know why Linux couldn't find space for 00:1f.5 BAR 0. Tracing the resource assignment code with 'dyndbg="file drivers/pci/* +p"' and possibly some new trace messages might give a clue.

When Linux fails to assign space, it tries to revert to the BIOS assignment ("BAR 0: trying firmware assignment [mem 0xfe010000-0xfe010fff]"). Apparently we declined to use that BIOS assignment because it "conflicts with Reserved [mem 0xfc800000-0xfe7fffff]". Perhaps Linux should ignore that conflict.

That "Reserved [mem 0xfc800000-0xfe7fffff]" comes from the E820 map, and the Linux handling of that map is somewhat haphazard.

You-Sheng Yang (vicamo)
tags: added: hwe-touchpad
Revision history for this message
crysman (crysman) wrote :

Sorry for delay, I'll look into it on Thursday I hope - just letting you know I'm still on it, just overwhelmed by work these days...

Revision history for this message
crysman (crysman) wrote :

I've just updated to 5.4.0-40, going to reboot and test it now, if it does not work, will try some 5.8 kernel with that parameter (if successful with https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel) thanks

Revision history for this message
crysman (crysman) wrote :

Hi @Bjorn,

is this the right kernel to test on?
https://code.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/unstable/+ref/master-5.8

I'm just git-cloning it..

Once compiled and set, you need me to boot with 'quiet splash dyndbg="file drivers/pci/* +p"' instead of current 'quiet splash i8042.nopnp=1 pci=nocrs' in GRUB and send dmesg output again? Is that correct?

Thank you

Revision history for this message
Bjorn Helgaas (bjorn-helgaas) wrote :

Yes, I think that kernel is fine.

You can leave the i8042.nopnp=1 in your kernel command line parameters. Otherwise it looks right.

Revision history for this message
crysman (crysman) wrote :

OK, compiling...

once a while I see a warning like this:
"""
function 'walk_remove_by_peer.isra.0':
/home/crysman/Downloads/kernels/unstable/drivers/net/wireguard/allowedips.c:121:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
"""

that is normal?

Revision history for this message
crysman (crysman) wrote :

@Bjorn, bad news, I got stuck in compiling on this:
"""
...
BTF: .tmp_vmlinux.btf: pahole version v1.15 is too old, need at least v1.16
Failed to generate BTF for vmlinux
Try to disable CONFIG_DEBUG_INFO_BTF
...
"""

I cannot compile newer Pahole (https://git.kernel.org/pub/scm/devel/pahole/pahole.git) since it gets interrupted with this error:
"""
...
CMake Error at CMakeLists.txt:55 (message):
  The submodules were not downloaded! GIT_SUBMODULE was turned off or failed.
  Please update submodules and try again.
...
"""

May I disable CONFIG_DEBUG_INFO_BTF as proposed? If so, where do I disable it? Thanks a lot #McZ

Revision history for this message
crysman (crysman) wrote :

I've just returned from vacation... willing to work/help on this issue - I need an answer to whether if I may disable CONFIG_DEBUG_INFO_BTF as proposed - see #24 thanks.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Yes please disable CONFIG_DEBUG_INFO_BTF.

Revision history for this message
crysman (crysman) wrote :
Revision history for this message
crysman (crysman) wrote :

Ad #27-1) Well, according to here https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel#Building_the_kernel it seems I will need that _all.deb package, too, so, I'm on it... installing all four:

"""
crysman@SPIN5:~/Downloads/kernels-Ubuntu$ sudo dpkg -i linux-*.deb
[sudo] password for crysman:
Selecting previously unselected package linux-headers-5.8.0-050800.
(Reading database ... 224125 files and directories currently installed.)
Preparing to unpack linux-headers-5.8.0-050800_5.8.0-050800.202007052030_all.deb ...
Unpacking linux-headers-5.8.0-050800 (5.8.0-050800.202007052030) ...
Selecting previously unselected package linux-headers-5.8.0-050800-generic.
Preparing to unpack linux-headers-5.8.0-050800-generic_5.8.0-050800.202007052030_amd64.deb ...
Unpacking linux-headers-5.8.0-050800-generic (5.8.0-050800.202007052030) ...
Selecting previously unselected package linux-image-unsigned-5.8.0-050800-generic.
Preparing to unpack linux-image-unsigned-5.8.0-050800-generic_5.8.0-050800.202007052030_amd64.deb ...
Unpacking linux-image-unsigned-5.8.0-050800-generic (5.8.0-050800.202007052030) ...
Selecting previously unselected package linux-modules-5.8.0-050800-generic.
Preparing to unpack linux-modules-5.8.0-050800-generic_5.8.0-050800.202007052030_amd64.deb ...
Unpacking linux-modules-5.8.0-050800-generic (5.8.0-050800.202007052030) ...
Setting up linux-headers-5.8.0-050800 (5.8.0-050800.202007052030) ...
Setting up linux-headers-5.8.0-050800-generic (5.8.0-050800.202007052030) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.8.0-050800-generic
   ...done.
Setting up linux-modules-5.8.0-050800-generic (5.8.0-050800.202007052030) ...
Setting up linux-image-unsigned-5.8.0-050800-generic (5.8.0-050800.202007052030) ...
I: /boot/vmlinuz.old is now a symlink to vmlinuz-5.4.0-40-generic
I: /boot/initrd.img.old is now a symlink to initrd.img-5.4.0-40-generic
I: /boot/vmlinuz is now a symlink to vmlinuz-5.8.0-050800-generic
I: /boot/initrd.img is now a symlink to initrd.img-5.8.0-050800-generic
Processing triggers for linux-image-unsigned-5.8.0-050800-generic (5.8.0-050800.202007052030) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.8.0-050800-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.8.0-050800-generic
modinfo: ERROR: could not get modinfo from 'da903x': No such file or directory
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.8.0-050800-generic
Found initrd image: /boot/initrd.img-5.8.0-050800-generic
Found linux image: /boot/vmlinuz-5.4.0-40-generic
Found initrd image: /boot/initrd.img-5.4.0-40-generic
Found linux image: /boot/vmlinuz-5.4.0-39-generic
Found initrd image: /boot/initrd.img-5.4.0-39-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings
done
"""

going to reboot with 'quiet splash i8042.nopnp=1 dyndbg="file drivers/pci/* +p"' ...

Revision history for this message
crysman (crysman) wrote :

OK, done, here is current dmesg on latest kernel with `"dyndbg=file drivers/pci/* +p"`

precise boot parameters are:
"""
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.8.0-050800-generic root=UUID=415eed75-e8aa-4b5a-a49d-51f5b103641e ro quiet splash i8042.nopnp=1 "dyndbg=file drivers/pci/* +p"
"""

uname here:
"""
$ uname -a
Linux SPIN5 5.8.0-050800-generic #202007052030 SMP Mon Jul 6 00:37:33 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
"""

Awaiting further info from you guys now... Thanks a lot so far!

Revision history for this message
crysman (crysman) wrote :

And since without `pci=nocrs` touchpad and touchscreen are not working at all, attaching also second dmesg:
"""
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.8.0-050800-generic root=UUID=415eed75-e8aa-4b5a-a49d-51f5b103641e ro quiet splash i8042.nopnp=1 pci=nocrs "dyndbg=file drivers/pci/* +p" vt.handoff=7
"""

Revision history for this message
crysman (crysman) wrote :

Hi there, anything I can do more here to move this forward? I am aware this might be a complicated issue to solve :/ Thanks a lot

Revision history for this message
Arglebargle (arglebargle) wrote :

I'm also affected by this. Ping me if I can help move this along in any way, I'm happy to test.

Revision history for this message
crysman (crysman) wrote :

It seems we got stuck here, I've done everything I was asked for, now we need somebody kernel-competent to review what I've posted and... let's hope it will not take too long. If anybody else is affected, please mark so at the top ("this affects me too") - to give this bug more heat points. Thanks a lot to everyone involved!

crysman (crysman)
summary: - touchpad doesn't work at all on ACER Spin 5
+ touchpad and touchscreen doesn't work at all on ACER Spin 5
Revision history for this message
Bjorn Helgaas (bjorn-helgaas) wrote : Re: touchpad and touchscreen doesn't work at all on ACER Spin 5

Chime in on this email thread if interested: https://lore.kernel.org/r/20200723201403.GA1450503@bjorn-Precision-5520
There are instructions at the bottom of that page about how to reply to the thread.

crysman (crysman)
summary: - touchpad and touchscreen doesn't work at all on ACER Spin 5
+ touchpad and touchscreen doesn't work at all on ACER Spin 5 (SP513-54N)
Revision history for this message
Hunter Perrin (hperrin) wrote :

Thank you for the workaround! With the latest Ubuntu this works with just the "pci=nocrs" parameter. The pen input works fully in Wayland, but not at all in X11.

Also, I wrote an installation guide for this laptop with more fixes and tips:
https://sciactive.com/2020/12/04/how-to-install-ubuntu-on-acer-spin-5-sp513-54n-for-the-perfect-linux-2-in-1/

Revision history for this message
Hunter Perrin (hperrin) wrote :

Actually, it looks like the pen is working in X11. Never mind that part.

Revision history for this message
Michael Flint (mflint64) wrote :

This workaround (pci=nocrs) sorted my Touchpad issues on a Clevo NL51LU; it wasn't being detected due to the 'resource claim' issue at boot, as above.
See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1904052.

Incidentally, I tried kernels up to 5.10.0 and same problem.

To post a comment you must log in.