(solved) lost WiF after suspend or hibernate and wake it up elsewhere

Forum Forums General Software (solved) lost WiF after suspend or hibernate and wake it up elsewhere

  • This topic has 11 replies, 5 voices, and was last updated Jan 1-11:50 am by Anonymous.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #4536
    Moderator
    BobC

      First off, I’m running AntiX17 full 64 bit, and using wpa_supplicant and wpa_gui (which are working great otherwise and use very little memory), not wicd or ceni. wicd uses a lot of memory and ceni is not happy roaming.

      I was in another town and was using wifi there. I suspended. I got home and woke it up, but wifi was down.

      Can someone please tell me what commands to run to diagnose why wifi doesn’t reset, or get it to reset completely without needing to reboot?

      It will work again if I reboot, but I really hate rebooting all the time and losing everything I was doing. Hibernating and waking up from hibernation didn’t work either. What was odd was that I found that all my network connection options in /etc/wpa_supplicant/wpa_supplicant.conf were disabled except the ones for the place where I was at. I went in and manually removed the disabled=1 lines and rebooted and wifi worked again, but I don’t thnk it should be disabling my wifi connections at all, and when it wakes up, it should connect to whatever it can in whatever sequence the priorities are set at.

      Thanks for any info or suggestions 🙂

      bobc@DellXPS15:~
      $ inxi -Fxz
      System:    Host: DellXPS15 Kernel: 4.8.10-antix-sid.1-amd64-smp x86_64 bits: 64 gcc: 6.2.1 Desktop: IceWM 1.4.2
                 Distro: antiX-17_x64-full Heather Heyer 24 October 2017
      Machine:   Device: laptop System: Dell product: Inspiron 7559 v: 1.2.2 serial: N/A
                 Mobo: Dell model: 0H0CC0 v: A00 serial: N/A UEFI: Dell v: 1.2.2 date: 01/22/2017
      Battery    BAT0: charge: 72.5 Wh 100.0% condition: 72.5/74.0 Wh (98%) model: SIMPLO Dell status: Full
      CPU:       Quad core Intel Core i7-6700HQ (-MT-MCP-) arch: Skylake-S rev.3 cache: 6144 KB
                 flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 20744
                 clock speeds: max: 3500 MHz 1: 1100 MHz 2: 1100 MHz 3: 1099 MHz 4: 1099 MHz 5: 1100 MHz 6: 1100 MHz
                 7: 1100 MHz 8: 1152 MHz
      Graphics:  Card-1: Intel HD Graphics 530 bus-ID: 00:02.0
                 Card-2: NVIDIA GM107M [GeForce GTX 960M] bus-ID: 02:00.0
                 Display Server: X.Org 1.19.2 drivers: modesetting,nouveau (unloaded: fbdev,vesa)
                 Resolution: 1680x1050@59.95hz
                 OpenGL: renderer: Mesa DRI Intel HD Graphics 530 (Skylake GT2)
                 version: 4.5 Mesa 13.0.6 Direct Render: Yes
      Audio:     Card Intel Sunrise Point-H HD Audio driver: snd_hda_intel bus-ID: 00:1f.3
                 Sound: Advanced Linux Sound Architecture v: k4.8.10-antix-sid.1-amd64-smp
      Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
                 driver: r8169 v: 2.3LK-NAPI port: d000 bus-ID: 04:00.0
                 IF: eth0 state: down mac: <filter>
                 Card-2: Intel Wireless 3165 driver: iwlwifi bus-ID: 05:00.0
                 IF: wlan0 state: up mac: <filter>
                 Card-3: Atmel usb-ID: 001-004
                 IF: null-if-id state: N/A speed: N/A duplex: N/A mac: N/A
      Drives:    HDD Total Size: 1256.3GB (2.8% used)
                 ID-1: /dev/sda model: MTFDDAV256MBF size: 256.1GB
                 ID-2: /dev/sdb model: ST1000LM014 size: 1000.2GB
      Partition: ID-1: / size: 21G used: 4.1G (21%) fs: ext4 dev: /dev/sda3
                 ID-2: swap-1 size: 32.00GB used: 0.00GB (0%) fs: swap dev: /dev/sdb6
      Sensors:   System Temperatures: cpu: 32.0C mobo: 27.8C gpu: 31.0
                 Fan Speeds (in rpm): cpu: N/A
      Info:      Processes: 197 Uptime: 1:21 Memory: 999.8/15912.2MB Init: SysVinit runlevel: 5 Gcc sys: 6.3.0
                 Client: Shell (bash 4.4.121) inxi: 2.3.53
      bobc@DellXPS15:~
      

      lsmod output when working

      Module                  Size  Used by
      ccm                     8432  2
      cmac                    2725  1
      bnep                   10674  2
      cpufreq_powersave       1192  0
      cpufreq_conservative     3789  0
      nfsd                  253943  2
      auth_rpcgss            41831  1 nfsd
      nfs_acl                 2975  1 nfsd
      nfs                   130548  0
      lockd                  59680  2 nfsd,nfs
      grace                   1986  2 nfsd,lockd
      fscache                33507  1 nfs
      sunrpc                182498  6 auth_rpcgss,nfsd,nfs_acl,lockd,nfs
      af_packet              32854  12
      nls_utf8                1512  1
      nls_cp437               6121  1
      parport_pc             30101  0
      ppdev                   6245  0
      lp                      9948  0
      parport                32350  3 lp,parport_pc,ppdev
      dm_crypt               17965  0
      dm_mod                 88671  1 dm_crypt
      snd_hda_codec_hdmi     32929  1
      uvcvideo               73945  0
      videobuf2_vmalloc       4518  1 uvcvideo
      videobuf2_memops        1545  1 videobuf2_vmalloc
      videobuf2_v4l2         10291  1 uvcvideo
      videobuf2_core         24608  2 uvcvideo,videobuf2_v4l2
      videodev              120941  3 uvcvideo,videobuf2_core,videobuf2_v4l2
      media                  19151  2 uvcvideo,videodev
      hid_multitouch         10824  0
      btusb                  28153  0
      btrtl                   4192  1 btusb
      arc4                    2168  2
      dell_led                2391  1
      snd_hda_codec_realtek    58048  1
      snd_hda_codec_generic    54474  1 snd_hda_codec_realtek
      iwlmvm                219252  0
      mac80211              390865  1 iwlmvm
      dell_wmi                3168  0
      sparse_keymap           3154  1 dell_wmi
      dell_smbios             2150  2 dell_wmi,dell_led
      x86_pkg_temp_thermal     5189  0
      coretemp                5980  0
      wl                   6366235  0
      kvm_intel             172119  0
      dcdbas                  5447  1 dell_smbios
      kvm                   340571  1 kvm_intel
      dell_smm_hwmon          8121  0
      crct10dif_pclmul        4452  0
      crc32_pclmul            2867  0
      ghash_clmulni_intel     4232  0
      aesni_intel           157925  6
      aes_x86_64              7567  1 aesni_intel
      nouveau              1434341  1
      lrw                     3797  1 aesni_intel
      glue_helper             4149  1 aesni_intel
      ablk_helper             2268  1 aesni_intel
      i915                 1124736  4
      cryptd                  8575  3 ablk_helper,ghash_clmulni_intel,aesni_intel
      snd_hda_intel          21965  0
      intel_cstate            5205  0
      snd_hda_codec          82877  4 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
      intel_rapl_perf         6200  0
      idma64                  6960  0
      snd_hda_core           43977  5 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
      snd_hwdep               5930  1 snd_hda_codec
      evdev                  12906  22
      snd_pcm                77869  4 snd_hda_intel,snd_hda_codec,snd_hda_core,snd_hda_codec_hdmi
      mxm_wmi                 1763  1 nouveau
      joydev                 10023  0
      input_leds              3086  0
      snd_timer              19551  1 snd_pcm
      i2c_algo_bit            5328  2 nouveau,i915
      ttm                    71387  1 nouveau
      serio_raw               4529  0
      snd                    57246  8 snd_hda_intel,snd_hwdep,snd_hda_codec,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek,snd_pcm
      drm_kms_helper        113773  2 nouveau,i915
      soundcore               5347  1 snd
      iwlwifi               121540  1 iwlmvm
      iTCO_wdt                5924  0
      drm                   267247  8 nouveau,i915,ttm,drm_kms_helper
      iTCO_vendor_support     2033  1 iTCO_wdt
      hci_uart               38899  0
      rtsx_pci_ms             5378  0
      syscopyarea             3262  1 drm_kms_helper
      btbcm                   6175  2 hci_uart,btusb
      sysfillrect             3626  1 drm_kms_helper
      mei_me                 12746  0
      btintel                 7096  2 hci_uart,btusb
      memstick                6480  1 rtsx_pci_ms
      sysimgblt               2367  1 drm_kms_helper
      cfg80211              231798  4 wl,iwlmvm,iwlwifi,mac80211
      mei                    48380  1 mei_me
      intel_lpss_pci          4686  0
      processor_thermal_device     6122  0
      intel_gtt              12534  1 i915
      fb_sys_fops             1506  1 drm_kms_helper
      intel_soc_dts_iosf      4286  1 processor_thermal_device
      int3403_thermal         2600  0
      battery                 7562  0
      bluetooth             302920  27 btrtl,hci_uart,btintel,bnep,btbcm,btusb
      ac                      3699  0
      intel_lpss_acpi         2449  0
      intel_lpss              4705  2 intel_lpss_pci,intel_lpss_acpi
      video                  26789  3 dell_wmi,nouveau,i915
      int3402_thermal         1720  0
      int340x_thermal_zone     3276  3 int3402_thermal,int3403_thermal,processor_thermal_device
      int3400_thermal         3622  0
      acpi_thermal_rel        4586  1 int3400_thermal
      wmi                     7380  4 dell_wmi,dell_led,mxm_wmi,nouveau
      dell_rbtn               4156  0
      rfkill                 14628  6 bluetooth,dell_rbtn,cfg80211
      acpi_pad               10046  0
      button                  5583  2 nouveau,i915
      btrfs                 865704  0
      xor                    10424  1 btrfs
      raid6_pq               95065  1 btrfs
      hid_generic             1385  0
      rtsx_pci_sdmmc         10424  0
      mmc_core               90960  1 rtsx_pci_sdmmc
      crc32c_intel           13091  3
      psmouse               102553  0
      i2c_i801               17011  0
      i2c_smbus               3297  1 i2c_i801
      rtsx_pci               30229  2 rtsx_pci_sdmmc,rtsx_pci_ms
      r8169                  66579  0
      mii                     4099  1 r8169
      fan                     4066  0
      thermal                 8695  0
      i2c_hid                11436  0
      i2c_core               24502  9 i2c_hid,i2c_algo_bit,videodev,i2c_i801,nouveau,i2c_smbus,i915,drm_kms_helper,drm
      fjes                   21363  0
      

      iwconfig output when working

      wlan0     IEEE 802.11  ESSID:"dlink19"  
                Mode:Managed  Frequency:2.437 GHz  Access Point: EC:1A:59:B0:7D:2E   
                Bit Rate=1 Mb/s   Tx-Power=22 dBm   
                Retry short limit:7   RTS thr:off   Fragment thr:off
                Power Management:off
                Link Quality=45/70  Signal level=-65 dBm  
                Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
                Tx excessive retries:1  Invalid misc:389   Missed beacon:0
      

      /etc/wpa_supplicant/wpa_supplicant.conf

      ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
      update_config=1
      
      network={
      	ssid="dlink19"
      	psk="passwordhere"
      	proto=RSN
      	key_mgmt=WPA-PSK
      	pairwise=CCMP
      	auth_alg=OPEN
      }
      
      network={
      	ssid="unsecure"
      	key_mgmt=NONE
      	priority=5
      	id_str="unsecure"
      }
      
      network={
      	ssid="Comfort Inn Rockford_Guest"
      	key_mgmt=NONE
      	priority=10
      }
      

      /etc/network/interfaces

      #------------------------------------------------------------------------------
      # /etc/network/interfaces
      #
      # interfaces(5) file used by ifup(8) and ifdown(8)
      # Used by ceni but not by wicd
      #------------------------------------------------------------------------------
      
      auto lo
      iface lo inet loopback
      
      allow-hotplug eth0
      iface eth0 inet dhcp
      
      allow-hotplug eth1
      iface eth1 inet dhcp
      
      allow-hotplug eth2
      iface eth2 inet dhcp
      
      allow-hotplug eth3
      iface eth3 inet dhcp
      
      auto wlan0
      iface wlan0 inet manual
      	wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
      iface default inet dhcp
      
      • This topic was modified 5 years, 4 months ago by BobC.
      #4539
      Anonymous
        Helpful
        Up
        0
        ::

        whereami

        #4540
        Forum Admin
        rokytnji
          Helpful
          Up
          0
          ::

          I was in another town and was using wifi there. I suspended. I got home and woke it up, but wifi was down.

          I do not find this behavior unusual. Different router. Different IP.

          IF: wlan0 state: up

          Lot’s of fancy readouts. But I fail to see a problem. Must be a cultural blockage on my end.

          I realize you got a problem.

          It will work again if I reboot, but I really hate rebooting all the time and losing everything I was doing. Hibernating and waking up from hibernation didn’t work either. What was odd was that I found that all my network connection options in /etc/wpa_supplicant/wpa_supplicant.conf were disabled except the ones for the place where I was at. I went in and manually removed the disabled=1 lines and rebooted and wifi worked again, but I don’t thnk it should be disabling my wifi connections at all, and when it wakes up, it should connect to whatever it can in whatever sequence the priorities are set at.

          I’m just too thick headed to see it I guess. But then. I use Wicd always. Even on my Pentium 3’s.

          Sometimes I drive a crooked road to get my mind straight.
          Not all who Wander are Lost.
          I'm not outa place. I'm from outer space.

          Linux Registered User # 475019
          How to Search for AntiX solutions to your problems

          #4550
          Moderator
          BobC
            Helpful
            Up
            0
            ::

            Roki, Maybe that’s because I did the listings after I rebooted and things were working again. I am really just hoping to find that someone knows to run this, that and then something else, ie a recipe to diagnose WiFi problems in a wpa_supplicant environment.

            Of course, if I could just FIX it, LOL, I guess I’d just move on 🙂

            I found that the laptop has a function key on Fn+PrtScr to turn WiFi on and off, and it looks like it works, but I’ll need to suspend and go some place else and wake it up to see if that solves it.

            Does anyone know how to see what pressing Fn+PrtScr actually does?

            #4556
            Forum Admin
            dolphin_oracle
              Helpful
              Up
              0
              ::

              I would just run

              ifdown interface
              ifup interface

              to cycle your connection down and up and force a reconnect.

              #4558
              Moderator
              BobC
                Helpful
                Up
                0
                ::

                Ok, will go try that this afternoon, thanks

                #4570
                Moderator
                BobC
                  Helpful
                  Up
                  0
                  ::

                  So what worked was to wake it up, then I had to press the WiFi on/off key 2 or 3 times, then it was working, then had to use wpa_gui and change to wlan0, the, scan, add the network, then connect. It took a few tries, as i think there was a limit of 10 networks, but all worked.

                  Thanks everyone

                  #4572
                  Anonymous
                    Helpful
                    Up
                    0
                    ::

                    how to see what pressing Fn+PrtScr actually does?

                    From a terminal emulator prompt, run the command xev
                    then press Fn+PrtScr
                    and note the associated terminal output

                    #4579
                    Moderator
                    BobC
                      Helpful
                      Up
                      0
                      ::

                      Well, I got home and can’t connect.

                      When I press the WiFi on/off key I see wifi related programs run, but wpa_gui can’t scan or connect.

                      #4581
                      Moderator
                      BobC
                        Helpful
                        Up
                        0
                        ::

                        Hmmmmm, Neither toggling the WiFi key, nor the ifdown wlan0 followed by ifup wlan0 got it to connect when I got home.

                        I finally went into wpa_gui and was eventually able to connect to my home WiFi again. I’m still not sure what to do to fix it…

                        I need to increase my scrollback buffer to see the xev. I will add it to this post once I get the output.

                        #4582
                        Moderator
                        BobC
                          Helpful
                          Up
                          0
                          ::

                          Very odd… So it wouldn’t do anything…

                          I guess its going to happen all the time, so I’ll put it into a script to run anytime I resume and wifi refuses to work and I’ll call it wpa_reset for lack of a better name.

                          I found an old ubuntu post from before debian had systemd, and the short story is that I figured out it was blocked, so pressed the wifi toggle, and once unblocked, the code to make it work again was:

                          killall wpa_supplicant
                          wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -Dwext
                          dhclient wlan0

                          Program by David C Rankin off Stack Overflow https://stackoverflow.com/questions/25394772/parsing-iwlist-scan-using-bash to get a list of networks:
                          I modified his code to display the list in descending sequence by signal strength

                          iwlist wlan0 scan | bash parseiwl.sh

                          Program parrseiwl.sh to parse iwlist wlan0 scan output:

                          #!/bin/bash
                          
                          # parseiwl.sh - parse iwlist output, with revrerse sort by signal strength
                          
                          rm /tmp/parseiwl.sh.tmp
                          touch /tmp/parseiwl.sh.tmp
                          ## print header lines
                          echo ""
                          echo " mac                 essid         frq   chn qual   lvl  enc"
                          
                          while IFS= read -r line; do
                          
                              ## test line contenst and parse as required
                              [[ "$line" =~ Address ]] && mac=${line##*ss: }
                              [[ "$line" =~ \(Channel ]] && { chn=${line##*nel }; chn=${chn:0:$((${#chn}-1))}; }
                              [[ "$line" =~ Frequen ]] && { frq=${line##*ncy:}; frq=${frq%% *}; }
                              [[ "$line" =~ Quality ]] && { 
                                  qual=${line##*ity=}
                                  qual=${qual%% *}
                                  lvl=${line##*evel=}
                                  lvl=${lvl%% *}
                              }
                              [[ "$line" =~ Encrypt ]] && enc=${line##*key:}
                              [[ "$line" =~ ESSID ]] && {
                                  essid=${line##*ID:}
                                  echo " $mac  $essid  $frq  $chn  $qual  $lvl  $enc"  >> /tmp/parseiwl.sh.tmp 
                                  # output after ESSID
                              }
                          
                          done
                          sort /tmp/parseiwl.sh.tmp -r -g -k 5,5
                          • This reply was modified 5 years, 4 months ago by BobC.
                          • This reply was modified 5 years, 4 months ago by BobC.
                          • This reply was modified 5 years, 4 months ago by BobC.
                          #4637
                          Anonymous
                            Helpful
                            Up
                            0
                            ::

                            Thanks for reporting the solution. For the benefit of future searches, I’ve added (solved) to topic title.

                          Viewing 12 posts - 1 through 12 (of 12 total)
                          • You must be logged in to reply to this topic.