Touchpad support on Acer laptop (Gemini Lake platform)

Hi,
recently I bought an Acer Travelmate B118-M (Pentium Silver 5000) and installed the actual Manjaro. Everything runs fine except the touchpad (tested all available kernels).
Here [https://lkml.org/lkml/2019/9/3/191] I found the reason for the problem (It's exactly mine).
The guys built a patch and as far I understand sent it to the kernel-maintainers (and have it for immediate download).
Does anybody know, when this patch gets included in the regular Manjaro-kernel?

My last own kernel is >20 years back and one thread I found here stopped my enthusiasm...
So I have to sit and wait ???
regards,
Wolfgang

If you're still interested in applying the patch yourself, here is a howto: How to compile the mainline Kernel the Manjaro way

Thanks for this hint! Will go and try this. Pray for me :wink:

Edit: just this thread has been my show-stopper...

Oh.
Don't know, when your touchpad fix will end up in mainline kernel, but when it does it won't be long before Manjaro picks it up. Having multiple kernel choices including the very fresh ones is something of a speciality of Manjaro.

My 1st compile (makepkg -s) on regular kernel succeeded. Will now take very small steps forward...
Need to find a way to test the new kernels without breaking my whole system (that's not my regular job :wink:

I found, their patch seems to be a diff, but the 'official' patches are AFIK from git.
That's far beyond my level of knowledge...
Can you point me to some material that may help me continue?

patch utility may be of help in this case: https://en.wikipedia.org/wiki/Patch_(Unix)

$ pacman -Syu patch

Yeah, thats clear. But how do I get such diff into a regular, semi-official patch, which I can feed into the makepkg-cycle?
The format seems very different to me...

If you followed the howto you have cloned the git repository containing a PKGBUILD and several patches. To additionally apply your patch:

  • copy your patchfile to the same directory as 0099-touchpad-support-for-acer-laptop.patch
  • edit PKGBUILD file to apply your patch: add a line to the prepare() function similar to the ones already present, something like
  # touchpad support on acer laptop
  patch -Np1 -i '../0099-touchpad-support-for-acer-laptop.patch'

Now prepare/build the package

$ makepkg -s

That should build a kernel with your additional patch applied.

OK, thank you so much!!!
Will try this way next. I think, these are the missing steps I looked for :slight_smile:
Going to work...

No success :frowning:
Followed your instructions exactly, 3 different attempts, each ended in 'file not found' (patch-file).
Have put the line on different places in PKGBUILD (last immediately after ELANTECH...) but no success, patchfile in same dir as PKGBUILD as you advised.

" patch: **** Can't open patch file..."

Used copy&paste and double-checked for typos. Same owner, mask is 644.

But there is no symlink created in the src-dir! How can I get that?

Edit: Have put a line under 'source' - new error is sha256-error.
Searching on...

Edit2: switching off all checks in pkgbuild runs until:

patching file drivers/mfd/intel-lpss-pci.c
patch: **** malformed patch at line 12:

This brings me back to my very first question:
How to form a 'legal' patch from this diff-file these guys offered ?

Ah yes, I missed the source array amendment. Glad you found out yourself. I managed to get the patch applied using this patchfile:

--- a/drivers/mfd/intel-lpss-pci.c	2019-07-08 00:41:56.000000000 +0200
+++ b/drivers/mfd/intel-lpss-pci.new.c	2019-09-15 20:29:47.468597993 +0200
@@ -97,7 +97,7 @@
 };
 
 static struct property_entry bxt_i2c_properties[] = {
-	PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 42),
+	PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 230),
 	PROPERTY_ENTRY_U32("i2c-sda-falling-time-ns", 171),
 	PROPERTY_ENTRY_U32("i2c-scl-falling-time-ns", 208),
 	{ },

with the method I described above (with the source array amendment).

Hint: When the build fails due to

patch: **** malformed patch at line 12

or whatever error, one can cd into src/linux-5.2 and tune that patch-command which is to be inserted into the prepare() function of the PKGBUILD until everything works as intended.

sorry, but no more ideas here.
Your version produced this error:

patching file drivers/mfd/intel-lpss-pci.c
Hunk #1 FAILED at 97.
1 out of 1 hunk FAILED -- saving rejects to file drivers/mfd/intel-lpss-pci.c.rej
==> FEHLER: Ein Fehler geschah in prepare().
Breche ab...

Don't know what to tune and how...
I'm on kernel 4.19 because my system is still using that (but have tested all others).
Do you think a wrong line-counter may trigger this error?
Will pull a 5.2 for testing.

Edit: 5.2.14 stops with another error:
==> FEHLER: 0003-btrfs-fix-unwritten-extent-buffers-and-hangs.patch wurde nicht im build Verzeichnis gefunden und ist keine URL.

OP needs some relaxing...

Exactly.
An adjusted patch-file for linux419 looks like this:

--- a/drivers/mfd/intel-lpss-pci.c	2018-10-22 08:37:37.000000000 +0200
+++ b/drivers/mfd/intel-lpss-pci.c	2019-09-16 08:37:40.650073642 +0200
@@ -101,7 +101,7 @@
 };
 
 static struct property_entry bxt_i2c_properties[] = {
-	PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 42),
+	PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 230),
 	PROPERTY_ENTRY_U32("i2c-sda-falling-time-ns", 171),
 	PROPERTY_ENTRY_U32("i2c-scl-falling-time-ns", 208),
 	{ },

Oh, thank you so much!
This job is beyond my horizon...
Will give it a try as soon as possible.

Sorry, but still no success:

patching file drivers/mfd/intel-lpss-pci.c
Hunk #1 FAILED at 101.
1 out of 1 hunk FAILED -- saving rejects to file drivers/mfd/intel-lpss-pci.c.rej
==> FEHLER: Ein Fehler geschah in prepare().
Breche ab...

Patchfile used:

--- drivers/mfd/intel-lpss-pci.c 2018-10-22 08:37:37.000000000 +0200
+++ drivers/mfd/intel-lpss-pci.c 2019-09-16 08:37:40.650073642 +0200
@@ -101,7 +101,7 @@
};
.
static struct property_entry bxt_i2c_properties[] = {

  • PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 42),
  • PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 230),
    PROPERTY_ENTRY_U32("i2c-sda-falling-time-ns", 171),
    PROPERTY_ENTRY_U32("i2c-scl-falling-time-ns", 208),
    { },

The errormessage is very, very helpful...
(minus / plus in 'PROPERTY...' are correct, don't know how to manage here.)

BTW: is there a way to re-use the whole tree (like 'make clean')?

Probably some whitespace mismatch since there are tabulator-characters used in that file. Download the patch file from here (pastebin) (note to self: should have done this from the beginning).

PS: use the </> button in posts to properly format (terminal) output. Makes for better reading.

Wow, what a hard nut. And a few lines only...
Have downloaded your file (the raw one), thank you very much!
Will give it a try asap.

Did some dry run with your file:

$ patch --dry-run -Np1 -i '../Wo_Acer_B118_patch4.patch'
checking file drivers/mfd/intel-lpss-pci.c
Hunk #1 FAILED at 101.
1 out of 1 hunk FAILED

then changed the line-numbers to '@@ -97,4 +97,5 @@':

$ patch --dry-run -Np1 -i '../Wo_Acer_B118_patch4.patch'
checking file drivers/mfd/intel-lpss-pci.c
patch: **** malformed patch at line 9:   PROPERTY_ENTRY_U32("i2c-sda-falling-time-ns", 171),

:rage::rage::rage:

Edit: will try to adjust better the line numbers. HTH
Edit2: no success. Will try a new (own) diff from manually edited files.

Got it! And it works!!! :blush:
Never had such trouble on pure whitespace.

Here is the patch:

--- a/drivers/mfd/intel-lpss-pci.c
+++ b/drivers/mfd/intel-lpss-pci.c
@@ -97,7 +97,7 @@ static const struct intel_lpss_platform_info bxt_uart_info = {
 };

 static struct property_entry bxt_i2c_properties[] = {
-       PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 42),
+       PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 230),
        PROPERTY_ENTRY_U32("i2c-sda-falling-time-ns", 171),
        PROPERTY_ENTRY_U32("i2c-scl-falling-time-ns", 208),
        { },
 };

Note: the whitespace in the patchfile has to correspond EXACTLY with sourcefile.
Thanks to freggel.doe for this hint!
Sourcefile is from actual kernel 4.19, date 22-Oct-2018, size 11638.

Just copied over the new .ko - file, reboot & enjoy!!!

Forum kindly sponsored by