[已解决]一直不是很懂linux的关机耗电问题…
Tofloor
poster avatar
137******33
deepin
2017-10-16 18:27
Author
本帖最后由 kevin_xiao 于 2017-10-18 17:35 编辑

用的笔记本,前一天晚上在deepin下面关闭系统之后(电池满电),第二天再开(相差大概12个钟头),电池就能掉电差不多要有15%,观之从win下关机的话,第二天1%左右到头了。
不是deepin问题,是linux通病。进过测试,在linux关闭后,断掉外接电源,把电池扣下来再装上,掉电就会跟win一个水平。
而且如果不扣电池的话,除了deepin和Xubuntu,其他发行版linux关闭后再进入win会导致有线网络找不到。所以感觉linux异常的掉电是因为有线网卡仍然处在唤醒状态吧。但是deepin这种不会影响win有线但还是掉电的就解释不通了啊
请问有没有什么可行的解决方案?
Reply Favorite View the author
All Replies
avatar
duanyao
deepin
2017-10-16 18:55
#1
什么型号的笔记本?如果怀疑是网卡的问题,看看BIOS里 wake up on lan 的功能有没有开着。
Reply View the author
avatar
woodelf
deepin
2017-10-16 18:57
#2
看描述,倒很像是WoL的锅。







    来自:Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0  (zh-CN)
    ——2017/10/16 上午10:57:41
    Reply View the author
    avatar
    137******33
    deepin
    2017-10-16 19:38
    #3
    https://bbs.deepin.org/post/146778
    什么型号的笔记本?如果怀疑是网卡的问题,看看BIOS里 wake up on lan 的功能有没有开着。 ...

    hp pavilion15. 刚看了一下BIOS,里边网络唤醒时禁用的,但是Deepin下面的WoL是开启的,我试着关闭看看。谢谢
    Reply View the author
    avatar
    137******33
    deepin
    2017-10-16 19:39
    #4
    https://bbs.deepin.org/post/146778
    看描述,倒很像是WoL的锅。

    Deepin下的WoL的确是开启的,我禁用再试。谢谢
    Reply View the author
    avatar
    137******33
    deepin
    2017-10-18 00:03
    #5
    确定了,是WoL的问题。但是用ethtool修改之后,重启又会被打开wol…而且deepin里边我还找不到rc.local等等那些启动执行指令的文件…怎么破…
    Reply View the author
    avatar
    woodelf
    deepin
    2017-10-18 00:23
    #6
    写个systemd开机服务就行了,例如写个disable-wol@enp5s0f2.service
    [Unit]
    Description=Disable Wake-on-LAN for Ethernet
    Requires=network.target
    After=network.target

    [Service]
    ExecStart=/usr/sbin/ethtool -s enp5s0f2 wol g
    Type=oneshot

    [Install]
    WantedBy=multi-user.target

    把ethtool的路径和设备名替换为自己的就行了,然后systemctl enable一下服务。







      来自:Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0  (zh-CN)
      ——2017/10/17 下午4:23:48
      Reply View the author
      avatar
      137******33
      deepin
      2017-10-19 01:35
      #7
      https://bbs.deepin.org/post/146778
      写个systemd开机服务就行了,例如写个
      把ethtool的路径和设备名替换为自己的就行了,然后systemctl enable ...

      多谢指点
      Reply View the author
      avatar
      176******80
      deepin
      2017-10-19 20:41
      #8
      话说这个东西默认禁用不是更合理么
      Reply View the author
      avatar
      leixiaozeng
      deepin
      2017-10-20 04:09
      #9
      https://bbs.deepin.org/post/146778
      话说这个东西默认禁用不是更合理么

      +10086


      紫薯补丁!!
      Reply View the author
      avatar
      moriwuhen
      deepin
      2017-10-20 05:46
      #10
      等待测试结果
      Reply View the author
      avatar
      137******33
      deepin
      2017-10-21 08:57
      #11
      moriwuhen 发表于 2017-10-19 21:46
      等待测试结果

      按置顶那个 写service文件 开机启动就可以了。不过置顶的命令是打开wol,关闭的话把g改成d
      Reply View the author
      avatar
      Fallen
      deepin
      2017-11-05 05:35
      #12
      https://bbs.deepin.org/post/146778
      写个systemd开机服务就行了,例如写个
      把ethtool的路径和设备名替换为自己的就行了,然后systemctl enable ...

      新手,不太懂怎么写开机服务,能详细一点吗?
      Reply View the author
      avatar
      山西姚一
      deepin
      2017-11-09 15:37
      #13
      怎么查看wol是否开启?
      Reply View the author