2021-06-03 07:56:45

by Laurențiu Păncescu

[permalink] [raw]
Subject: Backporting fix for #199981 to 4.19.y?

Hi there,

I'm running Debian Buster on an old Asus EeePC and I see the battery
always at 100% when unplugged, with an estimated battery life of 4200
hours, no matter how long I've been using it without AC power.

I suspect this might be bug #201351, marked as duplicate of #199981 and
fixed in 5.0-rc1. Would you please consider backporting it to the 4.19
LTS kernel?

Salvatore Bonaccorso of the Debian Kernel Team wrote me on debian-kernel
they follow the upstream 4.19.y, so the best chance of getting the fix
in Debian is for you to include the patch.

Many thanks,
Laurențiu


[1] https://bugzilla.kernel.org/show_bug.cgi?id=201351
[2] https://bugzilla.kernel.org/show_bug.cgi?id=199981
[3]
https://patchwork.kernel.org/project/linux-acpi/patch/[email protected]/


2021-06-03 08:08:57

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: Backporting fix for #199981 to 4.19.y?

On Thu, Jun 03, 2021 at 09:53:46AM +0200, Laurențiu Păncescu wrote:
> Hi there,
>
> I'm running Debian Buster on an old Asus EeePC and I see the battery always
> at 100% when unplugged, with an estimated battery life of 4200 hours, no
> matter how long I've been using it without AC power.
>
> I suspect this might be bug #201351, marked as duplicate of #199981 and
> fixed in 5.0-rc1. Would you please consider backporting it to the 4.19 LTS
> kernel?

What specific commit in Linus's tree is this so we know what to
backport?

thanks,

greg k-h

2021-06-03 08:28:30

by Laurențiu Păncescu

[permalink] [raw]
Subject: Re: Backporting fix for #199981 to 4.19.y?

On 6/3/21 10:07 AM, Greg KH wrote:
> On Thu, Jun 03, 2021 at 09:53:46AM +0200, Laurențiu Păncescu wrote:
>> Hi there,
>>
>> I'm running Debian Buster on an old Asus EeePC and I see the battery always
>> at 100% when unplugged, with an estimated battery life of 4200 hours, no
>> matter how long I've been using it without AC power.
>>
>> I suspect this might be bug #201351, marked as duplicate of #199981 and
>> fixed in 5.0-rc1. Would you please consider backporting it to the 4.19 LTS
>> kernel?
>
> What specific commit in Linus's tree is this so we know what to
> backport?

Hi Greg,

I think it's commit b1c0330823fe842dbb34641f1410f0afa51c29d3.

Many thanks,
Laurențiu


https://github.com/torvalds/linux/commit/b1c0330823fe842dbb34641f1410f0afa51c29d3

2021-06-03 09:23:03

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: Backporting fix for #199981 to 4.19.y?

On Thu, Jun 03, 2021 at 10:24:04AM +0200, Laurențiu Păncescu wrote:
> On 6/3/21 10:07 AM, Greg KH wrote:
> > On Thu, Jun 03, 2021 at 09:53:46AM +0200, Laurențiu Păncescu wrote:
> > > Hi there,
> > >
> > > I'm running Debian Buster on an old Asus EeePC and I see the battery always
> > > at 100% when unplugged, with an estimated battery life of 4200 hours, no
> > > matter how long I've been using it without AC power.
> > >
> > > I suspect this might be bug #201351, marked as duplicate of #199981 and
> > > fixed in 5.0-rc1. Would you please consider backporting it to the 4.19 LTS
> > > kernel?
> >
> > What specific commit in Linus's tree is this so we know what to
> > backport?
>
> Hi Greg,
>
> I think it's commit b1c0330823fe842dbb34641f1410f0afa51c29d3.
>
> Many thanks,
> Laurențiu

That commit does not apply cleanly and I need a backported version. Can
you do that and test it to verify it works and then send it to us to be
applied?

thanks,

greg k-h

2021-06-04 14:54:26

by Laurențiu Păncescu

[permalink] [raw]
Subject: Re: Backporting fix for #199981 to 4.19.y?

Hi Greg,

On 6/3/21 11:19 AM, Greg KH wrote:
> That commit does not apply cleanly and I need a backported version. Can
> you do that and test it to verify it works and then send it to us to be
> applied?

I now have a patch against linux-4.19.y, tested on my EeePC just now:
the battery status and discharge rate are shown correctly.

I've never submitted a patch before, should I put "commit <short-hash>
upstream." as the first line of my commit message, followed by another
line stating which branch I would like this to be merged to? Should I
also include the original commit message of the backported commit? And
then use git format-patch? I just read through [1] and [2], but they
don't say anything specific about commit messages for backported patches.

Thanks,
Laurențiu


[1] https://www.kernel.org/doc/html/latest/process/submitting-patches.html
[2] https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html

2021-06-04 15:44:07

by Greg KH

[permalink] [raw]
Subject: Re: Backporting fix for #199981 to 4.19.y?

On Fri, Jun 04, 2021 at 04:50:19PM +0200, Laurențiu Păncescu wrote:
> Hi Greg,
>
> On 6/3/21 11:19 AM, Greg KH wrote:
> > That commit does not apply cleanly and I need a backported version. Can
> > you do that and test it to verify it works and then send it to us to be
> > applied?
>
> I now have a patch against linux-4.19.y, tested on my EeePC just now: the
> battery status and discharge rate are shown correctly.
>
> I've never submitted a patch before, should I put "commit <short-hash>
> upstream." as the first line of my commit message, followed by another line
> stating which branch I would like this to be merged to? Should I also
> include the original commit message of the backported commit? And then use
> git format-patch? I just read through [1] and [2], but they don't say
> anything specific about commit messages for backported patches.

Yes, what you describe here should be great. Look at the stable mailing
list archives on lore.kernel.org for other examples of this happening,
https://lore.kernel.org/r/[email protected] is
one example.

thanks,

greg k-h

2021-06-06 12:38:16

by Salvatore Bonaccorso

[permalink] [raw]
Subject: Re: Backporting fix for #199981 to 4.19.y?

Hi Laurențiu, Greg,

On Fri, Jun 04, 2021 at 05:42:02PM +0200, Greg KH wrote:
> On Fri, Jun 04, 2021 at 04:50:19PM +0200, Laurențiu Păncescu wrote:
> > Hi Greg,
> >
> > On 6/3/21 11:19 AM, Greg KH wrote:
> > > That commit does not apply cleanly and I need a backported version. Can
> > > you do that and test it to verify it works and then send it to us to be
> > > applied?
> >
> > I now have a patch against linux-4.19.y, tested on my EeePC just now: the
> > battery status and discharge rate are shown correctly.
> >
> > I've never submitted a patch before, should I put "commit <short-hash>
> > upstream." as the first line of my commit message, followed by another line
> > stating which branch I would like this to be merged to? Should I also
> > include the original commit message of the backported commit? And then use
> > git format-patch? I just read through [1] and [2], but they don't say
> > anything specific about commit messages for backported patches.
>
> Yes, what you describe here should be great. Look at the stable mailing
> list archives on lore.kernel.org for other examples of this happening,
> https://lore.kernel.org/r/[email protected] is
> one example.

Instead of doing a specific backport, maybe it is enough to pick
a46393c02c76 ("ACPI: probe ECDT before loading AML tables regardless
of module-level code flag") frst on 4.19.y and then the mentioned fix
b1c0330823fe ("ACPI: EC: Look for ECDT EC after calling
acpi_load_tables()").

Note I have only checked that this resolved the clean apply on top of
the current v4.19.193.

Regards,
Salvatore

2021-06-06 16:08:37

by Laurențiu Păncescu

[permalink] [raw]
Subject: Re: Backporting fix for #199981 to 4.19.y?

Hi Salvatore, Greg,

On 6/6/21 2:34 PM, Salvatore Bonaccorso wrote:
> Instead of doing a specific backport, maybe it is enough to pick
> a46393c02c76 ("ACPI: probe ECDT before loading AML tables regardless
> of module-level code flag") frst on 4.19.y and then the mentioned fix
> b1c0330823fe ("ACPI: EC: Look for ECDT EC after calling
> acpi_load_tables()").

Many thanks for looking into this. I cherry-picked
d737f333b211361b6e239fc753b84c3be2634aaa and
b1c0330823fe842dbb34641f1410f0afa51c29d3 on linux-4.19.y, they indeed
apply cleanly as Salvatore wrote. I also compiled and tested the kernel,
the battery is correctly displayed as discharging when unplugged, with a
7.5 hours remaining as expected.

Does it still make sense for me to resubmit my patch with the "commit
<full SHA1 hash> upstream." comment fixed? I would trust upstream more
than me making one commit look reasonable while missing the other commit
it was based on. Greg, what would you prefer?

Best regards,
Laurențiu

2021-06-08 15:48:24

by Laurențiu Păncescu

[permalink] [raw]
Subject: Re: Backporting fix for #199981 to 4.19.y?

Hi Greg,

On 6/8/21 4:35 PM, Greg KH wrote:
> I do not see a commit a46393c02c76 in Linus's tree :(
>
> Are you sure these ids are correct?

Sorry for the confusion, I think the correct ids are
d737f333b211361b6e239fc753b84c3be2634aaa and
b1c0330823fe842dbb34641f1410f0afa51c29d3.

Thanks,
Laurențiu

2021-06-09 03:08:21

by Greg KH

[permalink] [raw]
Subject: Re: Backporting fix for #199981 to 4.19.y?

On Sun, Jun 06, 2021 at 02:34:11PM +0200, Salvatore Bonaccorso wrote:
> Hi Laurențiu, Greg,
>
> On Fri, Jun 04, 2021 at 05:42:02PM +0200, Greg KH wrote:
> > On Fri, Jun 04, 2021 at 04:50:19PM +0200, Laurențiu Păncescu wrote:
> > > Hi Greg,
> > >
> > > On 6/3/21 11:19 AM, Greg KH wrote:
> > > > That commit does not apply cleanly and I need a backported version. Can
> > > > you do that and test it to verify it works and then send it to us to be
> > > > applied?
> > >
> > > I now have a patch against linux-4.19.y, tested on my EeePC just now: the
> > > battery status and discharge rate are shown correctly.
> > >
> > > I've never submitted a patch before, should I put "commit <short-hash>
> > > upstream." as the first line of my commit message, followed by another line
> > > stating which branch I would like this to be merged to? Should I also
> > > include the original commit message of the backported commit? And then use
> > > git format-patch? I just read through [1] and [2], but they don't say
> > > anything specific about commit messages for backported patches.
> >
> > Yes, what you describe here should be great. Look at the stable mailing
> > list archives on lore.kernel.org for other examples of this happening,
> > https://lore.kernel.org/r/[email protected] is
> > one example.
>
> Instead of doing a specific backport, maybe it is enough to pick
> a46393c02c76 ("ACPI: probe ECDT before loading AML tables regardless
> of module-level code flag") frst on 4.19.y and then the mentioned fix
> b1c0330823fe ("ACPI: EC: Look for ECDT EC after calling
> acpi_load_tables()").

I do not see a commit a46393c02c76 in Linus's tree :(

Are you sure these ids are correct?

thanks,

greg k-h

2021-06-09 08:42:39

by Greg KH

[permalink] [raw]
Subject: Re: Backporting fix for #199981 to 4.19.y?

On Tue, Jun 08, 2021 at 05:45:44PM +0200, Laurențiu Păncescu wrote:
> Hi Greg,
>
> On 6/8/21 4:35 PM, Greg KH wrote:
> > I do not see a commit a46393c02c76 in Linus's tree :(
> >
> > Are you sure these ids are correct?
>
> Sorry for the confusion, I think the correct ids are
> d737f333b211361b6e239fc753b84c3be2634aaa and
> b1c0330823fe842dbb34641f1410f0afa51c29d3.

That works, thanks!

greg k-h