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

Bug #1884232 reported by crysman
52
This bug affects 9 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned
Focal
Won't Fix
Undecided
Unassigned
Jammy
Fix Released
Medium
AceLan Kao

Bug Description

[Impact]
E820 reserved retire memory window, and make other hot-added devices unable to get the required memory window.

[Fix]
It only can be fixed by a list of quirk to mark those machines out, and requires below commits from v5.19-rc1 and v5.19-rc3

a2b36ffbf5b6 x86/PCI: Revert "x86/PCI: Clip only host bridge windows for E820 regions"
d341838d776a x86/PCI: Disable E820 reserved region clipping via quirks
fa6dae5d8208 x86/PCI: Add kernel cmdline options to use/ignore E820 reserved regions
4c5e242d3e93 x86/PCI: Clip only host bridge windows for E820 regions
31bf0f433325 x86: Log resource clipping for E820 regions
93d256cd3c1e x86/PCI: Eliminate remove_e820_regions() common subexpressions

[Test]
Verified by the bug reporter.

[Where problems could occur]
The 6 commits are all clean cherry-picked, and the sixth commit reverts the third commit which are the 2 commits that do real functional changes.
a2b36ffbf5b6 ("x86/PCI: Revert \"x86/PCI: Clip only host bridge windows for E820 regions\"")
4c5e242d3e93 ("x86/PCI: Clip only host bridge windows for E820 regions")
The fourth and and fifth commits introduce a new quirk to ignore E820 reserved regions and the quirk only affects the listed machines.
Drivers that operates E820 table may fail if we ignore the E820 regions, but it should have no impact on the listed consumer PCs.

===============================================

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

CVE References

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.

Revision history for this message
Moataz (moataz-zakaria) wrote :
Revision history for this message
Hans de Goede (j-w-r-degoede) wrote :

Sorry that it is taking so long to fix this. There have been several attempts at fixing this upstream already, but all of them had to be reverted/dropped because they were causing issues on other laptop models.

The latest attempt at fixing this is here:
https://<email address hidden>/

And this patch, or something close to it will hopefully go upstream soon.

Perhaps one of the Ubuntu kernel devs can provide a test kernel with this patch for Ubuntu users with this problem to test?

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

There are several users of this laptop, so once patched test kernel is available, we would certainly test it out... This bug is quite SERIOUS and it causes me to stay at 20.10...

Revision history for this message
wilk (j-cubizolles) wrote :

The pci=nocrs option is working again with kernel 5.18. It's still needed to get the touchpad working.

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

Should be fixed by https://git.kernel.org/linus/d341838d776a, which will appear in v5.19-rc1.

Revision history for this message
crysman (crysman) wrote :

Thanks for informing us, Bjorn. That means the safest way to go is wait until one's favourite distro ships kernel 5.19, which requires 5.19 be oficially out (non-rc stable final) - any estimates how long this might be (how much time kernel updates usually need to get from RC1 to final release?)

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

v5.19-rc1 was tagged Sun Jun 5 17:18:54 2022 -0700. Final release likely to be July 24 or 31. The crystal ball: https://hansen.beer/~dave/phb/

Revision history for this message
wilk (j-cubizolles) wrote :

I can confirm that the touchscreen and touchpad are now working, without the pci=nocrs kernel parameters, with kernel 5.19-rc3 in Ubuntu (installed through mainline).

AceLan Kao (acelankao)
Changed in linux (Ubuntu Focal):
status: New → In Progress
Changed in linux (Ubuntu Jammy):
status: New → In Progress
Changed in linux (Ubuntu Focal):
assignee: nobody → AceLan Kao (acelankao)
Changed in linux (Ubuntu Jammy):
assignee: nobody → AceLan Kao (acelankao)
Revision history for this message
AceLan Kao (acelankao) wrote :

It requires below 5 commits for Jammy 5.15 kernel

d341838d776a x86/PCI: Disable E820 reserved region clipping via quirks
fa6dae5d8208 x86/PCI: Add kernel cmdline options to use/ignore E820 reserved regions
4c5e242d3e93 x86/PCI: Clip only host bridge windows for E820 regions
31bf0f433325 x86: Log resource clipping for E820 regions
93d256cd3c1e x86/PCI: Eliminate remove_e820_regions() common subexpressions

Changed in linux (Ubuntu Focal):
status: In Progress → Won't Fix
assignee: AceLan Kao (acelankao) → nobody
Revision history for this message
AceLan Kao (acelankao) wrote :

Here is the test kernel and patches I applied, please give it a try.

BTW, remember to disable secure boot in BIOS if you want to try the test kernel

https://people.canonical.com/~acelan/bugs/lp1884232/

Revision history for this message
Jordan Cooks (notnamed) wrote :

AceLan, I have tested your kernel and touchscreen and touchpad work, without the pci=nocrs GRUB option. Thank you very much!

I have two pieces of feedback on it that I think are specific to my system, but I want to log them in case they aren't. After selecting the patched 5.15 kernel in GRUB, I get the following message for a few seconds before the kernel starts to boot:

"error: null src bitmap in grub_video_bitmap_create_scaled.
Loading Linux 5.15.0-1043-generic ...
Loading initial ramdisk ...

Press any key to continue...."

I believe this is due to my custom GRUB theme, but it wasn't occurring on the 5.19 kernel. On both the 5.19 kernel and the 5.15.0-1043 kernel, booting is very slow - the kernel boot messages seem to take much longer than the stock 5.15 kernel. I assume this is for debugging purposes, but wanted to call it out just in case it's unexpected behavior. I'm more than happy to trade a slower boot for a working device of course! Again, feel free to ignore these quirks if they are specific to my system/expected behavior, I'm just being overly-thorough at this point.

Thank you for backporting this!

Revision history for this message
wilk (j-cubizolles) wrote :

I can confirm that with your 5.15.0-1043-generic kernel, touchpad and touchscreen work without the pci=nocrs kernel parameter. Good job and thank you.

AceLan Kao (acelankao)
description: updated
Stefan Bader (smb)
Changed in linux (Ubuntu Jammy):
importance: Undecided → Medium
status: In Progress → Fix Committed
Revision history for this message
crysman (crysman) wrote :

Still does not work without pci=nocrs on 22.04 (jammy), up-to-date 5.18.10-76051810-generic - what does it mean? It had been working on 5.15 generic and on 5.18 not any more?

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

I don't know what's in the 5.18.10-76051810-generic kernel (I assume that's v5.18 + some Ubuntu patches). The upstream fixes for this went into v5.19: https://git.kernel.org/linus/3cc30140dbe2
I think v5.18 + the following patches (which somebody added in the "Bug Description" at the very beginning of this report) should work:

a2b36ffbf5b6 x86/PCI: Revert "x86/PCI: Clip only host bridge windows for E820 regions"
d341838d776a x86/PCI: Disable E820 reserved region clipping via quirks
fa6dae5d8208 x86/PCI: Add kernel cmdline options to use/ignore E820 reserved regions
4c5e242d3e93 x86/PCI: Clip only host bridge windows for E820 regions
31bf0f433325 x86: Log resource clipping for E820 regions
93d256cd3c1e x86/PCI: Eliminate remove_e820_regions() common subexpressions

Revision history for this message
AceLan Kao (acelankao) wrote :

crysman,

The patch lists the affected platforms that have been reported with the issue. If the test kernel doesn't work for you(but pci=nocrs works), please post the output of 'sudo dmidecode --type 1' here, so that we can add the affected platform to the list.

Revision history for this message
crysman (crysman) wrote :

Well, @acelankao, I am the one who created this bugreport originally, so my platform is certaily affected and I had already posted any info needed.

As @bjorn-helgaas writes, it seems to be fixed in 5.19, I just got confused by #48 and #49 stating it works in 5.15, but I missed the part with custom kernel, my bad, sorry.

=> I will wait for 5.19, thanks everyone for fixing this - it's been a looong journey though - I posted this two years ago... Nevertheless, better late than never, thanks again :)

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (75.1 KiB)

This bug was fixed in the package linux - 5.15.0-47.51

---------------
linux (5.15.0-47.51) jammy; urgency=medium

  * jammy/linux: 5.15.0-47.51 -proposed tracker (LP: #1983903)

  * Jammy update: v5.15.46 upstream stable release (LP: #1981864)
    - UBUNTU: [Packaging] Move python3-dev to build-depends

  * touchpad and touchscreen doesn't work at all on ACER Spin 5 (SP513-54N)
    (LP: #1884232)
    - x86/PCI: Eliminate remove_e820_regions() common subexpressions
    - x86: Log resource clipping for E820 regions
    - x86/PCI: Clip only host bridge windows for E820 regions
    - x86/PCI: Add kernel cmdline options to use/ignore E820 reserved regions
    - x86/PCI: Disable E820 reserved region clipping via quirks
    - x86/PCI: Revert "x86/PCI: Clip only host bridge windows for E820 regions"

  * [SRU][H/OEM-5.13/OEM-5.14/U][J/OEM-5.17/U] Fix invalid MAC address after
    hotplug tbt dock (LP: #1942999)
    - SAUCE: igc: wait for the MAC copy when enabled MAC passthrough

  * Mass Storage Gadget driver truncates device >2TB (LP: #1981390)
    - usb: gadget: storage: add support for media larger than 2T

  * AMD Rembrandt: DP tunneling fails with Thunderbolt monitors (LP: #1983143)
    - SAUCE: drm/amd: Fix DP Tunneling with Thunderbolt monitors
    - drm/amd/display: Fix for dmub outbox notification enable
    - Revert "drm/amd/display: Fix DPIA outbox timeout after S3/S4/reset"
    - drm/amd/display: Reset link encoder assignments for GPU reset
    - drm/amd/display: Fix DPIA outbox timeout after S3/S4/reset
    - drm/amd/display: Fix new dmub notification enabling in DM
    - SAUCE: thunderbolt: Add DP out resource when DP tunnel is discovered.

  * Fix sub-optimal I210 network speed (LP: #1976438)
    - igb: Make DMA faster when CPU is active on the PCIe link

  * e1000e report hardware hang (LP: #1973104)
    - e1000e: Enable GPT clock before sending message to CSME
    - Revert "e1000e: Fix possible HW unit hang after an s0ix exit"

  * ioam6.sh in net from ubuntu_kernel_selftests fails with 5.15 kernels in
    Focal (LP: #1982930)
    - selftests: net: fix IOAM test skip return code

  * Additional fix for TGL + AUO panel flickering (LP: #1983297)
    - Revert "UBUNTU: SAUCE: drm/i915/display/psr: Fix flicker on TGL + AUO panel"
    - drm/i915/display: Fix sel fetch plane offset calculation
    - drm/i915: Nuke ORIGIN_GTT
    - drm/i915/display: Drop PSR support from HSW and BDW
    - drm/i915/display/psr: Handle plane and pipe restrictions at every page flip
    - drm/i915/display/psr: Do full fetch when handling multi-planar formats
    - drm/i915/display: Drop unnecessary frontbuffer flushes
    - drm/i915/display: Handle frontbuffer rendering when PSR2 selective fetch is
      enabled
    - drm/i915/display: Fix glitches when moving cursor with PSR2 selective fetch
      enabled
    - SAUCE: drm/i915/display/psr: Reinstate fix for TGL + AUO panel flicker

  * AMD Yellow Carp DMCUB fw update for s0i3 B0 fixes (LP: #1957026)
    - drm/amd/display: Optimize bandwidth on following fast update
    - drm/amd/display: Fix surface optimization regression on Carrizo
    - drm/amd/display: Reset DMCUB before HW init

  * GPIO character devi...

Changed in linux (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
crysman (crysman) wrote :

I am confirming *no more need* of `pci=nocrs` after latest update.

debug info:
```
$ uname -a
Linux SPIN5 5.19.0-76051900-generic #202207312230~1660780566~22.04~9d60db1 SMP PREEMPT_DYNAMIC Thu A x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Pop
Description: Pop!_OS 22.04 LTS
Release: 22.04
Codename: jammy
```

thanks a lot to everyone! :heart:

Revision history for this message
wilk (j-cubizolles) wrote :

It's booting fine indeed with the regular Ubuntu kernel (5.15.0-47-generic here) but I have many error messages like:

[ 0.802115] kernel: ACPI: button: Sleep Button [SLPB]
[ 0.802196] kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PR00._CPC], AE_NOT_FOUND (20210730/psargs-330)
[ 0.802206] kernel:
[ 0.802207] kernel: No Local Variables are initialized for Method [_CPC]
[ 0.802208] kernel:
[ 0.802208] kernel: No Arguments are initialized for method [_CPC]
[ 0.802209] kernel:
[ 0.802210] kernel: ACPI Error: Aborting method \_SB.PR01._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)

that are not present in mainline kernels (5.19.0-051900-generic for instance).

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-lowlatency-hwe-5.15/5.15.0-48.54~20.04.1 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-hwe-5.15/5.15.0-48.54~20.04.1 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-nvidia/5.15.0-1006.6 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-nvidia/5.15.0-1007.7 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-gkeop-5.15/5.15.0-1003.5~20.04.2 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

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

This is likely a duplicate of https://bugs.launchpad.net/bugs/1878279

The current upstream resolution to this problem is https://git.kernel.org/linus/d341838d776a ("x86/PCI: Disable E820 reserved region clipping via quirks"), which relies on quirks that match DMI Vendor, Product Version, Product Name, and Board Name. This isn't an ideal solution because there are likely other systems we don't know about that need a similar fix.

The patch I'm attaching here is an experimental idea to work around this issue without the maintenance burden of the quirks.

If anybody would be willing to test this patch, I would be very grateful. To test it, apply this patch to your kernel, boot with "pci=use_e820 efi=debug", and collect the dmesg log.

tags: added: patch
Revision history for this message
crysman (crysman) wrote :

Hello, since I do not like the idea of maintaining quirks neither, I could help you, but the problem is I'm very busy lately - if you could describe (or provide link to) more detailed howto, I would test it. I just cannot spend extra time figuring-out the details... I've become more of a "just user" of my computer rather than former "hack-the-best-out-of-it kinda' geek", sorry...

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

No worries, your report and testing so far has been an immense help, so thank you for that!

https://git.kernel.org/linus/07eab0901ede ("efi/x86: Remove EfiMemoryMappedIO from E820 map") is essentially the same as the test patch from comment #62, and it appeared in v6.2-rc1, so just wait for a kernel image that includes that.

It turned out that 07eab0901ede broke extended config space on some systems, so there's a fix for that (https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/commit/?id=ac729baefdc3) that should appear in v6.2-rc4.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-mtk/5.15.0-1030.34 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy-linux-mtk' to 'verification-done-jammy-linux-mtk'. If the problem still exists, change the tag 'verification-needed-jammy-linux-mtk' to 'verification-failed-jammy-linux-mtk'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-jammy-linux-mtk-v2 verification-needed-jammy-linux-mtk
To post a comment you must log in.