几天来,我一直在尝试解决我的笔记本电脑在 16.04 LTS 上遇到的问题。我只能通过输入以下两行代码才能在退出待机状态后让 wifi 工作,据我所知,这会重新加载 wifi pcb 的驱动程序:
modprobe -rf rt73usb
modprobe -v rt73usb
我尝试了几种方法来尝试让这种情况自动发生。一种方法是来自这个线这给了我这个:
!/bin/bash
case "$1" in
thaw|resume)
sudo modprobe -rf rt73usb
sudo modprobe -v rt73usb
;;
*)
;;
esac
exit $
我把它放在一个名为的文件中wakenet
,详细信息:
ls -al
drwxr-xr-x 2 root root 4096 nov 27 16:48 .
drwxr-xr-x 5 root root 4096 ago 5 2015 ..
-rwxr-xr-x 1 root root 210 giu 26 2015 10_grub-common
-rwxr-xr-x 1 root root 660 dic 6 2013 10_unattended-upgrades-hibernate
-rwxr-xr-x 1 root root 1260 mag 23 2012 novatel_3g_suspend
-rwxr-xr-x 1 root root 112 nov 27 16:48 wakenet.sh
有人能告诉我哪里出了问题吗?因为当我退出待机模式时,我仍然遇到同样的问题?我只知道发生了什么事情,所以如果你能帮忙,我将不胜感激。我想我在脚本中犯了一个根本性的错误?谢谢。马克
附言更多信息:
lshw -c network
*-usb DISABLED
description: Wireless interface
product: 802.11 bg WLAN
vendor: Ralink
physical id: 3
bus info: usb@1:3
logical name: wlx0019db03e22d
version: 0.01
serial: 00:19:db:03:e2:2d
capabilities: usb-2.00 ethernet physical wireless
configuration: broadcast=yes driver=rt73usb driverversion=4.4.0-47-generic firmware=1.7 link=no maxpower=300mA multicast=yes speed=480Mbit/s wireless=IEEE 802.11bg
*-network
description: Ethernet interface
product: RTL-8100/8101L/8139 PCI Fast Ethernet Adapter
vendor: Realtek Semiconductor Co., Ltd.
physical id: 5
bus info: pci@0000:06:05.0
logical name: eth0
version: 10
serial: 00:03:0d:5b:75:87
size: 10Mbit/s
capacity: 100Mbit/s
width: 32 bits
clock: 33MHz
capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=8139too driverversion=0.9.28 duplex=half latency=32 link=no maxlatency=64 mingnt=32 multicast=yes port=MII speed=10Mbit/s
resources: irq:16 ioport:2000(size=256) memory:b0200000-b02000ff
输出lsusb
:
Bus 001 Device 002: ID 0db0:6877 Micro Star International RT2573
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
答案1
非常感谢@Bidyut,就是这样!来自这 我做了以下事情:
sudo touch /lib/systemd/system-sleep/wakeup
sudo chmod a+x /lib/systemd/system-sleep/wakeup
sudo gedit /lib/systemd/system-sleep/wakeup
然后使用以下脚本:
#!/bin/sh
case $1/$2 in post/*)
modprobe -rf rt73usb
modprobe -v rt73usb
;;
esac
也感谢@Spmp