Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network module shows wired connection disabled #816

Closed
JordanL2 opened this issue Aug 11, 2020 · 5 comments
Closed

Network module shows wired connection disabled #816

JordanL2 opened this issue Aug 11, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@JordanL2
Copy link
Contributor

Using version 0.9.3-3 on Arch Linux. This issue started with 0.9.3-1.

When I boot up (Swaywm), the network module shows the wired connection as disabled, even though it's not. The only way to fix it is to restart Waybar, after which it shows the connection as connected and correctly displays connection name and IP address.

Config:

    "network": {
        "tooltip": true,
        "tooltip-format-ethernet": "{ifname} ({ipaddr})",
        "tooltip-format-wifi": "{essid} ({ipaddr}) {signalStrength}",
        "tooltip-format-disconnected": "DISCONNECTED",
        "format-ethernet": "  ",
        "format-wifi": "  ",
        "format-disconnected": "  ",
        "on-click": "nm-connection-editor"
    },

I'm starting Waybar with systemd:

[Unit]
Description=Waybar
PartOf=graphical-session.target

[Service]
Type=simple
ExecStart=/usr/bin/waybar
Restart=on-failure
RestartSec=1

[Install]
WantedBy=sway-session.target
@JordanL2
Copy link
Contributor Author

JordanL2 commented Aug 11, 2020

I have a theory. I see this change:
fb8cda9

If I'm understanding correctly, previously, if Waybar started and couldn't resolve the network interface, it would throw an error. And my systemd service auto-restarts Waybar on failure. So perhaps Waybar was starting before the network interface was available, exiting with error, and getting restarted until the network is available. But now it doesn't exit if the network interface is unavailable.

I've tried adding the following to the systemd unit, with no success:
Wants=network-online.target
After=network-online.target
After=NetworkManager-wait-online.service

Perhaps it would be good if Waybar occasionally polled for the network interface?

@Alexays Alexays added the bug Something isn't working label Aug 11, 2020
@maximbaz
Copy link
Contributor

Probably a duplicate of #388

@JordanL2
Copy link
Contributor Author

I'm now starting Waybar with a script that waits until my ethernet adapter has an IPv4 address before starting Waybar. This has fixed the issue.

So, I'm not 100% sure it's the same as 388, although it's possible it's caused by the same bug.

@archseer
Copy link

archseer commented Aug 18, 2020

I think it's because of a segfault when trying to create the netlink socket:

Note that it worked fine for me before (on kernel 5.7 around a month ago).

[   19.736471] ------------[ cut here ]------------
[   19.736513] WARNING: CPU: 0 PID: 846 at net/wireless/nl80211.c:7284 nl80211_get_reg_do+0x228/0x290 [cfg80211]
[   19.736617] CPU: 0 PID: 846 Comm: iwd Tainted: G           OE     5.8.1-arch1-1 #1
[   19.736619] Hardware name: Microsoft Corporation Surface Laptop 3/Surface Laptop 3, BIOS 6.22.140 10/14/2019
[   19.736652] RIP: 0010:nl80211_get_reg_do+0x228/0x290 [cfg80211]
[   19.736655] Code: 89 ef c7 44 24 0c 01 00 00 00 e8 83 20 7d f3 85 c0 74 cc e9 ff fe ff ff 48 89 ef 48 89 04 24 e8 0e 82 b0 f3 48 8b 04 24 eb 89 <0f> 0b 48 89 ef e8 fe 81 b0 f3 b8 ea ff ff ff e9 75 ff ff ff b8 97
[   19.736657] RSP: 0018:ffffb09b80f6bbe8 EFLAGS: 00010202
[   19.736659] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000
[   19.736661] RDX: ffff8a0ed3738008 RSI: 0000000000000000 RDI: ffff8a0ed37382e0
[   19.736663] RBP: ffff8a0f0f3e1900 R08: 0000000000000014 R09: ffff8a0ed760f014
[   19.736664] R10: 000000000000001e R11: 0000000000000001 R12: ffffb09b80f6bc40
[   19.736666] R13: ffff8a0ed760f014 R14: 0000000000000000 R15: ffff8a0ed37382e0
[   19.736669] FS:  00007f183c3f2740(0000) GS:ffff8a0f1ac00000(0000) knlGS:0000000000000000
[   19.736671] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   19.736672] CR2: 00007f183c367505 CR3: 0000000414346003 CR4: 0000000000760ef0
[   19.736674] PKRU: 55555554
[   19.736675] Call Trace:
[   19.736689]  genl_rcv_msg+0x1b8/0x310
[   19.736695]  ? genl_family_rcv_msg_attrs_parse.isra.0+0xd0/0xd0
[   19.736704]  netlink_rcv_skb+0x75/0x140
[   19.736708]  genl_rcv+0x24/0x40
[   19.736712]  netlink_unicast+0x242/0x340
[   19.736717]  netlink_sendmsg+0x243/0x480
[   19.736722]  sock_sendmsg+0x5e/0x60
[   19.736726]  __sys_sendto+0x120/0x180
[   19.736734]  __x64_sys_sendto+0x25/0x30
[   19.736739]  do_syscall_64+0x44/0x70
[   19.736743]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   19.736746] RIP: 0033:0x7f183c4f6080
[   19.736749] Code: c0 ff ff ff ff eb b8 0f 1f 00 f3 0f 1e fa 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 1d 45 31 c9 45 31 c0 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 68 c3 0f 1f 80 00 00 00 00 55 48 83 ec 20 48
[   19.736751] RSP: 002b:00007ffc6c5addc8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
[   19.736753] RAX: ffffffffffffffda RBX: 000055fd78789970 RCX: 00007f183c4f6080
[   19.736755] RDX: 000000000000001c RSI: 000055fd787a0210 RDI: 0000000000000004
[   19.736756] RBP: 000055fd7879f870 R08: 0000000000000000 R09: 0000000000000000
[   19.736758] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc6c5ade38
[   19.736759] R13: 00007ffc6c5ade34 R14: 000055fd78793600 R15: 0000000000000000
[   19.736764] ---[ end trace 6a46381398aa1e0e ]---

@YorozuyaDev
Copy link

I have a problem that could be related, the network module don't autorefresh. If I disconnect the pc from the network, it still appears connected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants