summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games-util/xpadneo/xpadneo-0.9.1.ebuild38
-rw-r--r--games-util/xpadneo/xpadneo-9999.ebuild35
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 75edf29d3954..bf7685af800c 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 75edf29d3954..6ee1277444a5 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
}