[分享]Ubuntu中使用电池或合上笔记本屏幕时无线网卡网络断开的解决办法

Why is wireless down/strange after switching to battery or closing/opening the lid?

Question:

I noticed that, when I unplugged my laptop, or closed/opened the lid, my wireless connection dropped, every time.

I tracked it down to pm-powersave, and made it stop, see below.

This could also cause repeated requests for network passwords.

Answer:

I’ve found that /usr/sbin/pm-powersave turns OFF my wireless card when I switch to battery or suspend by closing the laptop’s lid. I’ve gotten wireless to stay up between hibernates by executing sudo /usr/sbin/pm-powersave false. The man pm-powersave page says I can create an empty file /etc/pm/power.d/wireless to prevent /usr/lib/pm-utils/power.d/wireless from running and doing its magic. I’ve done it, and it works for me.

I found this by doing an ls -lrt /var/log just after the event, and looking at the last 100 so lines of the recently modified logs. I use this technique to start answering many questions about what my system just did.

From:http://askubuntu.com/questions/65632/why-is-wireless-down-strange-after-switching-to-battery-or-closing-opening-the-l

发表评论

电子邮件地址不会被公开。 必填项已用*标注

疑问 开心 悲伤 邪恶 惊叹 微笑 脸红 笑 惊讶 惊奇 迷惑 酷 憨笑 生气 阴险 转眼球 眨眼 主意 箭头 中立 哭 大笑

*