Page 1 sur 1

[WiFi] Pas de WiFi après sortie de veille (Résolu)

Publié : sam. 08 juin 2013, 11:45
par Xorg
Bonjour.

J'ai un petit soucis de WiFi qui dure et que je ne parviens pas à résoudre. J'utilise une clé WiFi qu'on branche sur un port USB, et netctl fait le reste automatiquement, car je n'utilise qu'une seule connexion nommée wifi0. Tout marche bien, sauf quand je sors de veille, je n'ai plus de connexion au WiFi. La seule solution qui marche pour rétablir la connexion est de déconnecter ma clé USB WiFi, le remettre et redémarrer le profil netctl.

Voici mon /etc/netctl/wifi0 :

Code : Tout sélectionner

Connection=wireless
Description='A simple WPA encrypted wireless connection'
Interface=wifi0
Security=wpa
ESSID='Mon Super SSID'
Key=Ma_clé_qui_tue

#IP=dhcp
IP=static
Address='192.168.1.21/24'
Gateway='192.168.1.1'
DNS=(192.168.1.1)

# Uncomment this if your ssid is hidden
Hidden=yes
SSID caché, et IP statique car mes IP sont toujours les mêmes chez moi, donc je ne vois pas trop l'intérêt d'utiliser DHCP (qui me parait être un peu plus long pour démarrer la connexion).

Le profil a été activé grâce à cette commande :

Code : Tout sélectionner

# netctl enable wifi0
La preuve que ça fonctionne :

Code : Tout sélectionner

% systemctl status netctl@wifi0.service
netctl@wifi0.service - A simple WPA encrypted wireless connection
   Loaded: loaded (/etc/systemd/system/netctl@wifi0.service; enabled)
   Active: active (exited) since sam. 2013-06-08 10:43:22 CEST; 25min ago
     Docs: man:netctl.profile(5)
  Process: 416 ExecStart=/usr/lib/network/network start %I (code=exited, status=0/SUCCESS)
   CGroup: name=systemd:/system/netctl@.service/netctl@wifi0.service
           └─533 wpa_supplicant -B -P /run/wpa_supplicant_wifi0.pid -i wifi0 -D nl80211,wext -c/run/network/wpa_supplicant_wifi0.conf

juin 08 10:43:21 localhost network[416]: Starting network profile 'wifi0'...
juin 08 10:43:22 localhost network[416]: Started network profile 'wifi0'
juin 08 10:43:22 localhost systemd[1]: Started A simple WPA encrypted wireless connection.
De plus, comme l'indique le Wiki français, j'ai activé netctl-sleep.service :

Code : Tout sélectionner

% systemctl status netctl-sleep.service
netctl-sleep.service - netctl sleep hook
   Loaded: loaded (/usr/lib/systemd/system/netctl-sleep.service; enabled)
   Active: inactive (dead)

juin 07 22:25:24 localhost systemd[1]: Starting netctl sleep hook...
juin 07 22:25:24 localhost systemd[1]: Started netctl sleep hook.
juin 08 00:21:05 localhost systemd[1]: Service netctl-sleep.service is not needed anymore. Stopping.
juin 08 00:21:05 localhost systemd[1]: Stopping netctl sleep hook...
juin 08 00:21:05 localhost systemd[1]: Stopped netctl sleep hook.
juin 08 00:36:52 localhost systemd[1]: Starting netctl sleep hook...
juin 08 00:36:55 localhost systemd[1]: Started netctl sleep hook.
juin 08 00:57:52 localhost systemd[1]: Service netctl-sleep.service is not needed anymore. Stopping.
juin 08 00:57:52 localhost systemd[1]: Stopping netctl sleep hook...
juin 08 00:58:01 localhost systemd[1]: Stopped netctl sleep hook.
iwconfig montre que tout est OK :

Code : Tout sélectionner

% iwconfig
wifi0     IEEE 802.11bgn  ESSID:"Mon Super SSID"  
          Mode:Managed  Frequency:2.462 GHz  Access Point: FF:FF:FF:FF:FF:FF  
          Bit Rate=54 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=54/70  Signal level=-56 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:219   Missed beacon:0
Le journal, après la commande de mise en veille et l'état de veille indique :

Code : Tout sélectionner

juin 08 11:21:54 localhost systemd[1]: Stopping A simple WPA encrypted wireless connection...
juin 08 11:21:57 localhost network[4394]: Stopping network profile 'wifi0'...
juin 08 11:21:57 localhost kernel: wifi0: deauthenticating from FF:FF:FF:FF:FF:FF by local choice (reason=3)
juin 08 11:21:57 localhost kernel: cfg80211: Calling CRDA for country: CN
juin 08 11:21:57 localhost network[4394]: Stopped network profile 'wifi0'
juin 08 11:21:57 localhost systemd[1]: Stopped A simple WPA encrypted wireless connection.
juin 08 11:21:57 localhost systemd[1]: Started netctl sleep hook.
juin 08 11:21:57 localhost systemd[1]: Starting Sleep.
juin 08 11:21:57 localhost systemd[1]: Reached target Sleep.
juin 08 11:21:57 localhost systemd[1]: Starting Suspend...
juin 08 11:21:57 localhost systemd-sleep[4470]: Suspending system...
juin 08 11:21:58 localhost kernel: PM: Syncing filesystems ... done.
juin 08 11:21:58 localhost kernel: PM: Preparing system for mem sleep
Et maintenant, à la sortie de la veille :

Code : Tout sélectionner

% systemctl status netctl@wifi0.service
netctl@wifi0.service - A simple WPA encrypted wireless connection
   Loaded: loaded (/etc/systemd/system/netctl@wifi0.service; enabled)
   Active: failed (Result: exit-code) since sam. 2013-06-08 11:23:36 CEST; 23s ago
     Docs: man:netctl.profile(5)
  Process: 4394 ExecStop=/usr/lib/network/network stop %I (code=exited, status=0/SUCCESS)
  Process: 4573 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)

juin 08 11:23:20 localhost network[4573]: Starting network profile 'wifi0'...
juin 08 11:23:36 localhost network[4573]: WPA association/authentication failed for interface 'wifi0'
juin 08 11:23:36 localhost systemd[1]: netctl@wifi0.service: main process exited, code=exited, status=1/FAILURE
juin 08 11:23:36 localhost systemd[1]: Failed to start A simple WPA encrypted wireless connection.
juin 08 11:23:36 localhost systemd[1]: Unit netctl@wifi0.service entered failed state.

Code : Tout sélectionner

% systemctl status netctl-sleep.service 
netctl-sleep.service - netctl sleep hook
   Loaded: loaded (/usr/lib/systemd/system/netctl-sleep.service; enabled)
   Active: inactive (dead) since sam. 2013-06-08 11:23:36 CEST; 1min 8s ago
  Process: 4568 ExecStop=/usr/bin/netctl restore (code=exited, status=1/FAILURE)
  Process: 4386 ExecStart=/usr/bin/netctl stop-all (code=exited, status=0/SUCCESS)
  Process: 4368 ExecStart=/usr/bin/netctl store (code=exited, status=0/SUCCESS)

juin 08 11:21:57 localhost systemd[1]: Started netctl sleep hook.
juin 08 11:23:17 localhost systemd[1]: Service netctl-sleep.service is not needed anymore. Stopping.
juin 08 11:23:17 localhost systemd[1]: Stopping netctl sleep hook...
juin 08 11:23:36 localhost systemd[1]: Stopped netctl sleep hook.

Code : Tout sélectionner

% iwconfig
wifi0     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
Et à priori, le journal après la veille est :

Code : Tout sélectionner

juin 08 11:23:17 localhost kernel: Freezing user space processes ... (elapsed 0.01 seconds) done.
juin 08 11:23:17 localhost kernel: Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
juin 08 11:23:17 localhost systemd[1]: Time has been changed
juin 08 11:23:17 localhost systemd-sleep[4470]: System resumed.
juin 08 11:23:17 localhost kernel: PM: Entering mem sleep
juin 08 11:23:17 localhost kernel: Suspending console(s) (use no_console_suspend to debug)
juin 08 11:23:17 localhost kernel: sd 1:0:0:0: [sdb] Synchronizing SCSI cache
juin 08 11:23:17 localhost kernel: sd 0:0:0:0: [sda] Synchronizing SCSI cache
juin 08 11:23:17 localhost kernel: sd 1:0:0:0: [sdb] Stopping disk
juin 08 11:23:17 localhost kernel: sd 0:0:0:0: [sda] Stopping disk
juin 08 11:23:17 localhost kernel: mei 0000:00:16.0: suspend
juin 08 11:23:17 localhost kernel: <6>[fglrx] IRQ 54 Disabled
juin 08 11:23:17 localhost kernel: <6>[fglrx] Preparing suspend fglrx in kernel.
juin 08 11:23:17 localhost kernel: <6>[fglrx] Suspending fglrx in kernel completed.
juin 08 11:23:17 localhost kernel: <6>[fglrx] Power down the ASIC .
juin 08 11:23:17 localhost kernel: PM: suspend of devices complete after 529.745 msecs
juin 08 11:23:17 localhost kernel: PM: late suspend of devices complete after 0.187 msecs
juin 08 11:23:17 localhost kernel: xhci_hcd 0000:04:00.0: System wakeup enabled by ACPI
juin 08 11:23:17 localhost kernel: xhci_hcd 0000:03:00.0: System wakeup enabled by ACPI
juin 08 11:23:17 localhost kernel: ehci-pci 0000:00:1a.0: System wakeup enabled by ACPI
juin 08 11:23:17 localhost kernel: PM: noirq suspend of devices complete after 54.793 msecs
juin 08 11:23:17 localhost kernel: ACPI: Preparing to enter system sleep state S3
juin 08 11:23:17 localhost kernel: PM: Saving platform NVS memory
juin 08 11:23:17 localhost kernel: Disabling non-boot CPUs ...
juin 08 11:23:17 localhost kernel: smpboot: CPU 1 is now offline
juin 08 11:23:17 localhost kernel: smpboot: CPU 2 is now offline
juin 08 11:23:17 localhost kernel: smpboot: CPU 3 is now offline
juin 08 11:23:17 localhost kernel: ACPI: Low-level resume complete
juin 08 11:23:17 localhost kernel: PM: Restoring platform NVS memory
juin 08 11:23:17 localhost kernel: Enabling non-boot CPUs ...
juin 08 11:23:17 localhost kernel: smpboot: Booting Node 0 Processor 1 APIC 0x2
juin 08 11:23:17 localhost kernel: Intel pstate controlling: cpu 1
juin 08 11:23:17 localhost kernel: CPU1 is up
juin 08 11:23:17 localhost kernel: smpboot: Booting Node 0 Processor 2 APIC 0x4
juin 08 11:23:17 localhost kernel: Intel pstate controlling: cpu 2
juin 08 11:23:17 localhost kernel: CPU2 is up
juin 08 11:23:17 localhost kernel: smpboot: Booting Node 0 Processor 3 APIC 0x6
juin 08 11:23:17 localhost kernel: Intel pstate controlling: cpu 3
juin 08 11:23:17 localhost kernel: CPU3 is up
juin 08 11:23:17 localhost kernel: ACPI: Waking up from system sleep state S3
juin 08 11:23:17 localhost kernel: ehci-pci 0000:00:1a.0: System wakeup disabled by ACPI
juin 08 11:23:17 localhost kernel: xhci_hcd 0000:03:00.0: System wakeup disabled by ACPI
juin 08 11:23:17 localhost kernel: xhci_hcd 0000:04:00.0: System wakeup disabled by ACPI
juin 08 11:23:17 localhost kernel: PM: noirq resume of devices complete after 87.882 msecs
juin 08 11:23:17 localhost kernel: PM: early resume of devices complete after 0.146 msecs
juin 08 11:23:17 localhost kernel: ahci 0000:00:1f.2: setting latency timer to 64
juin 08 11:23:17 localhost kernel: ehci-pci 0000:00:1a.0: setting latency timer to 64
juin 08 11:23:17 localhost kernel: mei 0000:00:16.0: irq 52 for MSI/MSI-X
juin 08 11:23:17 localhost kernel: ehci-pci 0000:00:1d.0: setting latency timer to 64
juin 08 11:23:17 localhost kernel: pci 0000:05:00.0: setting latency timer to 64
juin 08 11:23:17 localhost kernel: snd_hda_intel 0000:01:00.1: irq 53 for MSI/MSI-X
juin 08 11:23:17 localhost kernel: <6>[fglrx] Power up the ASIC
juin 08 11:23:17 localhost kernel: <6>[fglrx] Preparing resume fglrx in kernel.
juin 08 11:23:17 localhost kernel: <6>[fglrx] Resuming fglrx in kernel completed.
juin 08 11:23:17 localhost kernel: <6>[fglrx] IRQ 54 Enabled
juin 08 11:23:17 localhost kernel: usb 6-1.5: reset high-speed USB device number 4 using ehci-pci
juin 08 11:23:17 localhost kernel: ata5: SATA link down (SStatus 0 SControl 300)
juin 08 11:23:17 localhost kernel: ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
juin 08 11:23:17 localhost kernel: ACPI Error: [DSSP] Namespace lookup failure, AE_NOT_FOUND (20130117/psargs-359)
juin 08 11:23:17 localhost kernel: ACPI Error: Method parse/execution failed [\_SB_.PCI0.SAT0.SPT2._GTF] (Node ffff880118c9fa50), AE_NOT_FOUND (20130117/psparse-537)
juin 08 11:23:17 localhost kernel: ACPI Error: [DSSP] Namespace lookup failure, AE_NOT_FOUND (20130117/psargs-359)
juin 08 11:23:17 localhost kernel: ACPI Error: Method parse/execution failed [\_SB_.PCI0.SAT0.SPT2._GTF] (Node ffff880118c9fa50), AE_NOT_FOUND (20130117/psparse-537)
juin 08 11:23:17 localhost kernel: ata3.00: configured for UDMA/100
juin 08 11:23:17 localhost kernel: ata6: SATA link down (SStatus 0 SControl 300)
juin 08 11:23:17 localhost kernel: ata4: SATA link down (SStatus 0 SControl 300)
juin 08 11:23:17 localhost kernel: ata2: link is slow to respond, please be patient (ready=0)
juin 08 11:23:17 localhost kernel: ata1: link is slow to respond, please be patient (ready=0)
juin 08 11:23:17 localhost kernel: usb 6-1.5: ath9k_htc: Transferred FW: htc_9271.fw, size: 51272
juin 08 11:23:17 localhost kernel: ath9k_htc 6-1.5:1.0: ath9k_htc: HTC initialized with 33 credits
juin 08 11:23:17 localhost kernel: ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
juin 08 11:23:17 localhost kernel: ACPI Error: [DSSP] Namespace lookup failure, AE_NOT_FOUND (20130117/psargs-359)
juin 08 11:23:17 localhost kernel: ACPI Error: Method parse/execution failed [\_SB_.PCI0.SAT0.SPT0._GTF] (Node ffff880118c9f960), AE_NOT_FOUND (20130117/psparse-537)
juin 08 11:23:17 localhost kernel: ACPI Error: [DSSP] Namespace lookup failure, AE_NOT_FOUND (20130117/psargs-359)
juin 08 11:23:17 localhost kernel: ACPI Error: Method parse/execution failed [\_SB_.PCI0.SAT0.SPT0._GTF] (Node ffff880118c9f960), AE_NOT_FOUND (20130117/psparse-537)
juin 08 11:23:17 localhost kernel: ata1.00: configured for UDMA/133
juin 08 11:23:17 localhost kernel: sd 0:0:0:0: [sda] Starting disk
juin 08 11:23:17 localhost kernel: ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
juin 08 11:23:17 localhost kernel: ACPI Error: [DSSP] Namespace lookup failure, AE_NOT_FOUND (20130117/psargs-359)
juin 08 11:23:17 localhost kernel: ACPI Error: Method parse/execution failed [\_SB_.PCI0.SAT0.SPT1._GTF] (Node ffff880118c9f9d8), AE_NOT_FOUND (20130117/psparse-537)
juin 08 11:23:17 localhost kernel: ACPI Error: [DSSP] Namespace lookup failure, AE_NOT_FOUND (20130117/psargs-359)
juin 08 11:23:17 localhost kernel: ACPI Error: Method parse/execution failed [\_SB_.PCI0.SAT0.SPT1._GTF] (Node ffff880118c9f9d8), AE_NOT_FOUND (20130117/psparse-537)
juin 08 11:23:17 localhost kernel: ata2.00: configured for UDMA/133
juin 08 11:23:17 localhost kernel: sd 1:0:0:0: [sdb] Starting disk
juin 08 11:23:17 localhost kernel: PM: resume of devices complete after 6777.499 msecs
juin 08 11:23:17 localhost kernel: PM: Finishing wakeup.
juin 08 11:23:17 localhost kernel: Restarting tasks ... done.
juin 08 11:23:17 localhost systemd[1]: Started Suspend.
juin 08 11:23:17 localhost systemd[1]: Service sleep.target is not needed anymore. Stopping.
juin 08 11:23:17 localhost systemd[1]: Stopping Sleep.
juin 08 11:23:17 localhost systemd[1]: Stopped target Sleep.
juin 08 11:23:17 localhost systemd[1]: Service netctl-sleep.service is not needed anymore. Stopping.
juin 08 11:23:17 localhost systemd[1]: Stopping netctl sleep hook...
juin 08 11:23:17 localhost systemd[1]: Starting Suspend.
juin 08 11:23:17 localhost systemd[1]: Reached target Suspend.
juin 08 11:23:17 localhost systemd-logind[430]: Operation finished.
juin 08 11:23:17 localhost systemd[1]: Starting A simple WPA encrypted wireless connection...
juin 08 11:23:20 localhost network[4573]: Starting network profile 'wifi0'...
juin 08 11:23:27 localhost kernel: wifi0: authenticate with FF:FF:FF:FF:FF:FF
juin 08 11:23:27 localhost kernel: wifi0: send auth to FF:FF:FF:FF:FF:FF (try 1/3)
juin 08 11:23:31 localhost kernel: wifi0: send auth to FF:FF:FF:FF:FF:FF (try 2/3)
juin 08 11:23:32 localhost kernel: wifi0: deauthenticating from FF:FF:FF:FF:FF:FF by local choice (reason=3)
juin 08 11:23:34 localhost kernel: wifi0: authenticate with FF:FF:FF:FF:FF:FF
juin 08 11:23:34 localhost kernel: wifi0: send auth to FF:FF:FF:FF:FF:FF (try 1/3)
juin 08 11:23:36 localhost network[4573]: WPA association/authentication failed for interface 'wifi0'
juin 08 11:23:36 localhost kernel: wifi0: deauthenticating from FF:FF:FF:FF:FF:FF by local choice (reason=3)
juin 08 11:23:36 localhost network[4573]: Failed to bring the network up for profile 'wifi0'
juin 08 11:23:36 localhost systemd[1]: netctl@wifi0.service: main process exited, code=exited, status=1/FAILURE
juin 08 11:23:36 localhost systemd[1]: Failed to start A simple WPA encrypted wireless connection.
juin 08 11:23:36 localhost systemd[1]: Unit netctl@wifi0.service entered failed state.
juin 08 11:23:36 localhost netctl[4568]: Job for netctl@wifi0.service failed. See 'systemctl status netctl@wifi0.service' and 'journalctl -xn' for details.
juin 08 11:23:36 localhost systemd[1]: Stopped netctl sleep hook.
Je vois qu'un certain usb 6-1.5 USB device number 4 apparait, et il correspond au fameux périphérique, soit la clé USB WiFi :

Code : Tout sélectionner

Bus 006 Device 004: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
Je suis désolé pour ce message à rallonge, mais cela fait déjà longtemps que je tente de résoudre ce problème par moi-même et je bute, car je n'arrive pas à savoir qui est le fautif dans l'histoire. Systemd, netctl, wpa_supplicant, le périphérique, le pilote (noyau Linux 3.9)... ?

Merci d'avance. :)

Re: [WiFi] Pas de WiFi après sortie de veille

Publié : sam. 08 juin 2013, 11:50
par benjarobin
Et arrive tu as te connecter en relançant le service de connexion ?

Re: [WiFi] Pas de WiFi après sortie de veille

Publié : sam. 08 juin 2013, 12:06
par Xorg
Merci pour ta réponse si rapide. :D

Si par relancer le service de connexion tu entends cette commande :

Code : Tout sélectionner

# systemctl restart netctl@wifi0.service
Job for netctl@wifi0.service failed. See 'systemctl status netctl@wifi0.service' and 'journalctl -xn' for details.

Code : Tout sélectionner

% systemctl status netctl@wifi0.service
netctl@wifi0.service - A simple WPA encrypted wireless connection
   Loaded: loaded (/etc/systemd/system/netctl@wifi0.service; enabled)
   Active: failed (Result: exit-code) since sam. 2013-06-08 11:54:28 CEST; 1min 33s ago
     Docs: man:netctl.profile(5)
  Process: 22492 ExecStop=/usr/lib/network/network stop %I (code=exited, status=0/SUCCESS)
  Process: 23513 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)

juin 08 11:54:10 localhost systemd[1]: Starting A simple WPA encrypted wireless connection...
juin 08 11:54:13 localhost network[23513]: Starting network profile 'wifi0'...
juin 08 11:54:28 localhost network[23513]: WPA association/authentication failed for interface 'wifi0'
juin 08 11:54:28 localhost network[23513]: Failed to bring the network up for profile 'wifi0'
juin 08 11:54:28 localhost systemd[1]: netctl@wifi0.service: main process exited, code=exited, status=1/FAILURE
juin 08 11:54:28 localhost systemd[1]: Failed to start A simple WPA encrypted wireless connection.
juin 08 11:54:28 localhost systemd[1]: Unit netctl@wifi0.service entered failed state.

Code : Tout sélectionner

% journalctl -xn
-- Logs begin at dim. 2013-06-02 11:12:26 CEST, end at sam. 2013-06-08 11:55:38 CEST. --
juin 08 11:54:28 localhost kernel: wifi0: deauthenticating from FF:FF:FF:FF:FF:FF by local choice (reason=3)
juin 08 11:54:28 localhost network[23513]: Failed to bring the network up for profile 'wifi0'
juin 08 11:54:28 localhost systemd[1]: netctl@wifi0.service: main process exited, code=exited, status=1/FAILURE
juin 08 11:54:28 localhost systemd[1]: Failed to start A simple WPA encrypted wireless connection.
-- Subject: Unit netctl@wifi0.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
-- 
-- Unit netctl@wifi0.service has failed.
-- 
-- The result is failed.
juin 08 11:54:28 localhost systemd[1]: Unit netctl@wifi0.service entered failed state.
juin 08 11:55:33 localhost kernel: usb 6-1.1: reset full-speed USB device number 3 using ehci-pci
Comme tu le constates, ça ne fonctionne pas.

J'ai débranché et rebranché la clé USB WiFi et refait ceci, et :

Code : Tout sélectionner

% systemctl status netctl@wifi0.service      
netctl@wifi0.service - A simple WPA encrypted wireless connection
   Loaded: loaded (/etc/systemd/system/netctl@wifi0.service; enabled)
   Active: active (exited) since sam. 2013-06-08 11:57:11 CEST; 4min 39s ago
     Docs: man:netctl.profile(5)
  Process: 22492 ExecStop=/usr/lib/network/network stop %I (code=exited, status=0/SUCCESS)
  Process: 25804 ExecStart=/usr/lib/network/network start %I (code=exited, status=0/SUCCESS)
   CGroup: name=systemd:/system/netctl@.service/netctl@wifi0.service
           └─25844 wpa_supplicant -B -P /run/wpa_supplicant_wifi0.pid -i wifi0 -D nl80211,wext -c/run/network/wpa_supplicant_wifi0.conf

juin 08 11:57:06 localhost systemd[1]: Starting A simple WPA encrypted wireless connection...
juin 08 11:57:09 localhost network[25804]: Starting network profile 'wifi0'...
juin 08 11:57:11 localhost network[25804]: Started network profile 'wifi0'
juin 08 11:57:11 localhost systemd[1]: Started A simple WPA encrypted wireless connection.

Code : Tout sélectionner

% journalctl -xn                             
-- Logs begin at dim. 2013-06-02 11:12:26 CEST, end at sam. 2013-06-08 11:57:11 CEST. --
juin 08 11:57:09 localhost network[25804]: Starting network profile 'wifi0'...
juin 08 11:57:10 localhost kernel: wifi0: authenticate with FF:FF:FF:FF:FF:FF
juin 08 11:57:10 localhost kernel: wifi0: send auth to FF:FF:FF:FF:FF:FF (try 1/3)
juin 08 11:57:10 localhost kernel: wifi0: authenticated
juin 08 11:57:10 localhost kernel: wifi0: associate with FF:FF:FF:FF:FF:FF (try 1/3)
juin 08 11:57:10 localhost kernel: wifi0: RX AssocResp from FF:FF:FF:FF:FF:FF (capab=0x411 status=0 aid=1)
juin 08 11:57:10 localhost kernel: wifi0: associated
juin 08 11:57:11 localhost network[25804]: Started network profile 'wifi0'
juin 08 11:57:11 localhost systemd[1]: Started A simple WPA encrypted wireless connection.
-- Subject: Unit netctl@wifi0.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit netctl@wifi0.service has finished starting up.
-- 
-- The start-up result is done.
Et ça fonctionne. En gros, quelque chose empêche le périphérique de fonctionner après la sortie de veille, il faut physiquement le débrancher pour utiliser de nouveau la connexion. Mais justement, j'ignore quoi. :?

Re: [WiFi] Pas de WiFi après sortie de veille

Publié : sam. 08 juin 2013, 13:42
par benjarobin
Je pense que tu peux contourner le souci en rechargeant le module kernel dédié à ta carte Wifi.
Bien sûr à tester à la main, puis on verra pour l'automatisation

Re: [WiFi] Pas de WiFi après sortie de veille

Publié : sam. 08 juin 2013, 15:17
par falke
juste une question :

Je vois que tu as installé le service.

Chez moi ça marche avec netctl lancé non pas manuellement mais en tant que service avec netctl_auto@<if>.service

Ne pourrais tu pas essayer de lancer ta connection en tant que service ?

Dans ce cas faudrait laisser ta clé branchée en permanence ..

Re: [WiFi] Pas de WiFi après sortie de veille

Publié : sam. 08 juin 2013, 15:26
par Xorg
benjarobin a écrit :Je pense que tu peux contourner le souci en rechargeant le module kernel dédié à ta carte Wifi.
Effectivement, en rechargeant le module, là ça fonctionne ! :D
J'ai édité le service /usr/lib/systemd/system/netctl-sleep.service (est-ce mal ?) comme ceci :

Code : Tout sélectionner

[Unit]
Description=netctl sleep hook
Before=sleep.target
StopWhenUnneeded=yes

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/netctl store
ExecStart=-/usr/bin/netctl stop-all
ExecStartPost=/usr/bin/modprobe -r ath9k_htc
ExecStop=/usr/bin/modprobe ath9k_htc
ExecStop=/usr/bin/netctl restore

[Install]
WantedBy=sleep.target
En gros, lors de la mise en veille, il sauvegarde les profils actifs, puis il les arrête, et enfin il décharge le module ath9k_htc (ainsi que ses dépendances).
Lors de la sortie de veille, le module ath9k_htc est rechargé avec ses dépendances, puis les profils sont restaurés.

Super, ça marche sans problèmes maintenant, mais je me pose quand même une question : pourquoi faut-il recharger le module ? Qu'est-ce qui peut poser problème ? :?
Merci beaucoup pour ton aide, je ne pensais pas que le problème était si "simple" et serait réglé si rapidement.
falke a écrit :juste une question :

as tu installé le service qui permet de récupérer une connection après une mise en veille ?

systemctl enable netctl-sleep.service
Oui, dans la masse du premier message, j'avais écris :
Xorg a écrit :[...]
De plus, comme l'indique le Wiki français, j'ai activé netctl-sleep.service :

Code : Tout sélectionner

% systemctl status netctl-sleep.service
netctl-sleep.service - netctl sleep hook
   Loaded: loaded (/usr/lib/systemd/system/netctl-sleep.service; enabled)
   Active: inactive (dead)

juin 07 22:25:24 localhost systemd[1]: Starting netctl sleep hook...
juin 07 22:25:24 localhost systemd[1]: Started netctl sleep hook.
juin 08 00:21:05 localhost systemd[1]: Service netctl-sleep.service is not needed anymore. Stopping.
juin 08 00:21:05 localhost systemd[1]: Stopping netctl sleep hook...
juin 08 00:21:05 localhost systemd[1]: Stopped netctl sleep hook.
juin 08 00:36:52 localhost systemd[1]: Starting netctl sleep hook...
juin 08 00:36:55 localhost systemd[1]: Started netctl sleep hook.
juin 08 00:57:52 localhost systemd[1]: Service netctl-sleep.service is not needed anymore. Stopping.
juin 08 00:57:52 localhost systemd[1]: Stopping netctl sleep hook...
juin 08 00:58:01 localhost systemd[1]: Stopped netctl sleep hook.
[...]
Mais bien vu quand même. :)

Re: [WiFi] Pas de WiFi après sortie de veille (Résolu)

Publié : sam. 08 juin 2013, 15:35
par falke
oui j'ai vu ça après et j'ai de suite édité mon message. Mais pourquoi n'utilises tu pas le service netctl-auto ?

Je pense que ça résoudrait peut-être ton souci de manière propre.

Re: [WiFi] Pas de WiFi après sortie de veille (Résolu)

Publié : sam. 08 juin 2013, 15:37
par Xorg
J'ai essayé hier, mais c'était pareil pendant mes tests. :?

Re: [WiFi] Pas de WiFi après sortie de veille (Résolu)

Publié : sam. 08 juin 2013, 17:36
par benjarobin
Ceci est une solution tout à fait propre. Le problème n'est pas lié au service / connexion mais au module. Il n'y a pas d'autre moyen de le réglé à part regarder du coté du code de ce module...

Sinon ne jamais éditer quelque chose dans /usr, tout ce qui est dans ce dossier devrait même être en lecture seule. Tes modifications seront écrasées à la prochaine mise à jour.
Donc tu dois impérativement faire :

Code : Tout sélectionner

systemctl disable netctl-sleep.service
cp /usr/lib/systemd/system/netctl-sleep.service /etc/systemd/system/netctl-sleep.service
systemctl enable netctl-sleep.service

Re: [WiFi] Pas de WiFi après sortie de veille (Résolu)

Publié : sam. 08 juin 2013, 18:41
par Xorg
Ah voilà, c'est bien pour cela que je pensais que c'était mal. C'est corrigé. :P

Question débile, mais monter le /usr en lecture seule peut-il s'avérer être une bonne idée ? Bien que je sois conscient que pour installer des paquets il faut le remonter en rw.