[systemd-networkd] eth0 OK mais pas de wifi [résolu]

Applications, problèmes de configuration réseau
Avatar de l’utilisateur
jeViens2Debian
Hankyu
Messages : 45
Inscription : mer. 05 mai 2021, 19:51

[systemd-networkd] eth0 OK mais pas de wifi [résolu]

Message par jeViens2Debian »

Bonjour,
À l'installation, j'ai réussi à me connecter avec le wifi jusqu'à l'étape figer sa configuration. J'ai choisi systemd-networkd. Ça fonctionne en filaire mais pas en Wifi.
Voici la sortie de journalctl -b | grep -iE "network|dhcp"

Code : Tout sélectionner

[code]mai 09 20:22:41 isis kernel: drop_monitor: Initializing network drop monitor service
mai 09 20:22:41 isis systemd[1]: Listening on Network Service Netlink Socket.
mai 09 20:22:42 isis systemd[1]: Reached target Network (Pre).
mai 09 20:22:42 isis systemd[1]: Starting Network Service...
mai 09 20:22:42 isis systemd-networkd[337]: Enumeration completed
mai 09 20:22:42 isis systemd-networkd[337]: enp1s0: Interface name change detected, enp1s0 has been renamed to eth0.
mai 09 20:22:42 isis systemd[1]: Started Network Service.
mai 09 20:22:42 isis audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-networkd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mai 09 20:22:42 isis systemd[1]: Starting Network Name Resolution...
mai 09 20:22:42 isis systemd-networkd[337]: eth0: Interface name change detected, eth0 has been renamed to enp1s0.
mai 09 20:22:42 isis systemd-networkd[337]: enp1s0: Link UP
mai 09 20:22:42 isis systemd-networkd[337]: wlan0: Interface name change detected, wlan0 has been renamed to wlp2s0.
mai 09 20:22:42 isis systemd[1]: Found device QCA9377 802.11ac Wireless Network Adapter (Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter).
mai 09 20:22:43 isis systemd-networkd[337]: wlp2s0: Link UP
mai 09 20:22:43 isis systemd[1]: Started Network Name Resolution.
mai 09 20:22:43 isis systemd[1]: Reached target Network.
mai 09 20:22:43 isis systemd[1]: Reached target Host and Network Name Lookups.
mai 09 20:22:44 isis systemd[385]: Listening on GnuPG network certificate management daemon.
mai 09 20:22:45 isis systemd-networkd[337]: enp1s0: Gained carrier
mai 09 20:22:45 isis systemd-networkd[337]: enp1s0: DHCPv4 address 192.168.1.39/24 via 192.168.1.1
mai 09 20:22:45 isis dbus-daemon[312]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.2' (uid=980 pid=337 comm="/usr/lib/systemd/systemd-networkd ")
mai 09 20:22:47 isis systemd-networkd[337]: enp1s0: Gained IPv6LL
mai 09 20:23:03 isis systemd[422]: Listening on GnuPG network certificate management daemon.
mai 09 20:23:04 isis ksmserver[522]: Qt: Session management error: networkIdsList argument is NULL
mai 09 20:23:13 isis systemd[385]: Closed GnuPG network certificate management daemon.
mai 09 20:23:48 isis systemd-networkd[337]: enp1s0: Lost carrier
mai 09 20:23:48 isis dbus-daemon[312]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.2' (uid=980 pid=337 comm="/usr/lib/systemd/systemd-networkd ")
mai 09 20:23:48 isis systemd-networkd[337]: enp1s0: DHCP lease lost
mai 09 20:23:48 isis systemd-networkd[337]: enp1s0: DHCPv6 lease lost
mai 09 20:24:10 isis systemd-networkd[337]: enp1s0: Gained carrier
mai 09 20:24:10 isis systemd-networkd[337]: enp1s0: DHCPv4 address 192.168.1.39/24 via 192.168.1.1
mai 09 20:24:15 isis systemd-networkd[337]: enp1s0: Lost carrier
mai 09 20:24:15 isis systemd-networkd[337]: enp1s0: DHCP lease lost
mai 09 20:24:15 isis systemd-networkd[337]: enp1s0: DHCPv6 lease lost
mai 09 20:24:19 isis systemd-networkd[337]: enp1s0: Gained carrier
mai 09 20:24:19 isis systemd-networkd[337]: enp1s0: DHCPv4 address 192.168.1.39/24 via 192.168.1.1
systemctl list-unit-files --state=enabled

Code : Tout sélectionner

UNIT FILE                            STATE   VENDOR PRESET
getty@.service                       enabled enabled
iptables.service                     enabled disabled
sddm.service                         enabled disabled
systemd-networkd-wait-online.service enabled disabled
systemd-networkd.service             enabled enabled
systemd-resolved.service             enabled enabled 	
systemd-networkd.socket              enabled disabled
remote-fs.target                     enabled enabled

8 unit files listed.
les deux lignes : systemd-resolved.service et systemd-networkd.socket sont grisées alors que les autres sont colorées ?

systemctl list-units --state=running

Code : Tout sélectionner

 UNIT                            LOAD   ACTIVE SUB     DESCRIPTION
  init.scope                      loaded active running System and Service Manager
  session-2.scope                 loaded active running Session 2 of user pierre
  session-4.scope                 loaded active running Session 4 of user pierre
  dbus.service                    loaded active running D-Bus System Message Bus
  getty@tty2.service              loaded active running Getty on tty2
  polkit.service                  loaded active running Authorization Manager
  rtkit-daemon.service            loaded active running RealtimeKit Scheduling Policy Service
  sddm.service                    loaded active running Simple Desktop Display Manager
  systemd-journald.service        loaded active running Journal Service
  systemd-logind.service          loaded active running User Login Management
  systemd-networkd.service        loaded active running Network Service
  systemd-resolved.service        loaded active running Network Name Resolution
  systemd-udevd.service           loaded active running Rule-based Manager for Device Events and Files
  udisks2.service                 loaded active running Disk Manager
  upower.service                  loaded active running Daemon for power management
  user@1000.service               loaded active running User Manager for UID 1000
  wpa_supplicant@wlp2s0.service   loaded active running WPA supplicant daemon (interface-specific version)
  dbus.socket                     loaded active running D-Bus System Message Bus Socket
  systemd-journald-audit.socket   loaded active running Journal Audit Socket
  systemd-journald-dev-log.socket loaded active running Journal Socket (/dev/log)
  systemd-journald.socket         loaded active running Journal Socket
  systemd-networkd.socket         loaded active running Network Service Netlink Socket
  systemd-udevd-control.socket    loaded active running udev Control Socket
  systemd-udevd-kernel.socket     loaded active running udev Kernel Socket

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
24 loaded units listed.
grep -r /etc/systemd/network/

Code : Tout sélectionner

wlp2s0.network:[Match]
wlp2s0.network:Name=wlp2s0
wlp2s0.network:[Network]
wlp2s0.network:DHCP=yes
wlp2s0.network:[DHCP]
wlp2s0.network:RouteMetric=20
enp1s0.network:[Match]
enp1s0.network:Name=enp1s0
enp1s0.network:[Network]
enp1s0.network:DHCP=yes
enp1s0.network:[DHCP]
enp1s0.network:RouteMetric=10

wpa_supplicant-wlp2s0.conf

Code : Tout sélectionner

ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1
fast_reauth=1
# reading passphrase from stdin
network={
	ssid="ESSID"
	#psk="ma_clef_wifi"
	psk=ae8dba8ad##########################################

Merci pour votre aide et un grand merci à l'équipe pour les explications sur l'installation, j'ai maintenant un beau bureau plasma/KDE :bravo:
Dernière modification par jeViens2Debian le mar. 11 mai 2021, 23:00, modifié 1 fois.
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17186
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [systemd-networkd] eth0 OK mais pas de wifi

Message par benjarobin »

Bonjour, Pour y voir plus clair, peux tu donner l'intégralité du log de boot (via pastebin par exemple) ?
Zsh | KDE | PC fixe : core i7, carte nvidia
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Avatar de l’utilisateur
jeViens2Debian
Hankyu
Messages : 45
Inscription : mer. 05 mai 2021, 19:51

Re: [systemd-networkd] eth0 OK mais pas de wifi

Message par jeViens2Debian »

journalctl --boot -o verbose -x
https://paste.ubuntu.com/p/srVKN3dDty/
Avatar de l’utilisateur
jeViens2Debian
Hankyu
Messages : 45
Inscription : mer. 05 mai 2021, 19:51

Re: [systemd-networkd] eth0 OK mais pas de wifi

Message par jeViens2Debian »

ce que je lis sur le sujet semble pencher vers l'arrêt de systemd-networkd pour utiliser network manager. Comment on fait ça proprement ?
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17186
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [systemd-networkd] eth0 OK mais pas de wifi

Message par benjarobin »

C'est sûr que comme tu utilises KDE, je recommanderais l'utilisation de network manager (bien plus simple et ergonomique pour se connecter à un Wifi).
Installe d'abord network manager et les paquets nécessaire pour KDE (si tu ne les a pas déjà).
Il suffit de désactiver et arrêter les service systemd-networkd, wpa, ou tout autre service réseau actif.
Et finalement activer et démarrer le service de network manager.

Sinon depuis le début je me pose la question si ton fichier "wpa_supplicant-wlp2s0.conf" était valide, en effet il manque une } a la fin.
De plus wpa_supplicant n'essaye même pas de se connecter à ton réseau Wifi. Avais tu aussi changé ESSID pour le nom de ton Wifi ?

Bref, si tu comptes utiliser network manager, tu peux supprimer wpa_supplicant-wlp2s0.conf
Zsh | KDE | PC fixe : core i7, carte nvidia
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Avatar de l’utilisateur
jeViens2Debian
Hankyu
Messages : 45
Inscription : mer. 05 mai 2021, 19:51

Re: [systemd-networkd] eth0 OK mais pas de wifi (solution)

Message par jeViens2Debian »

Avais tu aussi changé ESSID pour le nom de ton Wifi
:oops: non, je n'avais pas compris le sens de
wpa_passphrase ESSID >> /etc/wpa_supplicant/wpa_supplicant-IF0.conf
dans le tutoriel

Donc si je garde systemd-networkd quand je veux me connecter à un réseau wifi, je dois faire
# iw wlp2s0 scan
#wpa_passphrase NOM_DU_RESEAU CLE_WIFI >> /etc/wpa_supplicant/wpa_supplicant-wlp2s0.conf
  1. Je ne crée pas un nouveau fichier wpa_supplicant-wlp2s0 ?
  2. Est ce que je dois recharger systemd-networkd.service et redémarrer wpa_supplicant@wlp2s0 avec

#systemctl reload systemd-networkd.service
#systemctl try-restart wpa_supplicant@wlp2s0
?

En tout cas merci de ton aide, j'espère que je pourrais rendre la pareille à d'autres utilisateurs. :marche:
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17186
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [systemd-networkd] eth0 OK mais pas de wifi [résolu]

Message par benjarobin »

Tu dois supprimer au préalable les lignes, dans wpa_supplicant-wlp2s0.conf, qui avait été ajouté par wpa_passphrase
Puis en effet lancer wpa_passphrase tel qu'indiqué dans le Wiki.
Puis tu devra juste faire un restart de wpa_supplicant@wlp2s0
Zsh | KDE | PC fixe : core i7, carte nvidia
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Répondre