Bug 1980886 - Request patched 5.12 kernel for Framework laptop
Summary: Request patched 5.12 kernel for Framework laptop
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Hans de Goede
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-09 17:52 UTC by Geoffrey Marr
Modified: 2023-09-15 01:34 UTC (History)
20 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-08 06:24:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Geoffrey Marr 2021-07-09 17:52:01 UTC
Would like to request a patched 5.12 kernel for use with the upcoming Framework laptop [0].

The Framework company is releasing a new laptop this summer and would like to be able to link users to a Fedora image made specially for it. Normally, we would link to vanilla F34 and be done, but the 5.11 kernel that is included with F34 has issues with the wifi card, and the version of libfprint that ships does not support the fingerprint reader. The 5.12 kernel fixes the wifi issue, but we would like to request a patched kernel that sets the "deep" parameter by default in /sys/power/mem_sleep. There is an issue with current tiger lake CPUs that does not work with S2 and therefore the Framework laptop does not go into standby when the lid is closed without this fix.

I know this is an odd one, please see this releng ticket for more info [1].

Basically, all that this kernel needs is "echo deep > /sys/power/mem_sleep" by default.

[0] https://frame.work/
[1] https://pagure.io/releng/issue/10202

Comment 1 Hans de Goede 2021-07-09 18:03:37 UTC
A patched kernel is not really an option here, since users need to be able to install security updates and we don't want to have to rebuild such a patched kernel on every kernel update just for the framework laptop.

But there is another option, you can add "mem_sleep_default=deep" to the kernel commandline to get the same result as the echo; and if we are going to spin a special image, then we might be able to insert that into the image, after which it should stick around since the previous kernel-commandline is re-used when installing newer kernel packages.

Comment 2 Geoffrey Marr 2021-07-09 18:19:39 UTC
Thanks Hans for the answer. I was afraid of that, but no worries. I think we will list this as a commonbugs type of thing and have the user run the command themselves after the fact. Closing the bug...

Comment 3 Hans de Goede 2021-07-09 18:22:22 UTC
So thinking more about this and looking at what was done the previous time we respun an image with included updates for vendor-preload purposes, I'm not entirely sure if the kernel cmdline idea is the best option. Give how the previous image was published it really boils down to a mostly offical F33 respin with latest updates included, which means others might use it for other purposes too.

As such I think it might be better to just add a downstream patch to the regular Fedora kernels which enables mem_sleep_default=deep on the Framework laptop based on identifying it by its DMI strings.

The kernel is full of DMI quirks for various hw, but I don't think there is a pre-existing quirk mechanism we can use here in this case. Still adding one should not be hard. Ideally we would get the patch for this upstream, but otherwise it might be acceptable as a downstream (Fedora specific) kernel patch too; and that way the respun image would be as standard as possible, rather then it having Framework specific mods.

Comment 4 Justin M. Forbes 2021-07-09 18:53:55 UTC
(In reply to Hans de Goede from comment #3)
> The kernel is full of DMI quirks for various hw, but I don't think there is
> a pre-existing quirk mechanism we can use here in this case. Still adding
> one should not be hard. Ideally we would get the patch for this upstream,
> but otherwise it might be acceptable as a downstream (Fedora specific)
> kernel patch too; and that way the respun image would be as standard as
> possible, rather then it having Framework specific mods.

I do not have a problem with this approach, but would really like to see it upstream. I am not going to say that I absolutely won't take it as a downstream patch if it is rejected upstream, but I would have to think pretty hard on it, particularly as kernel command line options do exist to work around the issue.  As things go, I expect that next week will be the last of the 5.12 kernels and we will move to 5.13 unless things come up during test week.

Comment 5 Hans de Goede 2021-07-09 20:00:11 UTC
(In reply to Justin M. Forbes from comment #4)
> (In reply to Hans de Goede from comment #3)
> > The kernel is full of DMI quirks for various hw, but I don't think there is
> > a pre-existing quirk mechanism we can use here in this case. Still adding
> > one should not be hard. Ideally we would get the patch for this upstream,
> > but otherwise it might be acceptable as a downstream (Fedora specific)
> > kernel patch too; and that way the respun image would be as standard as
> > possible, rather then it having Framework specific mods.
> 
> I do not have a problem with this approach, but would really like to see it
> upstream. I am not going to say that I absolutely won't take it as a
> downstream patch if it is rejected upstream, but I would have to think
> pretty hard on it, particularly as kernel command line options do exist to
> work around the issue.

So first of all some good news, I did some further digging and there already is an existing mechanism to do this based on DMI strings, so it is just a matter of adding an extra entry to the existing acpisleep_dmi_table[] in drivers/acpi/sleep.c .

Geoffrey, can you provide the output of:

grep . /sys/class/dmi/id/* 2> /dev/null

Run on the Framework laptop, then I can prepare a patch to add a DMI quirk for this for now. Also is there a bug or discussion somewhere about this issue, so that I can reference it in the commit-msg ?

Justin, once tested I'll also try to submit the patch upstream, but I expect Rafael to nack it, since he probably will want to fix the root-cause of this rather then doing the quirk (the existing DMI table entry for this is special / broken beyond repair). The patch will be very small and KISS though, so I hope you will be ok with carrying it downstream until a proper fix is found.

> As things go, I expect that next week will be the
> last of the 5.12 kernels and we will move to 5.13 unless things come up
> during test week.

I'm not sure why this is relevant, is 5.13 known to fix the s2idle issues seen on the Framework laptop? If yes then waiting for that indeed seems better.

Regardless, it is probably a good idea to test things with 5.13. Geoffrey, can you give this kernel a try on the Framework laptop: https://koji.fedoraproject.org/koji/buildinfo?buildID=1779220

See here for instructions for installing a kernel directly from koji: https://fedorapeople.org/~jwrdegoede/kernel-test-instructions.txt . Note since this is an official build it is not necessary to disable secureboot.

Comment 6 Justin M. Forbes 2021-07-09 21:51:02 UTC
(In reply to Hans de Goede from comment #5)
> (In reply to Justin M. Forbes from comment #4)
> > (In reply to Hans de Goede from comment #3)
> Justin, once tested I'll also try to submit the patch upstream, but I expect
> Rafael to nack it, since he probably will want to fix the root-cause of this
> rather then doing the quirk (the existing DMI table entry for this is
> special / broken beyond repair). The patch will be very small and KISS
> though, so I hope you will be ok with carrying it downstream until a proper
> fix is found.

As long as there are plans for a proper fix, and this is not a patch we will be carrying around forever, that shouldn't be a problem. And a proper upstream root-cause fix would certainly benefit more users.

> > As things go, I expect that next week will be the
> > last of the 5.12 kernels and we will move to 5.13 unless things come up
> > during test week.
> 
> I'm not sure why this is relevant, is 5.13 known to fix the s2idle issues
> seen on the Framework laptop? If yes then waiting for that indeed seems
> better.
> 

I am not aware that it does, just pointing out the timing because it seems like this is something that should ship with 5.13, so testing should be done on 5.13.

Comment 7 Hans de Goede 2021-07-13 15:09:20 UTC
So as dicussed I can write a patch to make this just work with regular Fedora kernel builds, but I'm going to need the DMI strings of the framework laptop to do this.

Geoffrey, can you please provide the output of:

grep . /sys/class/dmi/id/* 2> /dev/null

run on the Framework laptop.

Comment 8 Ben Cotton 2022-05-12 16:52:48 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 9 Ben Cotton 2022-06-08 06:24:35 UTC
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07.

Fedora Linux 34 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 10 Red Hat Bugzilla 2023-09-15 01:34:57 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days


Note You need to log in before you can comment on or make changes to this bug.