问题描述
[更新]:Kubuntu中存在同样的问题,并以相同的方式解决。 [解决]:通过应用以下命令nmcli nm
我得到以下内容:
暂停之前
RUNNING STATE WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN
running connected enabled enabled enabled enabled
你可以看到状态已连接,其他状态已启用并正在运行
暂停后
RUNNING STATE WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN
running asleep enabled enabled enabled disabled
因为你可以看到状态已经睡着了,这意味着我们亲爱的网络管理员仍然在休息,所以要解决使用下面的命令行:sudo nmcli nm sleep false
这告诉网络管理员唤醒地狱。要做到这一点:在/etc/pm/sleep.d
中创建一个包含以下内容的脚本(并且不要忘记将该脚本标记为可执行文件):
#!/bin/sh
case "${1}" in
resume|thaw)
nmcli nm sleep false
;;
esac
感谢this
原来的问题:
我刚刚下载了Ubuntu 14.04并安装在我的笔记本电脑上:带有Intel P8400 Core2Duo x64处理器的华硕X61SL。当我关上盖子时,系统暂停,但是当我再次打开盖子并恢复时,无线网络未激活(整个网络被禁用),并且当我选择”Enable Networking”时,没有任何反应。这是关于我的无线适配器的信息:
$ lspci | grep -i wireless
02:00.0 Network controller: Qualcomm Atheros AR928X Wireless Network Adapter (PCI-Express) (rev 01)
这个问题在Ubuntu 13.04,Linux Mint Debian Edition或Debian 7 wheezy(GNOME或KDE)中不存在。
编辑:几个测试结果如下:这个问题影响我的无线和有线网络。注意:我需要将pci=nomsi
行添加到grub中才能启动。当手动注销然后暂停然后恢复然后登录每一件事情都可以正常工作。在登录时直接挂起时会发生问题。锁定和挂起会导致与直接挂起相同的问题。另外这个问题appearnlty影响注销功能:如果您选择从统一面板中的用户菜单注销,那么您不会注销,但如果您使用命令行gnome-session-quit --logout
,那么您可以注销。现在使用lshw -C network
输出:正常(全功能网络):
*-network
description: Ethernet interface
product: 191 Gigabit Ethernet Adapter
vendor: Silicon Integrated Systems [SiS]
physical id: 4
bus info: pci@0000:00:04.0
logical name: eth0
version: 02
serial: 00:24:8c:1e:f8:53
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=sis190 driverversion=1.4 duplex=half latency=0 link=no multicast=yes port=MII speed=10Mbit/s
resources: irq:19 memory:fddfcc00-fddfcc7f ioport:cc00(size=128)
*-network
description: Wireless interface
product: AR928X Wireless Network Adapter (PCI-Express)
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
version: 01
serial: 00:15:af:e2:13:db
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=ath9k driverversion=3.13.0-24-generic firmware=N/A ip=6.6.6.8 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
resources: irq:16 memory:fdff0000-fdffffff
恢复后(“/etc/pm/config.d”不包含”unload_modules”):
*-network DISABLED
description: Ethernet interface
product: 191 Gigabit Ethernet Adapter
vendor: Silicon Integrated Systems [SiS]
physical id: 4
bus info: pci@0000:00:04.0
logical name: eth0
version: 02
serial: 00:24:8c:1e:f8:53
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=sis190 driverversion=1.4 duplex=half latency=0 link=no multicast=yes port=MII speed=10Mbit/s
resources: irq:19 memory:fddfcc00-fddfcc7f ioport:cc00(size=128)
*-network DISABLED
description: Wireless interface
product: AR928X Wireless Network Adapter (PCI-Express)
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
version: 01
serial: 00:15:af:e2:13:db
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=ath9k driverversion=3.13.0-24-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11bgn
resources: irq:16 memory:fdff0000-fdffffff
当我按照here的建议将文件unload_modules添加到目录”/etc/pm/config.d”时,注销后暂停,恢复,然后登录网络工作,但无法连接到我的无线网络。 lshw -C network
恢复后的结果(“/etc/pm/config.d”包含”unload_modules”):
*-network DISABLED
description: Ethernet interface
product: 191 Gigabit Ethernet Adapter
vendor: Silicon Integrated Systems [SiS]
physical id: 4
bus info: pci@0000:00:04.0
logical name: eth0
version: 02
serial: 00:24:8c:1e:f8:53
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=sis190 driverversion=1.4 duplex=half latency=0 link=no multicast=yes port=MII speed=10Mbit/s
resources: irq:19 memory:fddfcc00-fddfcc7f ioport:cc00(size=128)
*-network DISABLED
description: Wireless interface
product: AR928X Wireless Network Adapter (PCI-Express)
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
version: 01
serial: 00:15:af:e2:13:db
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=ath9k driverversion=3.13.0-24-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11bgn
resources: irq:16 memory:fdff0000-fdffffff
‘unload_modules’的内容其中:
SUSPEND_MODULES="$SUSPEND_MODULES ath9k"
SUSPEND_MODULES="$SUSPEND_MODULES sis190"
‘ath9k’是我的无线模块,而’sis190’是我的以太网模块。
最佳解决方案
14.10上述答案对我无效。在一段trial-and-error之后,我结束了这个,
#!/bin/sh
case "${1}" in
resume|thaw)
nmcli r wifi off && nmcli r wifi on ;;
esac
把它放在/etc/pm/sleep.d/10_resume_wifi
中使其可执行sudo chmod 755 /etc/pm/sleep.d/10_resume_wifi
,问题应立即修复。
次佳解决方案
我有一个解决方案,但它只是为了重新启动您的网络管理员。
sudo service network-manager restart
这不是永久的解决方案。
第三种解决方案
最终为我工作的脚本:
$ cat /etc/pm/sleep.d/10_resume_wifi
#!/bin/sh
case "${1}" in
resume|thaw) nmcli nm sleep false ;;
esac
$ ll /etc/pm/sleep.d/10_resume_wifi
-rwxr-xr-x 1 root root 70 mars 31 09:09 /etc/pm/sleep.d/10_resume_wifi
另一个答案有错别字(他们可以修复我知道),但从来没有为我工作。