mirror of
https://github.com/edu4rdshl/linuxscripts.git
synced 2026-07-17 23:24:52 +00:00
Fix
This commit is contained in:
parent
7cc6988948
commit
9fa247f14c
2 changed files with 4 additions and 4 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
Description=Start workaround for RT8822BE wireless cards wifi issue when using the new rtwpci driver.
|
Description=Start workaround for RT8822BE wireless cards wifi issue when using the new rtwpci driver.
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
Type=idle
|
||||||
# See https://github.com/Edu4rdSHL/linuxscripts/blob/master/system-bin/upnet
|
# See https://github.com/Edu4rdSHL/linuxscripts/blob/master/system-bin/upnet
|
||||||
ExecStart=/usr/bin/upnet
|
ExecStart=/usr/bin/upnet
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
# Workaround for RT8822BE wireless cards wifi issue when using the new rtwpci driver.
|
# Workaround for RT8822BE wireless cards wifi issue when using the new rtwpci driver.
|
||||||
# You need to blacklist the following modules: rtwpci rtw88 r8822be (if installed).
|
|
||||||
# See blacklist.conf example at https://github.com/Edu4rdSHL/linuxscripts/blob/master/etc/modprobe.d/blacklist.conf
|
|
||||||
|
|
||||||
if [[ "$UID" -ne 0 ]]; then
|
if [[ "$UID" -ne 0 ]]; then
|
||||||
echo "You need to run the script as root."
|
echo "You need to run the script as root."
|
||||||
|
|
@ -10,9 +8,10 @@ fi
|
||||||
|
|
||||||
# Change the ASPM mode using the Link Control Register according to https://wireless.wiki.kernel.org/en/users/documentation/aspm#enabling_aspm_with_setpci (requires pciutils)
|
# Change the ASPM mode using the Link Control Register according to https://wireless.wiki.kernel.org/en/users/documentation/aspm#enabling_aspm_with_setpci (requires pciutils)
|
||||||
if command -v setpci >/dev/null; then
|
if command -v setpci >/dev/null; then
|
||||||
if setpci -s 00:1c.5 0x50.B=0x40 && modprobe rtwpci; then
|
if setpci -s 00:1c.5 0x50.B=0x40 && sleep 1 && modprobe rtwpci; then
|
||||||
|
sleep 2
|
||||||
# Uncomment the next line and change it to match your network services and init in use.
|
# Uncomment the next line and change it to match your network services and init in use.
|
||||||
# systemctl restart iwd systemd-networkd systemd-resolved
|
systemctl restart iwd systemd-networkd systemd-resolved
|
||||||
echo "ASPM configurations applied. Restart your network services if you haven't set them in the script."
|
echo "ASPM configurations applied. Restart your network services if you haven't set them in the script."
|
||||||
else
|
else
|
||||||
echo "An unknown error has occurred. Reboot and try again."
|
echo "An unknown error has occurred. Reboot and try again."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue