[ltp] Re: Gen 2 (Haswell) X1 Carbon suspend to RAM hang
Bjørn Mork
linux-thinkpad@linux-thinkpad.org
Mon, 22 Sep 2014 12:27:41 +0200
Nikos Alexandris <nik@nikosalexandris.net> writes:
> ..
>
> Bjørn:
>
>>> Maybe it's conflicting with some other unrelated change?
>
> Nikos:
>
>> So, I should simply try to force
>> applying the patch? And even then, the "old" method of `rmmdod
>> thinkpad_acpi` responds always with "rmmod: ERROR: Module
>> thinkpad_acpi is in use".
>
>> I have the source and the headers of linux-3.14.19 beforehand.
>> Though, I am running on
>>
>> <https://github.com/fearedbliss/bliss-overlay/blob/master/sys-kernel/bli=
ss-kernel/bliss-kernel-3.14.19.ebuild>.
>
> So, here is some attempt:
>
> --%<---
> tpx1c2g linux-3.14.19 # patch -p1 < /tmp/foo
> patching file drivers/platform/x86/thinkpad_acpi.c
> Reversed (or previously applied) patch detected! Assume -R? [n] n
> Apply anyway? [n] y
> Hunk #1 succeeded at 3537 with fuzz 1 (offset 100 lines).
> Hunk #2 FAILED at 3556.
> 1 out of 2 hunks FAILED -- saving rejects to file
> drivers/platform/x86/thinkpad_acpi.c.rej
> patch unexpectedly ends in middle of line
> --->%--
>
> and
>
> --%<---
> cat drivers/platform/x86/thinkpad_acpi.c.rej
> --- drivers/platform/x86/thinkpad_acpi.c
> +++ drivers/platform/x86/thinkpad_acpi.c
> @@ -3556,6 +3656,8 @@
> *ignore_acpi_ev = true;
> }
> return true;
> + } else {
> + return
> adaptive_keyboard_hotkey_notify_hotkey(scancode);
> }
> return false;
> }
> --->%--
So this failed hunk looks like something that should be fairly easy to
add by hand. Just open the drivers/platform/x86/thinkpad_acpi.c file,
go look for whatever is there around line 3556 and add that
"else return ..." block at the right spot. Finding that might need a
little more context than you have here. I'd take a look at the original
patch and/or v3.15 version of the driver to make sure I got it right.
But it seems easier to just go for a v3.15 or v3.16 kernel...
Considered that?
Bjørn