public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: sys-power/disable-c6/, sys-power/disable-c6/files/
@ 2021-04-04 21:53 Alessandro Barbieri
  0 siblings, 0 replies; only message in thread
From: Alessandro Barbieri @ 2021-04-04 21:53 UTC (permalink / raw
  To: gentoo-commits

commit:     f347b4e080235a9c1d623a449df91195d5c22bf1
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sun Apr  4 21:51:38 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sun Apr  4 21:53:27 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f347b4e0

sys-power/disable-c6: new package

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 sys-power/disable-c6/Manifest                      |  1 +
 sys-power/disable-c6/disable-c6-0_p20190603.ebuild | 24 ++++++++++++++++++++++
 sys-power/disable-c6/disable-c6.service.template   | 13 ++++++++++++
 sys-power/disable-c6/disable-c6.service.template2  | 13 ++++++++++++
 sys-power/disable-c6/files/disable-c6              |  8 ++++++++
 sys-power/disable-c6/files/fix-path.patch          | 11 ++++++++++
 sys-power/disable-c6/metadata.xml                  |  8 ++++++++
 7 files changed, 78 insertions(+)

diff --git a/sys-power/disable-c6/Manifest b/sys-power/disable-c6/Manifest
new file mode 100644
index 000000000..929bb4d33
--- /dev/null
+++ b/sys-power/disable-c6/Manifest
@@ -0,0 +1 @@
+DIST disable-c6-82765d490290a99ba18282e187e9de3d7c11dd49.tar.gz 2505 BLAKE2B 8995e970e8e4643e752aaf2a27f94eae282c6d2416a5a93f41e69bb367dc50226ca28deb7cdcbc8ef7bbc8105b9c488bd51374b2d3c1ef58322180b3dae1eee1 SHA512 77843b71cb3b485b949ed8a65bf76bdeffd661e21139ccc517f7641adf2802a32c6b2cf1317067e945d37153fc946fffdfc5d42619b508bedcb1fab25576f7ec

diff --git a/sys-power/disable-c6/disable-c6-0_p20190603.ebuild b/sys-power/disable-c6/disable-c6-0_p20190603.ebuild
new file mode 100644
index 000000000..1c908529f
--- /dev/null
+++ b/sys-power/disable-c6/disable-c6-0_p20190603.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd
+
+DESCRIPTION="disable the C6 state upon system boot, preventing Ryzen freezes"
+HOMEPAGE="https://github.com/jfredrickson/disable-c6"
+COMMIT=82765d490290a99ba18282e187e9de3d7c11dd49
+SRC_URI="https://github.com/jfredrickson/disable-c6/archive/${COMMIT}.tar.gz -> disable-c6-${COMMIT}.tar.gz"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="-* ~amd64"
+RDEPEND="sys-power/ZenStates-Linux"
+DOCS=( ACKNOWLEDGMENTS README.md )
+PATCHES=( "${FILESDIR}/fix-path.patch" )
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+src_install() {
+	einstalldocs
+	doinitd "${FILESDIR}/disable-c6"
+	systemd_newunit "disable-c6.service.template" "disable-c6-service"
+}

diff --git a/sys-power/disable-c6/disable-c6.service.template b/sys-power/disable-c6/disable-c6.service.template
new file mode 100644
index 000000000..6d5efab25
--- /dev/null
+++ b/sys-power/disable-c6/disable-c6.service.template
@@ -0,0 +1,13 @@
+[Unit]
+Description=Ryzen Disable C6
+DefaultDependencies=no
+After=sysinit.target local-fs.target suspend.target hibernate.target
+Before=basic.target
+
+[Service]
+Type=oneshot
+ExecStart={{PREFIX}}/bin/zenstates.py --c6-disable
+
+[Install]
+WantedBy=basic.target suspend.target hibernate.target
+

diff --git a/sys-power/disable-c6/disable-c6.service.template2 b/sys-power/disable-c6/disable-c6.service.template2
new file mode 100644
index 000000000..3f31cb382
--- /dev/null
+++ b/sys-power/disable-c6/disable-c6.service.template2
@@ -0,0 +1,13 @@
+[Unit]
+Description=Ryzen Disable C6
+DefaultDependencies=no
+After=sysinit.target local-fs.target suspend.target hibernate.target
+Before=basic.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/zenstates --c6-disable
+
+[Install]
+WantedBy=basic.target suspend.target hibernate.target
+

diff --git a/sys-power/disable-c6/files/disable-c6 b/sys-power/disable-c6/files/disable-c6
new file mode 100644
index 000000000..b538b8b1c
--- /dev/null
+++ b/sys-power/disable-c6/files/disable-c6
@@ -0,0 +1,8 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+command=/usr/sbin/zenstates
+command_args="--c6-disable"
+pidfile=
+name="disable-c6"
+description="Ryzen Disable C6"

diff --git a/sys-power/disable-c6/files/fix-path.patch b/sys-power/disable-c6/files/fix-path.patch
new file mode 100644
index 000000000..434a8cc5b
--- /dev/null
+++ b/sys-power/disable-c6/files/fix-path.patch
@@ -0,0 +1,11 @@
+--- a/disable-c6.service.template	2021-04-04 23:46:51.260313163 +0200
++++ b/disable-c6.service.template	2021-04-04 23:47:25.910835088 +0200
+@@ -6,7 +6,7 @@
+ 
+ [Service]
+ Type=oneshot
+-ExecStart={{PREFIX}}/bin/zenstates.py --c6-disable
++ExecStart=/usr/sbin/zenstates --c6-disable
+ 
+ [Install]
+ WantedBy=basic.target suspend.target hibernate.target

diff --git a/sys-power/disable-c6/metadata.xml b/sys-power/disable-c6/metadata.xml
new file mode 100644
index 000000000..673116b5b
--- /dev/null
+++ b/sys-power/disable-c6/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<upstream>
+		<bugs-to>https://github.com/jfredrickson/disable-c6/issues</bugs-to>
+		<remote-id type="github">jfredrickson/disable-c6</remote-id>
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-04 21:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-04 21:53 [gentoo-commits] repo/proj/guru:dev commit in: sys-power/disable-c6/, sys-power/disable-c6/files/ Alessandro Barbieri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox