From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id F394213835A for ; Sun, 9 May 2021 04:42:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2EEC6E05C1; Sun, 9 May 2021 04:42:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F31C3E05C1 for ; Sun, 9 May 2021 04:42:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7CCC3340F01 for ; Sun, 9 May 2021 04:42:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BF83274F for ; Sun, 9 May 2021 04:42:26 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1620535326.26cac706a340884d68ff3ccc25c0606ad22d512f.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-util/xpadneo/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-util/xpadneo/xpadneo-0.9.1.ebuild games-util/xpadneo/xpadneo-9999.ebuild X-VCS-Directories: games-util/xpadneo/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 26cac706a340884d68ff3ccc25c0606ad22d512f X-VCS-Branch: master Date: Sun, 9 May 2021 04:42:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 50254434-1455-4560-8d8b-8e3c107ee65d X-Archives-Hash: 5fa8b2ff63a1d76f0099518464958ea5 commit: 26cac706a340884d68ff3ccc25c0606ad22d512f Author: Ionen Wolkens gmail com> AuthorDate: Fri Apr 30 00:57:01 2021 +0000 Commit: Sam James gentoo org> CommitDate: Sun May 9 04:42:06 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26cac706 games-util/xpadneo: update ERTM messages for kernel 5.12 The L2CAP patch is upstreamed in >=5.12, and ERTM is now instead recommended by upstream to help with rumble stability. For non-live, also install the L2CAP patch in docs/ as reference. Signed-off-by: Ionen Wolkens gmail.com> Closes: https://github.com/gentoo/gentoo/pull/20610 Signed-off-by: Sam James gentoo.org> games-util/xpadneo/xpadneo-0.9.1.ebuild | 38 ++++++++++++++++++++++----------- games-util/xpadneo/xpadneo-9999.ebuild | 35 +++++++++++++++++++----------- 2 files changed, 47 insertions(+), 26 deletions(-) diff --git a/games-util/xpadneo/xpadneo-0.9.1.ebuild b/games-util/xpadneo/xpadneo-0.9.1.ebuild index 75edf29d395..bf7685af800 100644 --- a/games-util/xpadneo/xpadneo-0.9.1.ebuild +++ b/games-util/xpadneo/xpadneo-0.9.1.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit linux-mod toolchain-funcs udev +inherit linux-info linux-mod toolchain-funcs udev if [[ ${PV} == 9999 ]]; then inherit git-r3 @@ -36,25 +36,37 @@ src_install() { udev_dorules etc-udev-rules.d/60-${PN}.rules dodoc -r ../docs/{[^i]*.md,descriptors,reports} ../NEWS.md + newdoc ../misc/kernel_patches/0001-fix_bluetooth_reconnect.patch \ + L2CAP-fix-for-kernel-5.11-or-older.patch } pkg_postinst() { linux-mod_pkg_postinst udev_reload - local ertm=/sys/module/bluetooth/parameters/disable_ertm - if ! [[ ${REPLACING_VERSIONS} && $(<${ertm}) == Y ]]; then + local disable_ertm=/sys/module/bluetooth/parameters/disable_ertm + if kernel_is -ge 5 12; then + if [[ $(<${disable_ertm}) == Y ]]; then + elog "Warning: bluetooth ERTM (Enhanced ReTransmission Mode) is disabled." + elog "This is no longer recommended with kernel >=5.12 to use ${PN}." + elog "Can remove ${EROOT}/etc/modprobe.d/no-ertm.conf if it exists, and run:" + elog " echo N > ${disable_ertm}" + elog "After changing, may need to re-pair the gamepad with bluetooth." + fi + elif [[ $(<${disable_ertm}) == N ]]; then + elog "Warning: bluetooth ERTM (Enhanced ReTransmission Mode) is enabled." + elog "While keeping enabled is recommended for rumble usage stability, it can" + elog "cause connection issues without kernel >=5.12 or the L2CAP kernel patch" + elog "provided in ${EROOT}/usr/share/doc/${PF}/" + elog "If needed, this mode can be disabled by running:" + elog " echo Y > ${disable_ertm}" + elog " echo 'options bluetooth disable_ertm=y' > ${EROOT}/etc/modprobe.d/no-ertm.conf" + elog "After changing, may need to re-pair the gamepad with bluetooth." + fi + + if [[ ! ${REPLACING_VERSIONS} ]]; then elog "To pair the gamepad and view module options, see documentation in:" - elog " ${EROOT}/usr/share/doc/${PF}" - elog - elog "Be warned that bluetooth's ERTM (Enhanced ReTransmission Mode) can" - elog "cause the gamepad to enter a re-connection loop." - elog "- To disable immediately:" - elog " echo Y > ${ertm}" - elog "- To disable for next and subsequent boot:" - elog " echo 'options bluetooth disable_ertm=y' > ${EROOT}/etc/modprobe.d/no-ertm.conf" - elog "- Or, if bluetooth isn't a module, add to the kernel's command line:" - elog " bluetooth.disable_ertm=y" + elog " ${EROOT}/usr/share/doc/${PF}/" fi } diff --git a/games-util/xpadneo/xpadneo-9999.ebuild b/games-util/xpadneo/xpadneo-9999.ebuild index 75edf29d395..6ee1277444a 100644 --- a/games-util/xpadneo/xpadneo-9999.ebuild +++ b/games-util/xpadneo/xpadneo-9999.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit linux-mod toolchain-funcs udev +inherit linux-info linux-mod toolchain-funcs udev if [[ ${PV} == 9999 ]]; then inherit git-r3 @@ -42,19 +42,28 @@ pkg_postinst() { linux-mod_pkg_postinst udev_reload - local ertm=/sys/module/bluetooth/parameters/disable_ertm - if ! [[ ${REPLACING_VERSIONS} && $(<${ertm}) == Y ]]; then + local disable_ertm=/sys/module/bluetooth/parameters/disable_ertm + if kernel_is -ge 5 12; then + if [[ $(<${disable_ertm}) == Y ]]; then + elog "Warning: bluetooth ERTM (Enhanced ReTransmission Mode) is disabled." + elog "This is no longer recommended with kernel >=5.12 to use ${PN}." + elog "Can remove ${EROOT}/etc/modprobe.d/no-ertm.conf if it exists, and run:" + elog " echo N > ${disable_ertm}" + elog "After changing, may need to re-pair the gamepad with bluetooth." + fi + elif [[ $(<${disable_ertm}) == N ]]; then + elog "Warning: bluetooth ERTM (Enhanced ReTransmission Mode) is enabled." + elog "While keeping enabled is recommended for rumble usage stability, it can" + elog "cause connection issues without a fix included in kernel >=5.12" + elog "If needed, this mode can be disabled by running:" + elog " echo Y > ${disable_ertm}" + elog " echo 'options bluetooth disable_ertm=y' > ${EROOT}/etc/modprobe.d/no-ertm.conf" + elog "After changing, may need to re-pair the gamepad with bluetooth." + fi + + if [[ ! ${REPLACING_VERSIONS} ]]; then elog "To pair the gamepad and view module options, see documentation in:" - elog " ${EROOT}/usr/share/doc/${PF}" - elog - elog "Be warned that bluetooth's ERTM (Enhanced ReTransmission Mode) can" - elog "cause the gamepad to enter a re-connection loop." - elog "- To disable immediately:" - elog " echo Y > ${ertm}" - elog "- To disable for next and subsequent boot:" - elog " echo 'options bluetooth disable_ertm=y' > ${EROOT}/etc/modprobe.d/no-ertm.conf" - elog "- Or, if bluetooth isn't a module, add to the kernel's command line:" - elog " bluetooth.disable_ertm=y" + elog " ${EROOT}/usr/share/doc/${PF}/" fi }