GalliumOS / galliumos-distro

Docs, issues, and artwork sources for GalliumOS
https://galliumos.org/
GNU General Public License v2.0
348 stars 11 forks source link

GalliumOS 3.0 - Stout - R8169 ethernet not working #526

Open francistheodorecatte opened 4 years ago

francistheodorecatte commented 4 years ago

The Lenovo X131e, it seems, is unlike most Chromebooks, as it has an ethernet port. I'm using MrChromebox firmware with the stock VPD header injected so the ethernet MAC is intact (same technique as preserving the MAC on Chromeboxes, as described on their wiki.)

Other than flashing MrChromebox's CoreBoot firmware, and upgrading to a 128GB SSD, the laptop is entirely stock.

I updated to the latest version of GalliumOS and the issue persisted. NetworkManager was reporting the device as unmanaged until I ran: sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf sudo systemctl restart network-manager

However, even after rebooting, NetworkManager doesn't detect hot plugs. I can occasionally get ethernet working by running dhclient manually, or having the ethernet cable plugged in at boot. For the most part, NetworkManager reports the ethernet connection as 'disconnected'. If I restart NetworkManager manually, it'll erroneously report the ethernet connection as... connected. Kinda maddening.

Is there anything I'm missing? I did a quick look and it doesn't seem like anyone else with a Lenovo X131e Chromebook has reported issues with the ethernet.

Relevant logs-- dmesg: [ 1.079880] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded [ 1.080843] r8169 0000:05:00.0 eth0: RTL8168evl/8111evl at 0x (ptrval), 2c:60:0c:29:17:9f, XID 0c900800 IRQ 25 [ 1.080847] r8169 0000:05:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko] [ 1.128527] r8169 0000:05:00.0 enp5s0: renamed from eth0 [ 35.545117] r8169 0000:05:00.0 enp5s0: link down

journalctl: Sep 19 12:13:29 stout NetworkManager[674]: <info> [1568909609.9159] guessed connection type (enp5s0) = 802-3-ethernet Sep 19 12:13:29 stout NetworkManager[674]: <info> [1568909609.9160] update_connection_setting_from_if_block: name:enp5s0, type:802-3-ethernet, id:Ifupdown (enp5s0), uuid: 324e1e08-9439-9860-88e0-b9f1ca6285ac Sep 19 12:13:29 stout NetworkManager[674]: <info> [1568909609.9169] adding enp5s0 to connections Sep 19 12:13:29 stout NetworkManager[674]: <info> [1568909609.9169] adding iface enp5s0 to eni_ifaces Sep 19 12:13:29 stout NetworkManager[674]: <info> [1568909609.9178] devices added (path: /sys/devices/pci0000:00/0000:00:1c.3/0000:05:00.0/net/enp5s0, iface: enp5s0) Sep 19 12:13:30 stout NetworkManager[674]: <info> [1568909610.0481] manager: (enp5s0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2) Sep 19 12:13:30 stout NetworkManager[674]: <info> [1568909610.0542] device (enp5s0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external') Sep 19 12:13:30 stout kernel: IPv6: ADDRCONF(NETDEV_UP): enp5s0: link is not ready Sep 19 12:13:30 stout kernel: r8169 0000:05:00.0 enp5s0: link down Sep 19 12:13:30 stout kernel: IPv6: ADDRCONF(NETDEV_UP): enp5s0: link is not ready

unwiredben commented 4 years ago

I can confirm the same problem on my just converted to GalliumOS X131e.

francistheodorecatte commented 4 years ago

Addendum to above, and a workaround:

If you run: sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf sudo systemctl restart network-manager

And then add an Ethernet connection for your ethernet adapter (enp5s0 in my case) under NetworkManager's connections editor, the ethernet port will work on a reboot. That's it, however. If you unplug the cable or try hotplugging it; it won't work. You'll have to reboot again.

Relevant boot logs for when the cable is plugged in on boot: Oct 10 18:34:29 stout NetworkManager[642]: <info> [1570746869.4094] manager: (enp5s0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2 Oct 10 18:34:29 stout NetworkManager[642]: <info> [1570746869.4144] device (enp5s0): state change: unmanaged -> unavailable (reason 'managed', sys-if Oct 10 18:34:29 stout NetworkManager[642]: <warn> [1570746869.6032] Error: failed to open /run/network/ifstate Oct 10 18:34:31 stout NetworkManager[642]: <info> [1570746871.7570] device (enp5s0): carrier: link connected Oct 10 18:34:31 stout NetworkManager[642]: <info> [1570746871.7610] device (enp5s0): state change: unavailable -> disconnected (reason 'carrier-chang Oct 10 18:34:31 stout NetworkManager[642]: <info> [1570746871.7628] policy: auto-activating connection 'Ethernet connection 1' Oct 10 18:34:31 stout NetworkManager[642]: <info> [1570746871.7658] device (enp5s0): Activation: starting connection 'Ethernet connection 1' (2a860a0 Oct 10 18:34:31 stout NetworkManager[642]: <info> [1570746871.7663] device (enp5s0): state change: disconnected -> prepare (reason 'none', sys-iface- Oct 10 18:34:31 stout NetworkManager[642]: <info> [1570746871.7667] manager: NetworkManager state is now CONNECTING Oct 10 18:34:31 stout NetworkManager[642]: <info> [1570746871.7676] device (enp5s0): state change: prepare -> config (reason 'none', sys-iface-state: Oct 10 18:34:31 stout NetworkManager[642]: <info> [1570746871.7684] device (enp5s0): state change: config -> ip-config (reason 'none', sys-iface-stat Oct 10 18:34:31 stout NetworkManager[642]: <info> [1570746871.7716] dhcp4 (enp5s0): activation: beginning transaction (timeout in 45 seconds) Oct 10 18:34:31 stout NetworkManager[642]: <info> [1570746871.7769] dhcp4 (enp5s0): dhclient started with pid 763 Oct 10 18:34:31 stout dhclient[763]: DHCPDISCOVER on enp5s0 to 255.255.255.255 port 67 interval 3 (xid=0xc280f342) Oct 10 18:34:32 stout dhclient[763]: DHCPREQUEST of 192.168.0.161 on enp5s0 to 255.255.255.255 port 67 (xid=0x42f380c2) Oct 10 18:34:32 stout dhclient[763]: DHCPOFFER of 192.168.0.161 from 192.168.0.1 Oct 10 18:34:32 stout dhclient[763]: DHCPACK of 192.168.0.161 from 192.168.0.1 Oct 10 18:34:32 stout NetworkManager[642]: <info> [1570746872.8520] dhcp4 (enp5s0): address 192.168.0.161 Oct 10 18:34:32 stout NetworkManager[642]: <info> [1570746872.8521] dhcp4 (enp5s0): plen 24 (255.255.255.0) Oct 10 18:34:32 stout NetworkManager[642]: <info> [1570746872.8522] dhcp4 (enp5s0): gateway 192.168.0.1 Oct 10 18:34:32 stout NetworkManager[642]: <info> [1570746872.8522] dhcp4 (enp5s0): lease time 7200 Oct 10 18:34:32 stout NetworkManager[642]: <info> [1570746872.8522] dhcp4 (enp5s0): nameserver '192.168.0.1' Oct 10 18:34:32 stout NetworkManager[642]: <info> [1570746872.8522] dhcp4 (enp5s0): domain name 'local' Oct 10 18:34:32 stout NetworkManager[642]: <info> [1570746872.8523] dhcp4 (enp5s0): state changed unknown -> bound Oct 10 18:34:32 stout NetworkManager[642]: <info> [1570746872.8537] device (enp5s0): state change: ip-config -> ip-check (reason 'none', sys-iface-st Oct 10 18:34:32 stout NetworkManager[642]: <info> [1570746872.8565] device (enp5s0): state change: ip-check -> secondaries (reason 'none', sys-iface- Oct 10 18:34:32 stout NetworkManager[642]: <info> [1570746872.8569] device (enp5s0): state change: secondaries -> activated (reason 'none', sys-iface Oct 10 18:34:32 stout NetworkManager[642]: <info> [1570746872.8571] manager: NetworkManager state is now CONNECTED_LOCAL Oct 10 18:34:32 stout NetworkManager[642]: <info> [1570746872.8771] manager: NetworkManager state is now CONNECTED_SITE Oct 10 18:34:32 stout NetworkManager[642]: <info> [1570746872.8773] policy: set 'Ethernet connection 1' (enp5s0) as default for IPv4 routing and DNS Oct 10 18:34:32 stout NetworkManager[642]: <info> [1570746872.8777] device (enp5s0): Activation: successful, device activated. Oct 10 18:34:32 stout NetworkManager[642]: <info> [1570746872.8793] manager: NetworkManager state is now CONNECTED_GLOBAL

Alex313031 commented 2 years ago

@unwiredben @reynhout @francistheodorecatte @hugegreenbug @artingei I can also confirm this in virtualbox and on a desktop, with @francistheodorecatte fix working well, and contrary to his experience I've found hotplugging ethernet to be of no issue. (I find galliumos works fine on most regular computers too, and is a lightweight, aesthetic, and sane defaults distro for daily usage.) I've always wanted a release for general pcs, i.e. maybe based on haswell/sandy without the touchpad and kernel patches.

Alex313031 commented 2 years ago

@francistheodorecatte You might fix the hotplugging issue by also editing /etc/NetworkManager/NetworkManager.conf and changing the line [ifupdown] managed=false

to

[ifupdown] managed=true