Aug 3, 2023, 03:12 by g...@lexort.com: > bsd...@tuta.io writes: > >> I am on NetBSD 10.0 Beta. >> I get intermitent loss of WiFi with my iwm driver. >> > > This sort of problem happens with some adaptors sometimes, but is not > super common. I have a few urtwn(4) devices. One, on a 2006 macbook > (i386) has been reliable. Another, on a RPI3 (earmv7hf-el) has > occasional failures and I have a cron script to detect that and down/up. > Both of those experiences were on 8 and 9; I'm getting ready to move to > 10. > > Please describe your hardware and which architecture you are running. > We have no idea what kind of cpu/system etc. even if it seems likely an > i386 or amd64 laptop. > > Please post the dmesg lines for iwm attachment. You can blur our the > mac address. > > You say "loss of WiFi", but I wonder if you can narrow that down. > > How often does this happen? > > Does "ifconfig" show it still associated? > On the router/AP/whatever, can you tell if it is gone from the network? > If you run tcpdump -n on the adaptor, do you see any incoming frames? > If you "ping -n [router's IP addr]", do you see outgoing frames? > What does netstat -i show for in/out/error counts when it is "lost"? > > (I'm not really asking you to post all of this, but to try it all and > see what you can figure out.) > >> I think this is the error message in dmesg (I am not sure whether this DRM >> is i915 or iwm) >> [ 968.284136] {drm:netbsd:intel_pipe_update_start+0x33b} *ERROR* Potential >> atomic update failure on pipe A: -35 >> > > That's about graphics. Does that happen just once, or does it happen > again when the wifi fails again? Is there anything else in dmesg or > syslog? > >> The workaround is to execute the following twice: >> doas ifconfig iwm0 down >> doas ifconfig iwm0 up >> >> It needs to be executed twice, because after the first down and up, I get: >> ifconfig: exec_matches: Resource temporarily unavailable >> > > Try waiting 10s after down before up. Run ifconfig in between. > Basically try every inspection method you can think of. > > If you are up for it, you can read the driver src/sys/dev/pci/if_iwm.c > and turn on IWM_DEBUG and set iwm_debug to nonzero and get lots of > messages. >
Here are the iwm debug messages: [ 185.741855] iwm0: autoconfiguration error: device timeout [ 185.741855] iwm0: autoconfiguration error: dumping device error log [ 185.741855] iwm0: autoconfiguration error: Start Error Log Dump: [ 185.741855] iwm0: autoconfiguration error: Status: 0x63, count: 6 [ 185.741855] iwm0: autoconfiguration error: 000022CE | ADVANCED_SYSASSERT [ 185.741855] iwm0: autoconfiguration error: 000002B3 | trm_hw_status0 [ 185.741855] iwm0: autoconfiguration error: 00000000 | trm_hw_status1 [ 185.741855] iwm0: autoconfiguration error: 0000E258 | branchlink2 [ 185.741855] iwm0: autoconfiguration error: 0002730C | interruptlink1 [ 185.741855] iwm0: autoconfiguration error: 00000000 | interruptlink2 [ 185.741855] iwm0: autoconfiguration error: 0000001C | data1 [ 185.741855] iwm0: autoconfiguration error: 03230000 | data2 [ 185.741855] iwm0: autoconfiguration error: DEADBEEF | data3 [ 185.741855] iwm0: autoconfiguration error: 9D401E06 | beacon time [ 185.741855] iwm0: autoconfiguration error: 272AA1FD | tsf low [ 185.741855] iwm0: autoconfiguration error: 0000002F | tsf hi [ 185.741855] iwm0: autoconfiguration error: 00000000 | time gp1 [ 185.741855] iwm0: autoconfiguration error: 041C1813 | time gp2 [ 185.741855] iwm0: autoconfiguration error: 00000000 | uCode revision type [ 185.741855] iwm0: autoconfiguration error: 00000016 | uCode version major [ 185.741855] iwm0: autoconfiguration error: 00058404 | uCode version minor [ 185.741855] iwm0: autoconfiguration error: 00000230 | hw version [ 185.741855] iwm0: autoconfiguration error: 00009000 | board version [ 185.741855] iwm0: autoconfiguration error: 0000001C | hcmd [ 185.741855] iwm0: autoconfiguration error: 22F12000 | isr0 [ 185.741855] iwm0: autoconfiguration error: 00004000 | isr1 [ 185.741855] iwm0: autoconfiguration error: 00001802 | isr2 [ 185.741855] iwm0: autoconfiguration error: 40417DC1 | isr3 [ 185.741855] iwm0: autoconfiguration error: 00000000 | isr4 [ 185.741855] iwm0: autoconfiguration error: 10900112 | last cmd Id [ 185.741855] iwm0: autoconfiguration error: 00000000 | wait_event [ 185.741855] iwm0: autoconfiguration error: 00000080 | l2p_control [ 185.741855] iwm0: autoconfiguration error: 00011C22 | l2p_duration [ 185.741855] iwm0: autoconfiguration error: 0000003F | l2p_mhvalid [ 185.741855] iwm0: autoconfiguration error: 000000CE | l2p_addr_match [ 185.741855] iwm0: autoconfiguration error: 0000000D | lmpm_pmg_sel [ 185.741855] iwm0: autoconfiguration error: 03071928 | timestamp [ 185.741855] iwm0: autoconfiguration error: 15E4A0A0 | flow_handler [ 185.741855] iwm0: autoconfiguration error: Start UMAC Error Log Dump: [ 185.741855] iwm0: autoconfiguration error: Status: 0x63, count: 7 [ 185.741855] iwm0: autoconfiguration error: 0x00000070 | ADVANCED_SYSASSERT [ 185.741855] iwm0: autoconfiguration error: 0x00000000 | umac branchlink1 [ 185.741855] iwm0: autoconfiguration error: 0xC0082F64 | umac branchlink2 [ 185.741855] iwm0: autoconfiguration error: 0xC0081000 | umac interruptlink1 [ 185.741855] iwm0: autoconfiguration error: 0xC0081000 | umac interruptlink2 [ 185.741855] iwm0: autoconfiguration error: 0x00000800 | umac data1 [ 185.741855] iwm0: autoconfiguration error: 0xC0081000 | umac data2 [ 185.741855] iwm0: autoconfiguration error: 0xDEADBEEF | umac data3 [ 185.741855] iwm0: autoconfiguration error: 0x00000016 | umac major [ 185.741855] iwm0: autoconfiguration error: 0x00058404 | umac minor [ 185.741855] iwm0: autoconfiguration error: 0xC0886280 | frame pointer [ 185.741855] iwm0: autoconfiguration error: 0xC0886280 | stack pointer [ 185.741855] iwm0: autoconfiguration error: 0x092B002C | last host cmd [ 185.741855] iwm0: autoconfiguration error: 0x00000000 | isr status reg