Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zen_workaround to our repo #3696

Closed
wants to merge 1 commit into from
Closed

Add zen_workaround to our repo #3696

wants to merge 1 commit into from

Conversation

rocallahan
Copy link
Collaborator

It previously lived at https://gist.github.com/glandium/01d54cefdb70561b5f6675e08f2990f2

Resolves #3690

@glandium can you verify that this is OK? I'm not sure what to do about licensing, authorship etc.

@glandium
Copy link
Contributor

I'm not sure what to do about licensing, authorship etc.

I guess you can add a GPLv2 block at the beginning of the file, add a copyright notice (year would be 2020), and put me as the author, as the comment about inspiration (https://gist.github.com/glandium/01d54cefdb70561b5f6675e08f2990f2?permalink_comment_id=3459684#gistcomment-3459684) only applies to the earliest revisions of the gist.

@rocallahan
Copy link
Collaborator Author

@glandium let me know if this is OK.

@@ -0,0 +1,114 @@
#include <linux/module.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like kernel code now uses this as a header:

// SPDX-License-Identifier: GPL-2.0-only

I'd be fine with using whatever license makes this easier, but the module does need the
MODULE_LICENSE("GPL"); for the pm_notifier and probe registrations.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you suggesting a change here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just suggesting to put // SPDX-License-Identifier: GPL-2.0-only as a header in this file.

@@ -0,0 +1,2 @@
Mike Hommey's Zen workaround kernel module.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention that it does the same thing as scripts/zen_workaround.py. and/or zen_workaround.service in a way that persists after resume from sleep. (BTW, now that I discovered there's a systemd service file, there's probably a way to restore zen_workaround.py on resume with it too)

I'd also start with Zen workaround kernel module, and put something like "Copyright 2020, Mike Hommey" (as to indicate the age of this thing)

Not sure this warrants a separate file though.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the kernel module is also the only way to do it when you have SecureBoot enabled, python script was failing for me with that setup.

@rocallahan
Copy link
Collaborator Author

OK, how about this?

@@ -0,0 +1,114 @@
#include <linux/module.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just suggesting to put // SPDX-License-Identifier: GPL-2.0-only as a header in this file.

@rocallahan
Copy link
Collaborator Author

This landed.

@rocallahan rocallahan closed this May 25, 2024
@rocallahan rocallahan deleted the zen-workaround branch May 25, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

could the zen workaround module be incorporated to the repo
3 participants