Autor Tópico: [RESOLVIDO]Notebook desconecta do wifi após hibernar/suspender  (Lida 8827 vezes)

Offline Nightlinux

  • Usuário Ubuntu
  • *
  • Mensagens: 353
    • Ver perfil
[RESOLVIDO]Notebook desconecta do wifi após hibernar/suspender
« Online: 21 de MAR?O de 2017, 14:07 »
Olá!

Uso um Dell inspiron 14 5458, intel core i3, com ubuntu 14.04. Toda vez que ele suspende ou hiberna o wifi desconecta. Para voltar a reconectar, só reiniciando-o. Como tenho duas redes (uma rebate a outra), é só conectar na outra. Mas eu estou cansado desse problema e gostaria de uma solução.

Eu achei estes posts relacionados, mas não me senti seguro para prosseguir:
http://ubuntuforum-br.org/index.php?topic=45997.0
https://www.vivaolinux.com.br/topico/WiFi/Ubuntu-volta-com-a-rede-desativada-apos-a-suspensao/
http://askubuntu.com/questions/761180/wifi-doesnt-work-after-suspend-after-16-04-upgrade

O que vocês me recomendam?
Obrigado.

SOLUÇÃO:
Citar
No link:
https://igtek.tk/index.php/2016/05/11/fix-ubuntu-16-04-no-wireless-connection-after-suspend/

Step 1: Create a new script in the systemd system-sleep folder.

sudo gedit  /lib/systemd/system-sleep/reset_network.sh

Step 2: Copy and paste the following into the newly created script.

#!/bin/bash
if [ $1 = post ] && [ $2 = suspend ]
then service network-manager restart
fi

Step 3: Save e exit.

Step 4: Make the script executable.

sudo chmod +x /lib/systemd/system-sleep/reset_network.sh

reboot and test suspend!
« Última modificação: 21 de MAR?O de 2017, 16:11 por ggui »

Offline zekkerj

  • Usuário Ubuntu
  • *
  • Mensagens: 19.735
  • Gratidão gera gratidão, lamúria atrai lamúria...
    • Ver perfil
    • Blog do Zekke
Re:Notebook desconecta do wifi após hibernar/suspender
« Resposta #1 Online: 21 de MAR?O de 2017, 14:10 »
Sua máquina está atualizada?
Qual é o adaptador wireless dela, o adaptador Dell/Broadcomm, ou o Intel iwlagn?
Pesquise antes de perguntar, sua dúvida pode já ter sido respondida.
Não respondo dúvidas por MP, coloque sua dúvida no fórum onde ela pode ser pesquisada pelos seus colegas!
Não venha ao fórum apenas para perguntar. Se você sabe a resposta de um problema, porque não ajudar seu colega? ;D

Offline Nightlinux

  • Usuário Ubuntu
  • *
  • Mensagens: 353
    • Ver perfil
Re:Notebook desconecta do wifi após hibernar/suspender
« Resposta #2 Online: 21 de MAR?O de 2017, 14:20 »
Sua máquina está atualizada?
Qual é o adaptador wireless dela, o adaptador Dell/Broadcomm, ou o Intel iwlagn?

Como vejo essas informações?
Esse problema acontece desde que o notebook chegou em casa, há quase um ano.

Offline zekkerj

  • Usuário Ubuntu
  • *
  • Mensagens: 19.735
  • Gratidão gera gratidão, lamúria atrai lamúria...
    • Ver perfil
    • Blog do Zekke
Re:Notebook desconecta do wifi após hibernar/suspender
« Resposta #3 Online: 21 de MAR?O de 2017, 14:27 »
Verificar atualizações:

sudo apt-get update && sudo apt-get dist-upgrade

Verificar o adaptador wireless: voce deve ter escolhido o modelo do adaptador quando comprou a máquina. Se não lembra de ter escolhido, ou se não comprou na própria Dell, provavelmente está com o adaptador Dell mesmo. De qq forma, vc pode confirmar com o comando abaixo.

sudo lshw -C network

Cole o resultado aqui que a gente te ajuda a analisar.
Pesquise antes de perguntar, sua dúvida pode já ter sido respondida.
Não respondo dúvidas por MP, coloque sua dúvida no fórum onde ela pode ser pesquisada pelos seus colegas!
Não venha ao fórum apenas para perguntar. Se você sabe a resposta de um problema, porque não ajudar seu colega? ;D

Offline Nightlinux

  • Usuário Ubuntu
  • *
  • Mensagens: 353
    • Ver perfil
Re:Notebook desconecta do wifi após hibernar/suspender
« Resposta #4 Online: 21 de MAR?O de 2017, 14:40 »
guilherme@guilherme:~$ sudo apt-get update && sudo apt-get dist-upgrade
[sudo] password for guilherme:
Sorry, try again.
[sudo] password for guilherme:
Ign http://dl.google.com stable InRelease                                     
Ign http://archive.ubuntu.com trusty InRelease                                 
Hit http://security.ubuntu.com trusty-security InRelease                       
Ign http://archive.canonical.com trusty InRelease                             
Ign http://ppa.launchpad.net trusty InRelease                                 
Ign http://dell.archive.canonical.com trusty-dell InRelease                   
Hit http://dl.google.com stable Release.gpg                                   
Hit http://security.ubuntu.com trusty-security/main Sources                   
Hit http://archive.canonical.com trusty Release.gpg                           
Hit http://dell.archive.canonical.com trusty-dell Release.gpg                 
Hit http://dl.google.com stable Release                                       
Hit http://security.ubuntu.com trusty-security/restricted Sources             
Hit http://archive.canonical.com trusty Release                               
Hit http://dell.archive.canonical.com trusty-dell Release                     
Hit http://dl.google.com stable/main amd64 Packages                           
Hit http://security.ubuntu.com trusty-security/universe Sources               
Hit http://archive.canonical.com trusty/partner Sources                       
Hit http://security.ubuntu.com trusty-security/multiverse Sources             
Hit http://dell.archive.canonical.com trusty-dell/public Sources               
Hit http://security.ubuntu.com trusty-security/main amd64 Packages             
Hit http://archive.canonical.com trusty/partner amd64 Packages                 
Hit http://dell.archive.canonical.com trusty-dell/public amd64 Packages       
Hit http://security.ubuntu.com trusty-security/restricted amd64 Packages       
Get:1 http://archive.ubuntu.com trusty-updates InRelease [65.9 kB]             
Hit http://archive.canonical.com trusty/partner i386 Packages                 
Hit http://ppa.launchpad.net trusty InRelease                                 
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages         
Ign http://oem.archive.canonical.com trusty-oem InRelease                     
Hit http://dell.archive.canonical.com trusty-dell/public i386 Packages         
Hit http://security.ubuntu.com trusty-security/multiverse amd64 Packages       
Hit http://archive.canonical.com trusty/partner Translation-en                 
Hit http://ppa.launchpad.net trusty InRelease                                 
Hit http://oem.archive.canonical.com trusty-oem Release.gpg                   
Hit http://security.ubuntu.com trusty-security/main i386 Packages             
Hit http://ppa.launchpad.net trusty Release.gpg                               
Hit http://security.ubuntu.com trusty-security/restricted i386 Packages       
Hit http://oem.archive.canonical.com trusty-oem Release                       
Hit http://archive.ubuntu.com trusty-backports InRelease                       
Hit http://ppa.launchpad.net trusty/main amd64 Packages                       
Hit http://security.ubuntu.com trusty-security/universe i386 Packages         
Hit http://oem.archive.canonical.com trusty-oem/public Sources                 
Hit http://archive.ubuntu.com trusty Release.gpg                               
Hit http://ppa.launchpad.net trusty/main i386 Packages                         
Hit http://security.ubuntu.com trusty-security/multiverse i386 Packages       
Get:2 http://archive.ubuntu.com trusty-updates/main Sources [393 kB]           
Hit http://ppa.launchpad.net trusty/main Translation-en                       
Hit http://oem.archive.canonical.com trusty-oem/public amd64 Packages         
Hit http://security.ubuntu.com trusty-security/main Translation-en             
Ign http://dl.google.com stable/main Translation-en_US                         
Hit http://ppa.launchpad.net trusty/main amd64 Packages                       
Hit http://oem.archive.canonical.com trusty-oem/public i386 Packages           
Hit http://security.ubuntu.com trusty-security/multiverse Translation-en       
Ign http://dl.google.com stable/main Translation-en                           
Hit http://ppa.launchpad.net trusty/main i386 Packages                         
Hit http://security.ubuntu.com trusty-security/restricted Translation-en       
Hit http://security.ubuntu.com trusty-security/universe Translation-en         
Hit http://ppa.launchpad.net trusty/main Translation-en                       
Hit http://ppa.launchpad.net trusty Release                                   
Hit http://ppa.launchpad.net trusty/main amd64 Packages                       
Ign http://dell.archive.canonical.com trusty-dell/public Translation-en_US   
Hit http://ppa.launchpad.net trusty/main i386 Packages                         
Ign http://dell.archive.canonical.com trusty-dell/public Translation-en       
Hit http://ppa.launchpad.net trusty/main Translation-en                       
Get:3 http://archive.ubuntu.com trusty-updates/restricted Sources [6,268 B]   
Get:4 http://archive.ubuntu.com trusty-updates/universe Sources [175 kB]       
Ign http://oem.archive.canonical.com trusty-oem/public Translation-en_US       
Ign http://oem.archive.canonical.com trusty-oem/public Translation-en         
Get:5 http://archive.ubuntu.com trusty-updates/multiverse Sources [7,513 B]   
Get:6 http://archive.ubuntu.com trusty-updates/main amd64 Packages [962 kB]   
Get:7 http://archive.ubuntu.com trusty-updates/restricted amd64 Packages [17.1 kB]
Get:8 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [402 kB]
Get:9 http://archive.ubuntu.com trusty-updates/multiverse amd64 Packages [14.0 kB]
Get:10 http://archive.ubuntu.com trusty-updates/main i386 Packages [923 kB]   
Get:11 http://archive.ubuntu.com trusty-updates/restricted i386 Packages [16.8 kB]
Get:12 http://archive.ubuntu.com trusty-updates/universe i386 Packages [403 kB]
Get:13 http://archive.ubuntu.com trusty-updates/multiverse i386 Packages [14.4 kB]
Hit http://archive.ubuntu.com trusty-updates/main Translation-en               
Hit http://archive.ubuntu.com trusty-updates/multiverse Translation-en         
Hit http://archive.ubuntu.com trusty-updates/restricted Translation-en         
Hit http://archive.ubuntu.com trusty-updates/universe Translation-en           
Hit http://archive.ubuntu.com trusty-backports/main Sources                   
Hit http://archive.ubuntu.com trusty-backports/restricted Sources             
Hit http://archive.ubuntu.com trusty-backports/multiverse Sources             
Hit http://archive.ubuntu.com trusty-backports/universe Sources               
Hit http://archive.ubuntu.com trusty-backports/main amd64 Packages             
Hit http://archive.ubuntu.com trusty-backports/restricted amd64 Packages       
Hit http://archive.ubuntu.com trusty-backports/multiverse amd64 Packages       
Hit http://archive.ubuntu.com trusty-backports/universe amd64 Packages         
Hit http://archive.ubuntu.com trusty-backports/main i386 Packages             
Hit http://archive.ubuntu.com trusty-backports/restricted i386 Packages       
Hit http://archive.ubuntu.com trusty-backports/multiverse i386 Packages       
Hit http://archive.ubuntu.com trusty-backports/universe i386 Packages         
Hit http://archive.ubuntu.com trusty-backports/main Translation-en             
Hit http://archive.ubuntu.com trusty-backports/multiverse Translation-en       
Hit http://archive.ubuntu.com trusty-backports/restricted Translation-en       
Hit http://archive.ubuntu.com trusty-backports/universe Translation-en         
Hit http://archive.ubuntu.com trusty Release                                   
Hit http://archive.ubuntu.com trusty/main Sources                             
Hit http://archive.ubuntu.com trusty/restricted Sources                       
Hit http://archive.ubuntu.com trusty/universe Sources                         
Hit http://archive.ubuntu.com trusty/multiverse Sources                       
Hit http://archive.ubuntu.com trusty/main amd64 Packages                       
Hit http://archive.ubuntu.com trusty/restricted amd64 Packages                 
Hit http://archive.ubuntu.com trusty/universe amd64 Packages                   
Hit http://archive.ubuntu.com trusty/multiverse amd64 Packages                 
Hit http://archive.ubuntu.com trusty/main i386 Packages                       
Hit http://archive.ubuntu.com trusty/restricted i386 Packages                 
Hit http://archive.ubuntu.com trusty/universe i386 Packages                   
Hit http://archive.ubuntu.com trusty/multiverse i386 Packages                 
Hit http://archive.ubuntu.com trusty/main Translation-en                       
Hit http://archive.ubuntu.com trusty/multiverse Translation-en                 
Hit http://archive.ubuntu.com trusty/restricted Translation-en                 
Hit http://archive.ubuntu.com trusty/universe Translation-en                   
Ign http://archive.ubuntu.com trusty/main Translation-en_US                   
Ign http://archive.ubuntu.com trusty/multiverse Translation-en_US             
Ign http://archive.ubuntu.com trusty/restricted Translation-en_US             
Ign http://archive.ubuntu.com trusty/universe Translation-en_US               
Fetched 3,400 kB in 34s (97.6 kB/s)                                           
Reading package lists... Done
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: Ignoring Provides line with DepCompareOp for package libreoffice-l10n
W: You may want to run apt-get update to correct these problems
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

guilherme@guilherme:~$ sudo lshw -C network
  *-network               
       description: Wireless interface
       product: QCA9565 / AR9565 Wireless Network Adapter
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:06:00.0
       logical name: wlan0
       version: 01
       serial: 40:49:0f:fd:5f:c7
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=3.13.0-112-generic firmware=N/A ip=192.168.0.110 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
       resources: irq:18 memory:f7100000-f717ffff memory:f7180000-f718ffff
  *-network
       description: Ethernet interface
       product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:07:00.0
       logical name: eth0
       version: 07
       serial: f4:8e:38:e4:8d:44
       size: 10Mbit/s
       capacity: 100Mbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8106e-1_0.0.1 06/29/12 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: irq:60 ioport:e000(size=256) memory:f7000000-f7000fff memory:f0000000-f0003fff

Citar
voce deve ter escolhido o modelo do adaptador quando comprou a máquina.

Comprei na própria Dell, mas não tinha opção de escolha, ou escolhi sem saber.

Offline zekkerj

  • Usuário Ubuntu
  • *
  • Mensagens: 19.735
  • Gratidão gera gratidão, lamúria atrai lamúria...
    • Ver perfil
    • Blog do Zekke
Re:Notebook desconecta do wifi após hibernar/suspender
« Resposta #5 Online: 21 de MAR?O de 2017, 15:05 »
Veja se isso resolve seu problema.

No meu caso, tive problema com conexão de internet após hibernação do Ubuntu 14.04. A conexão de rede simplesmente não retornava, ou seja, a rede permanecia em estado de sono. No meu caso, inseri uma linha de comando dentro do arquivo /etc/pm/sleep.d/10_grub-common (Que na verdade é um script). Para editar este arquivo:

1) Abra o terminal e vá até a pasta acima: cd /etc/pm/sleep.d
2) Digite sudo gedit 10_grub_common
3) Veja os comandos dentro deste script:

#!/bin/sh
# Tell grub that resume was successful
case "$1" in thaw)
[ -s /boot/grub/grubenv ] || rm -f /boot/grub/grubenv
mkdir -p /boot/grub
grub-editenv /boot/grub/grubenv unset recordfail

# Nova linha de comando inserida (24/07/2014)
nmcli nm sleep false
;;
esac

4) Salve o arquivo. Hiberne (Ou reinicie a máquina). Em seguida certifique se o dispositivo de rede volta automaticamente. O comando acima acorda a interface de rede, digamos assim. Pra mim funcionou bem! abs
Pesquise antes de perguntar, sua dúvida pode já ter sido respondida.
Não respondo dúvidas por MP, coloque sua dúvida no fórum onde ela pode ser pesquisada pelos seus colegas!
Não venha ao fórum apenas para perguntar. Se você sabe a resposta de um problema, porque não ajudar seu colega? ;D

Offline platao

  • Equipe Ubuntu
  • Usuário Ubuntu
  • *****
  • Mensagens: 5.052
    • Ver perfil
Re:Notebook desconecta do wifi após hibernar/suspender
« Resposta #6 Online: 21 de MAR?O de 2017, 15:46 »
Tive esse problema aqui no meu ubuntu 16.04 e segui esse tutorial aqui que e "batata" para ajudar  ;  )

https://igtek.tk/index.php/2016/05/11/fix-ubuntu-16-04-no-wireless-connection-after-suspend/

Step 1: Create a new script in the systemd system-sleep folder.

sudo gedit  /lib/systemd/system-sleep/reset_network.sh

Step 2: Copy and paste the following into the newly created script.

#!/bin/bash
if [ $1 = post ] && [ $2 = suspend ]
then service network-manager restart
fi

Step 3: Save e exit.

Step 4: Make the script executable.

sudo chmod +x /lib/systemd/system-sleep/reset_network.sh

reboot and test suspend!

« Última modificação: 21 de MAR?O de 2017, 15:48 por platao »
\\\\\\\\Apostilas Dicas e Guias do Ubuntu\\\\\\\\\> http://ubuntuforum-br.org/index.php/topic,79368.msg440997.html#msg440997

Offline Nightlinux

  • Usuário Ubuntu
  • *
  • Mensagens: 353
    • Ver perfil
Re:Notebook desconecta do wifi após hibernar/suspender
« Resposta #7 Online: 21 de MAR?O de 2017, 16:08 »
Não resolveu:

Veja se isso resolve seu problema.

No meu caso, tive problema com conexão de internet após hibernação do Ubuntu 14.04. A conexão de rede simplesmente não retornava, ou seja, a rede permanecia em estado de sono. No meu caso, inseri uma linha de comando dentro do arquivo /etc/pm/sleep.d/10_grub-common (Que na verdade é um script). Para editar este arquivo:

1) Abra o terminal e vá até a pasta acima: cd /etc/pm/sleep.d
2) Digite sudo gedit 10_grub_common
3) Veja os comandos dentro deste script:

#!/bin/sh
# Tell grub that resume was successful
case "$1" in thaw)
[ -s /boot/grub/grubenv ] || rm -f /boot/grub/grubenv
mkdir -p /boot/grub
grub-editenv /boot/grub/grubenv unset recordfail

# Nova linha de comando inserida (24/07/2014)
nmcli nm sleep false
;;
esac

4) Salve o arquivo. Hiberne (Ou reinicie a máquina). Em seguida certifique se o dispositivo de rede volta automaticamente. O comando acima acorda a interface de rede, digamos assim. Pra mim funcionou bem! abs


RESOLVEU!!!
Tive esse problema aqui no meu ubuntu 16.04 e segui esse tutorial aqui que e "batata" para ajudar  ;  )

https://igtek.tk/index.php/2016/05/11/fix-ubuntu-16-04-no-wireless-connection-after-suspend/

Step 1: Create a new script in the systemd system-sleep folder.

sudo gedit  /lib/systemd/system-sleep/reset_network.sh

Step 2: Copy and paste the following into the newly created script.

#!/bin/bash
if [ $1 = post ] && [ $2 = suspend ]
then service network-manager restart
fi

Step 3: Save e exit.

Step 4: Make the script executable.

sudo chmod +x /lib/systemd/system-sleep/reset_network.sh

reboot and test suspend!

Logo que voltei da hibernação o notebook já estava conectado, então acho resolveu e foi a segunda opção, do platão.

Muito obrigado, zekkerj e platão.