wi-fi не работает без подключения провода Ethernet

Автор Pe4eneg, 29 декабря 2020, 12:56:36

« назад - далее »

0 Пользователи и 1 гость просматривают эту тему.

Pe4eneg

Здравствуйте, уважаемые! Проблема такова: система Debian10 (Linux homeserver 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux), есть сетевая карта и  usb-свисток TP-link TL-WDN3200. Все драйвера и прошивки, включая non-free установлены. Оборудование системой определяется, ip (разные, естественно) снаружи пингуются. Но, при отключении кабеля падает и wifi соединение.
lshw -c network
*-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: enp3s0
       version: 09
       serial: bc:ee:7b:74:3e:22
       size: 1Gbit/s
       capacity: 1Gbit/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 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=full firmware=rtl8168f-1_0.0.5 06/18/12 ip=192.168.1.100 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
       resources: irq:16 ioport:e000(size=256) memory:f0004000-f0004fff memory:f0000000-f0003fff
  *-network
       description: Wireless interface
       physical id: 2
       bus info: usb@1:1.2
       logical name: wlxc04a002132a8
       serial: c0:4a:00:21:32:a8
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=rt2800usb driverversion=4.19.0-13-amd64 firmware=0.36 ip=192.168.1.101 link=no multicast=yes wireless=IEEE 802.11
[свернуть]
lsusb
Bus 003 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 148f:5572 Ralink Technology, Corp. RT5572 Wireless Adapter
Bus 001 Device 003: ID c0f4:01e0
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[свернуть]
При этом
systemctl status networking.service
networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-12-29 12:33:40 MSK; 34s ago
     Docs: man:interfaces(5)
  Process: 876 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Main PID: 876 (code=exited, status=1/FAILURE)

дек 29 12:33:35 homeserver systemd[1]: Starting Raise network interfaces...
дек 29 12:33:35 homeserver wpa_supplicant[898]: Successfully initialized wpa_supplicant
дек 29 12:33:40 homeserver ifup[876]: /etc/network/if-pre-up.d/wpasupplicant: 120: /etc/network/if-pre-up.d/wpasupplicant: cannot create /dev/stderr: No such device or address
дек 29 12:33:40 homeserver ifup[876]: run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
дек 29 12:33:40 homeserver ifup[876]: ifup: failed to bring up wlxc04a002132a8
дек 29 12:33:40 homeserver systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
дек 29 12:33:40 homeserver wpa_supplicant[899]: nl80211: deinit ifname=wlxc04a002132a8 disabled_11b_rates=0
дек 29 12:33:40 homeserver wpa_supplicant[899]: wlxc04a002132a8: CTRL-EVENT-TERMINATING
дек 29 12:33:40 homeserver systemd[1]: networking.service: Failed with result 'exit-code'.
дек 29 12:33:40 homeserver systemd[1]: Failed to start Raise network interfaces.
[свернуть]
и
journalctl -u networking.service
дек 29 12:33:35 homeserver systemd[1]: Starting Raise network interfaces...
дек 29 12:33:35 homeserver wpa_supplicant[898]: Successfully initialized wpa_supplicant
дек 29 12:33:40 homeserver ifup[876]: /etc/network/if-pre-up.d/wpasupplicant: 120: /etc/network/if-pre-up.d/wpasupplicant: cannot create /dev/stderr: No such device or address
дек 29 12:33:40 homeserver ifup[876]: run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
дек 29 12:33:40 homeserver ifup[876]: ifup: failed to bring up wlxc04a002132a8
дек 29 12:33:40 homeserver systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
дек 29 12:33:40 homeserver wpa_supplicant[899]: nl80211: deinit ifname=wlxc04a002132a8 disabled_11b_rates=0
дек 29 12:33:40 homeserver wpa_supplicant[899]: wlxc04a002132a8: CTRL-EVENT-TERMINATING
дек 29 12:33:40 homeserver systemd[1]: networking.service: Failed with result 'exit-code'.
дек 29 12:33:40 homeserver systemd[1]: Failed to start Raise network interfaces.
[свернуть]
/etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

#wifi
auto wlxc04a002132a8
#allow-hotplug wlxc04a002132a8
iface wlxc04a002132a8 inet static
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
# wpa-ssid *********
# wpa-psk *********
# wpa-psk ********************************

# The primary network interface
allow-hotplug enp3s0
#auto enp3s0
allow-hotplug enp3s0
iface enp3s0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1
[свернуть]
/etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant GROUP=wheel
update_config=1

network={
        ssid="********"
        key_mgmt=WPA-PSK
        proto=WPA
        pairwise=TKIP
        group=TKIP
        psk="*******"
}
[свернуть]

Третий день копаю гугл, никак не могу найти правильный ответ. Уже думаю бросить это занятие, но хочу принципиально понять суть проблемы. К сожалению, своих знаний не хватает, нужны подсказки.



gardarea51


Pe4eneg

#2
gardarea51, там два каких-то скрипта, которые для меня как китайская грамота
wireless-tools
#!/bin/sh

IWCONFIG=/sbin/iwconfig

if [ ! -x $IWCONFIG ]; then
  exit 0
fi

# check if this is a 802.11 device we're supposed to be effecting
case "${IF_WIRELESS:-enable}" in
        wireless-tools|iwconfig)
                # *we* and not some other 802.11 tool should be used
        ;;
        true|yes|enable|1)
                # 802.11 should be used on this device, check for extensions
                $IWCONFIG $IFACE >/dev/null 2>&1 || exit 0
        ;;
        *)
                exit 0
        ;;
esac

# The wireless driver madness:
#
# - Some drivers want everything to be configured before bringing the interface up
# - Some drivers want everything to be configured after bringing the interface up
# - Some drivers want some parameters before, other parameters after bringing the interface up
#
# So, we try to set every parameter when the interface is still down,
# and remember which ones failed to be configured properly.
# If some failed, we bring the interface up, and try the failed ones again.

apply_settings()
{
        if [ -n "$IF_WIRELESS_SENS" ]; then
                $IWCONFIG "$IFACE" sens $IF_WIRELESS_SENS && IF_WIRELESS_SENS= || FAIL=true
        fi

        if [ -n "$IF_WIRELESS_MODE" ]; then
                $IWCONFIG "$IFACE" mode $IF_WIRELESS_MODE && IF_WIRELESS_MODE= || FAIL=true
        fi

        if [ -n "$IF_WIRELESS_AP" ]; then
                $IWCONFIG "$IFACE" ap $IF_WIRELESS_AP && IF_WIRELESS_AP= || FAIL=true
        fi

        if [ -n "$IF_WIRELESS_RATE" ]; then
                $IWCONFIG "$IFACE" rate $IF_WIRELESS_RATE && IF_WIRELESS_RATE= || FAIL=true
        fi

        if [ -n "$IF_WIRELESS_RTS" ]; then
                $IWCONFIG "$IFACE" rts $IF_WIRELESS_RTS && IF_WIRELESS_RTS= || FAIL=true
        fi

        if [ -n "$IF_WIRELESS_FRAG" ]; then
                $IWCONFIG "$IFACE" frag $IF_WIRELESS_FRAG && IF_WIRELESS_FRAG= || FAIL=true
        fi

        if [ -n "$IF_WIRELESS_POWER" ]; then
                $IWCONFIG "$IFACE" power $IF_WIRELESS_POWER && IF_WIRELESS_POWER= || FAIL=true
        fi

        if [ -n "$IF_WIRELESS_POWERPERIOD" ]; then
                $IWCONFIG "$IFACE" power period $IF_WIRELESS_POWERPERIOD && IF_WIRELESS_POWERPERI$
        fi
[свернуть]
wpasupplicant
#!/bin/sh

#####################################################################
## Purpose
# This file is executed by ifupdown in pre-up, post-up, pre-down and
# post-down phases of network interface configuration. It allows
# ifup(8), and ifdown(8) to manage wpa_supplicant(8) and wpa_cli(8)
# processes running in daemon mode.
#
# /etc/wpa_supplicant/functions.sh is sourced by this file.
#
# This file is provided by the wpasupplicant package.

#####################################################################
# Copyright (C) 2006 - 2009 Debian/Ubuntu wpasupplicant Maintainers
# <pkg-wpa-devel@lists.alioth.debian.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# On Debian GNU/Linux systems, the text of the GPL license,
# version 2, can be found in /usr/share/common-licenses/GPL-2.

if [ -n "$IF_WPA_MAINT_DEBUG" ]; then
        set -x
fi

# quit if we're called for the loopback
if [ "$IFACE" = lo ]; then
        exit 0
fi

# allow wpa_supplicant interface to be specified via wpa-iface
# useful for starting wpa_supplicant on one interface of a bridge
if [ -n "$IF_WPA_IFACE" ]; then
        WPA_IFACE="$IF_WPA_IFACE"
else
        WPA_IFACE="$IFACE"
fi

# source functions
if [ -f /etc/wpa_supplicant/functions.sh ]; then
        . /etc/wpa_supplicant/functions.sh
else
        exit 0
fi

# quit if executables are not installed
if [ ! -x "$WPA_SUP_BIN" ] || [ ! -x "$WPA_CLI_BIN" ]; then
        exit 0
fi

do_start () {
        if test_wpa_cli; then
                # if wpa_action is active for this IFACE, do nothing
                ifupdown_locked && exit 0

                # if the administrator is calling ifup, say something useful
[свернуть]

Cообщение объединено 29 декабря 2020, 14:54:04

на всякий случай добавлю вывод команды ifup -a -v вдруг поможет:
Открыть содержимое (спойлер)
/bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant

ifup: configuring interface wlxc04a002132a8=wlxc04a002132a8 (inet)
/bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
wpa_supplicant: wpa-driver nl80211,wext (default)
wpa_supplicant: /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlxc04a002132a8.pid -i wlxc04a002132a8 -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf
Starting /sbin/wpa_supplicant...
wpa_supplicant: creating sendsigs omission pidfile: /run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlxc04a002132a8.pid
wpa_supplicant: waiting for "/var/run/wpa_supplicant/wlxc04a002132a8":  0 (max. 5)
wpa_supplicant: waiting for "/var/run/wpa_supplicant/wlxc04a002132a8":  1 (max. 5)
wpa_supplicant: waiting for "/var/run/wpa_supplicant/wlxc04a002132a8":  2 (max. 5)
wpa_supplicant: waiting for "/var/run/wpa_supplicant/wlxc04a002132a8":  3 (max. 5)
wpa_supplicant: waiting for "/var/run/wpa_supplicant/wlxc04a002132a8":  4 (max. 5)
wpa_supplicant: ctrl_interface socket not found at /var/run/wpa_supplicant/wlxc04a002132a8
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
ifup: failed to bring up wlxc04a002132a8
/bin/run-parts --exit-on-error --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/wpasupplicant
[свернуть]
Кстати, ip link set dev wlxc04a002132a8 up проходит, но ничего не меняет.

Cообщение объединено 29 декабря 2020, 18:26:43

Вопрос закрыт. Проблема решена путем скачивания всех недостающих драйверов и подсовывания их на этапе начальной настройки при переустановке системы. Извините за беспокойство.
ЗЫ Как же все сложно-то с линуксом...

gardarea51

Я уж читать, вникать начал было, пока не прочел концовку.
Хорошо, что заработало.