【已解决】官方推荐的方法基本完美解决了的wifi断网问题
Tofloor
poster avatar
wangc
deepin
2018-01-09 03:55
Author
本帖最后由 wangc 于 2018-1-16 14:27 编辑

看最近又有人反馈wifi的问题了,官方给的建议基本完美解决了我的两台thinkpad T540p 和T440p经常wifi断网的问题。推荐给大家试一下。
sudo iwconfig wlp4s0 txpower 20

sudo iw dev wlp4s0 set power_save off

【网卡名称要和自己的对应上,用ifconfig看一下自己网卡的名字】

---------------------------------------------------------------------------------------
以前断网是重启网卡就好。这是第一次重启网卡都没能恢复时的状况。

---------------------------------------------------------------------------------------
重启电脑后正常

后一个日志,是重启网卡就可以时的日志
---------------------------------------------------------------------------------------
Reply Favorite View the author
All Replies
1 / 2
To page
avatar
aida
deepin
2018-01-09 23:53
#1
已经尝试关闭蓝牙、无线投屏了吗?
Reply View the author
avatar
wangc
deepin
2018-01-10 00:38
#2
https://bbs.deepin.org/post/151406
已经尝试关闭蓝牙、无线投屏了吗?

恕我之言哈,如果真是蓝牙之类的原因,那应该就不会经常有人来反馈这类问题了。总是回答关闭蓝牙,我觉得还是没有得到正面反馈。其实我挺想知道wifi的问题是全体linux版本都面临这个问题?还是Deepin的问题(我觉得这个概率很小)?是某些网卡存在问题,某些网卡100%不存在问题?是intel网卡的linux驱动本身不完美?还是换个别的驱动就可以?还是说,什么模式,什么关闭省电选项啥的,需要一些操作才可以?如果需要额外的操作,官方能否推荐一下?我的两台Thinkpad T540p,T440p均有偶尔掉线的问题,官网人员有没有100%不存在wifi掉线的笔记本,能否透露一下什么品牌型号,网卡型号是什么?(其实作为用户,我也不追求完美,我只是关心一下很多人都存在的这个问题的原因)
Reply View the author
avatar
aida
deepin
2018-01-10 00:46
#3
https://bbs.deepin.org/post/151406
恕我之言哈,如果真是蓝牙之类的原因,那应该就不会经常有人来反馈这类问题了。总是回答关闭蓝牙,我觉得 ...

我只能说,硬件不一样驱动不一样的情况都有不一样的,这个没有很明确的唯一可给的答案。
但是,我们能知道的是,蓝牙和投射会对网络产生影响,所以都会确认下关闭是否生效(不排除有用户不知道的)。
Reply View the author
avatar
aida
deepin
2018-01-10 00:47
#4
https://bbs.deepin.org/user/33250  麻烦看看上面网卡问题log
Reply View the author
avatar
duanyao
deepin
2018-01-10 02:12
#5
https://bbs.deepin.org/post/151406
恕我之言哈,如果真是蓝牙之类的原因,那应该就不会经常有人来反馈这类问题了。总是回答关闭蓝牙,我觉得 ...

wifi 是个相当复杂的东西,比有线网复杂得多,光是协议就有好几代 b/g/n/ac,还有不同的操作模式(节能、自动信道选择,自动带宽选择),然后还有各种干扰(蓝牙、其它wifi设备)。复杂的东西有bug是常见的,不论硬件还是驱动程序。100%这种话网卡生产商都不敢讲,而且就算网卡没问题,遇到糟糕的AP或者复杂电磁环境也有可能跪。

至于 Intel 网卡,它的 Linux 驱动肯定是不完美的(虽然也很难说 Windows 驱动就是完美的)。
Reply View the author
avatar
duanyao
deepin
2018-01-10 02:30
#6
从日志看是 DHCP 失败了(超时),WIFI 连接本身是成功的。至于 DHCP 为啥超时,看不出来。
你可以暂时设置静态 IP 试试,然后看看手机或windows连接有没有问题。
Reply View the author
avatar
wangc
deepin
2018-01-10 02:54
#7
https://bbs.deepin.org/post/151406
从日志看是 DHCP 失败了(超时),WIFI 连接本身是成功的。至于 DHCP 为啥超时,看不出来。
你可以暂时设置 ...

谢谢。我笔记本断网时的现象就是wifi显示还在连接,就是网页不打开,ping 百度也是没反应。我给我女朋友装了Deepin后,她也问我为什么网上不去了,所以我揣测windows下使用应该是正常的。,我就是重启下网卡就好,不长时间下载东西影响不大。这次重启网卡也不行,跟以往不一样,我就挂上日志供参考了。
Reply View the author
avatar
duanyao
deepin
2018-01-10 03:08
#8
https://bbs.deepin.org/post/151406
谢谢。我笔记本断网时的现象就是wifi显示还在连接,就是网页不打开,ping 百度也是没反应。我给我女朋友 ...

下次你可以用 sudo journalctl -f 看实时日志,这样就能大致看出为啥连不上。
Reply View the author
avatar
wangc
deepin
2018-01-10 03:12
#9
https://bbs.deepin.org/post/151406
下次你可以用 sudo journalctl -f 看实时日志,这样就能大致看出为啥连不上。

好的,多谢多谢
Reply View the author
avatar
yanbowen
deepin
Community Developer
2018-01-10 03:40
#10
https://bbs.deepin.org/post/151406
@yanbowen  麻烦看看上面网卡问题log

https://bbs.deepin.org/user/32991 麻烦看一下
Reply View the author
avatar
RucLinux
deepin
2018-01-10 04:04
#11
天呐,你打包的这些是什么?一堆目录和可执行文件。
cat /var/log/messages | grep Error >> error.log
将error.log里的内容发上来看看
Reply View the author
avatar
RucLinux
deepin
2018-01-10 04:06
#12
或者用以下命令输出

cat /var/log/messages | grep 当前网卡名称 >> error.log
Reply View the author
avatar
wangc
deepin
2018-01-10 04:14
#13
https://bbs.deepin.org/post/151406
或者用以下命令输出

cat /var/log/messages | grep 当前网卡名称 >> error.log

不好意思,我这log目录下没看见messages文件
Reply View the author
avatar
RucLinux
deepin
2018-01-10 04:21
#14
https://bbs.deepin.org/post/151406
不好意思,我这log目录下没看见messages文件

ls -l /var/log/
将回显复制出来发上来看看
Reply View the author
avatar
wangc
deepin
2018-01-10 04:25
#15
https://bbs.deepin.org/post/151406
ls -l /var/log/
将回显复制出来发上来看看

总用量 1368
-rw-r--r--  1 root root             38064 12月 26 15:08 alternatives.log
drwxr-xr-x  2 root root              4096 1月   8 12:32 apt
-rw-r--r--  1 root root              5767 1月   8 19:52 boot.log
-rw-r--r--  1 root root             51192 12月 17 23:22 bootstrap.log
-rw-------  1 root utmp               384 12月 27 16:51 btmp
drwxr-xr-x  2 root lpadmin           4096 12月 17 23:22 cups
-rw-r--r--  1 root root             53109 12月 17 23:26 deepin-installer.log
-rw-r--r--  1 root root            998420 1月   8 12:32 dpkg.log
-rw-r--r--  1 root root             32032 12月 17 23:25 faillog
-rw-r--r--  1 root root              3307 12月 18 15:26 fontconfig.log
drwxr-xr-x  2 root root              4096 12月 17 23:22 glusterfs
drwxr-xr-x  3 root root              4096 12月 17 23:22 hp
drwxr-sr-x+ 3 root systemd-journal   4096 12月 17 15:33 journal
-rw-rw-r--  1 root utmp            292292 12月 27 16:51 lastlog
drwxr-xr-x  2 root root              4096 12月 17 15:33 lastore
drwx--x--x  2 root root              4096 1月   8 19:52 lightdm
drwxr-x---  3 root adm               4096 12月 23 21:57 samba
-rw-------  1 root root             64064 12月 17 23:25 tallylog
-rw-rw-r--  1 root utmp             57600 1月   8 19:52 wtmp
-rw-r--r--  1 root root             34071 1月   9 17:56 Xorg.0.log
-rw-r--r--  1 root root             33757 1月   8 19:51 Xorg.0.log.old
Reply View the author
avatar
yangbo
deepin
2018-01-11 03:35
#16
从日志看,authen/assoc都是成功的。 不过哦txpower越来越小...

试试
iw dev wlp4s0 txpower fixed 20
iw dev wlp4s0 set power_save off

放到脚本里面,每次启动登陆后执行一下
Reply View the author
avatar
wangc
deepin
2018-01-11 03:37
#17
https://bbs.deepin.org/post/151406
从日志看,authen/assoc都是成功的。 不过哦txpower越来越小...

试试

好的,非常感谢
Reply View the author
avatar
wangc
deepin
2018-01-11 03:53
#18
https://bbs.deepin.org/post/151406
从日志看,authen/assoc都是成功的。 不过哦txpower越来越小...

试试

请问第一个命令 改成这样可以吧?sudo iwconfig wlp4s0 txpower 20
原先的iw dev wlp4s0 txpower fixed 20在两台电脑上均报报错如下:
  Commands that use the netdev ('dev') can also be given the
'wdev' instead to identify the device.

You can omit the 'phy' or 'dev' if the identification is unique,
e.g. "iw wlan0 info" or "iw phy0 info". (Don't when scripting.)

Do NOT screenscrape this tool, we don't consider its output stable.
Reply View the author
avatar
yangbo
deepin
2018-01-11 04:02
#19
应该可以
iwconfig wlp4s0 txpower fixed 20
iwconfig wlp4s0 power off
应该和上面的效果一样的
Reply View the author
avatar
yangbo
deepin
2018-01-11 04:03
#20
或者用iw phy 来设置txpower也是可以的
Reply View the author
1 / 2
To page