trueos / trueos-core

59 stars 18 forks source link

Wireless, Wi-Fi, rum(4), urtw(4): no wlan0 unless the savecache service is deleted from the shutdown runlevel before the start of the computer #252

Closed grahamperrin closed 7 years ago

grahamperrin commented 7 years ago

Whilst troubleshooting a different issue involving shutdown, I experimented with deletion of the savecache service.

Without that service at the shutdown runlevel, it seemed easier to make reliable use, with TrueOS Desktop, of a USB network adapter that is supported as a wireless network interface by FreeBSD 12.0-CURRENT.

Today I performed more focused testing. From the attached file:

Dec 27 08:49:29  shutdown: reboot by bbsadmin-l: 
Dec 27 08:50:39  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 09:07:11  shutdown: reboot by bbsadmin-l: 
Dec 27 09:08:22  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 09:15:19  shutdown: reboot by bbsadmin-l: 
Dec 27 09:16:30  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 09:19:26  shutdown: reboot by bbsadmin-l: 
Dec 27 09:20:35  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 09:39:53  shutdown: reboot by bbsadmin-l: 
Dec 27 09:41:04  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 09:43:52  shutdown: reboot by bbsadmin-l: 
Dec 27 09:45:10  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 10:00:33  shutdown: reboot by bbsadmin-l: 
Dec 27 10:01:43  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 10:04:25  shutdown: reboot by bbsadmin-l: 
Dec 27 10:05:36  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 10:12:22  shutdown: reboot by bbsadmin-l: 
Dec 27 10:13:33  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 10:23:42  shutdown: reboot by bbsadmin-l: 
Dec 27 10:24:53  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 10:29:39  shutdown: reboot by bbsadmin-l: 
Dec 27 10:30:50  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 11:21:45  shutdown: reboot by bbsadmin-l: 
Dec 27 11:22:55  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 11:32:27  shutdown: reboot by bbsadmin-l: 
Dec 27 11:33:39  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 11:42:48  shutdown: reboot by bbsadmin-l: 
Dec 27 11:43:59  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 11:57:31  shutdown: reboot by bbsadmin-l: 
Dec 27 11:58:42  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 12:01:42  shutdown: reboot by bbsadmin-l: 
Dec 27 12:02:52  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 12:11:32  shutdown: reboot by bbsadmin-l: 
Dec 27 12:12:43  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 12:20:32  shutdown: reboot by bbsadmin-l: 
Dec 27 12:21:41  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 12:23:15  shutdown: reboot by bbsadmin-l: 
Dec 27 12:24:25  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 12:26:50  shutdown: reboot by bbsadmin-l: 
Dec 27 12:28:01  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 12:32:54  shutdown: reboot by bbsadmin-l: 
Dec 27 12:34:04  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 13:09:15  shutdown: reboot by bbsadmin-l: 
Dec 27 13:10:29  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 13:14:15  shutdown: reboot by bbsadmin-l: 
Dec 27 13:15:28  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 13:59:22  shutdown: reboot by bbsadmin-l: 
Dec 27 14:00:32  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 14:08:03  shutdown: reboot by bbsadmin-l: 
Dec 27 14:09:14  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 14:10:23  shutdown: reboot by bbsadmin-l: 
Dec 27 14:11:33  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 14:13:46  shutdown: reboot by bbsadmin-l: 
Dec 27 14:15:02  syslogd: kernel boot file is /boot/kernel/kernel
Dec 27 14:16:06  shutdown: reboot by bbsadmin-l: 
Dec 27 14:17:17  syslogd: kernel boot file is /boot/kernel/kernel

In the first twenty-something cases, without savecache, a login to a desktop environment found an icon for wlan0.

The reboot at 14:13:46 was preceded by experimental reintroduction of the savecache service. Critically:

The reboot at 14:16:06 was preceded by deletion of the savecache service and I'm now using the device at wlan0 without difficulty.

terminal output.txt

Environment

grahamperrin commented 7 years ago

Hmm, sorry, where (if anywhere) should I find rum0 in the file system?

I imagined that as a device, it should be at /dev/, hence the change of title here after performing a further test with the service added before a restart of the OS:

bbsadmin-l@momh167-gjp4-macbookpro112-trueos ~> date ; uptime ; uname -v
Tue 27 Dec 2016 15:41:58 GMT
 3:41p.m.  up 3 mins, 1 users, load averages: 0.94, 0.54, 0.23
FreeBSD 12.0-CURRENT #11 8b9df91(drm-next-4.7): Sat Dec 24 15:17:28 UTC 2016     root@gauntlet:/usr/obj/usr/src/sys/GENERIC 
bbsadmin-l@momh167-gjp4-macbookpro112-trueos ~> ls -dl /dev/r*
crw-r--r--  1 root  wheel  0x7 27 Dec 15:39 /dev/random
dr-xr-xr-x  2 root  wheel  512 27 Dec 15:38 /dev/reroot
bbsadmin-l@momh167-gjp4-macbookpro112-trueos ~> rc-update
                  abi | boot                                   
            adjkerntz | boot                                   
            automount |      default                           
             bootmisc | boot                                   
               bridge | boot                                   
                 cron | boot                                   
         cups_browsed |      default                           
                cupsd |      default                           
                 dbus |      default                           
                 devd | boot                                   
               dumpon | boot                                   
                 fsck | boot                                   
               hostid | boot                                   
             hostname | boot                                   
                 ipfw | boot                                   
                local |      default nonetwork                 
           localmount | boot                                   
                lockd |      default                           
             loopback | boot                                   
              modules | boot                                   
                 motd | boot                                   
               moused |      default                           
             netmount |      default                           
              network | boot                                   
            newsyslog | boot                                   
             openntpd |      default                           
                 pcdm |      default                           
                 root | boot                                   
              rpcbind |      default                           
            savecache |                        shutdown        
             savecore | boot                                   
                 sshd |      default                           
                statd |      default                           
          staticroute | boot                                   
                 swap | boot                                   
               sysadm |      default                           
              syscons | boot                                   
               sysctl | boot                                   
              syslogd | boot                                   
           trueosinit |      default                           
              urandom | boot                                   
                  zfs | boot default                           
                 zvol | boot                                   
bbsadmin-l@momh167-gjp4-macbookpro112-trueos ~> sudo rc-update remove savecache shutdown
Password:
 * rc-update: invalid command `remove'
bbsadmin-l@momh167-gjp4-macbookpro112-trueos ~> sudo rc-update delete savecache shutdown
 * service savecache removed from runlevel shutdown
bbsadmin-l@momh167-gjp4-macbookpro112-trueos ~> 

Now I realise, with the device working for wlan0, there's still no rum0 at /dev/.

rc.conf

$ cat /etc/rc.conf
rc_parallel="NO"
rc_logger="YES"
rc_log_path="/var/log/rc.log"
linux_enable="YES"
# Auto-Enabled NICs from pc-sysinstall
ifconfig_ue0="DHCP"
# Auto-Enabled NICs from pc-sysinstall
ifconfig_ue0_ipv6="inet6 accept_rtadv"
hostname="momh167-gjp4-macbookpro112-trueos.university.brighton.ac.uk"
kldload_i915kms="i915kms"
zfs_enable="YES"
sshd_enable="YES"
wlans_rum0="wlan0"
ifconfig_wlan0="WPA DHCP"
$ 
grahamperrin commented 7 years ago

https://www.freebsd.org/cgi/man.cgi?query=rum&sektion=4&manpath=FreeBSD+12-current

pkgdemon commented 7 years ago

I think I may be seeing this regression as well but with a usb ethernet ums0. I will try removing savecache from shutdown to see if this fixes.

pkgdemon commented 7 years ago

Ok removing savecore doesn't fix my issue. My issue was just the fact that devd is no longer loading the module. @grahamperrin I don't believe wireless devices ever show in in /dev, or that anything is created in the filesystem for network devices. I know sysctl -b net.wlan.devices can be used to see wireless devices if they have a module loaded. Otherwise pciconf -lv may be of some use just to see if the hardware is detected at all even without a module loaded.

grahamperrin commented 7 years ago
$ uname -v
FreeBSD 12.0-CURRENT #12 5ef9376(drm-next-4.7): Thu Dec 29 16:26:36 UTC 2016     root@gauntlet:/usr/obj/usr/src/sys/GENERIC 
$

For consideration: D-Link DWL-G122 rev C1 now recognised (wlan0) at a MacBookPro8,2

not recommended, known to cause trouble, but for the moment I'm most interested in Internet connectivity. …

pkgdemon commented 7 years ago

Does the exstension cable include a hub as well?

grahamperrin commented 7 years ago

No, just a simple cable. Maybe one metre long. White. No manufacturer's brand but it's well-manufactured.

MacBookPro5,2

https://discourse.trueos.org/t/wireless-networking-with-rum-4-and-a-d-link-device-for-wlan0/459/6?u=grahamperrin reminds me that around 2016-12-27 (four days ago) I had this Mac working with a non-encrypted installation of TrueOS Desktop on a USB flash drive.

A few hours ago I overwrote that with with an encrypted installation, updated to FreeBSD 12.0-CURRENT #12 5ef9376(drm-next-4.7): Thu Dec 29 16:26:36 UTC 2016 root@gauntlet:/usr/obj/usr/src/sys/GENERIC, booted five or six times with required lines in /etc/rc.conf:

I deleted savecache from runlevel shutdown, commanded shutdown -r now and now:

(Stage two of an update routine began a couple of minutes ago, I guess that it'll be 5ef9376 again with changes in some areas.)

pkgdemon commented 7 years ago

Does encrypted vs non encrypted make the difference? Or is it running TrueOS from a USB flash drive vs internal drive?

pkgdemon commented 7 years ago

Or is it the cable? Need more clarity on this one.

grahamperrin commented 7 years ago

One memorable difference: tl;dr the earlier, non-encrypted installation was fresh when the USB flash drive was at an HP desktop. I made that an opportunity to subsequently learn, re-learn how to manually add support when moving an installation from one hardware environment to another. Point of reference https://discourse.trueos.org/t/macbookpro5-2-17-macbook-pro-2009/479 but I'm carefully not quoting from that opening post; most relevant to this issue is:


Relevant from the second post in that topic:

I performed a fresh, encrypted installation to the same USB flash drive, this time with the drive connected to the MacBookPro5,2. …

The D-Link device almost certainly was not present at that time of freshness. That's almost certain because:

That's potentially a lot to take in :-) so if anything remains unclear, just say.

Next steps

On one hand

I might try this USB flash drive with the D-Link device at something other than an Apple notebook; tell whether the run of savecache can be troublesome with another brand of computer. If I do this, I'll probably target an old (c. 2007) but predictable Ergo Vista 621.

On the other hand

Should I defer broader testing until after the 'new' FreeBSD netif flavour of OpenRC network service is in the mix?

(https://gitter.im/trueos/troubleshooting?at=5867e1dcd99b1dd03d2e7c74 there's a question about distinguishing between flavours of the service.)

Thanks

pkgdemon commented 7 years ago

Yeah this is way too much information to take in. I only need to know the answers to the specific questions I asked above. Does that require retesting on your end? Or can you just narrow down what you are able to without a reinstall if that is the case? Namely is it the usb extension cable to start?

grahamperrin commented 7 years ago

Where the extension cable was required, I'd like to retest to be certain however: if I do so without knowing whether it's the new or old flavour of network service, I'll become confused.

Results from today's test with the MacBookPro5,2, which does not require an extension cable, seem reasonably conclusive.

pkgdemon commented 7 years ago

Closing for now due to lack of required information to reproduce.

grahamperrin commented 7 years ago

Results from today's test with the MacBookPro5,2, which does not require an extension cable, seem reasonably conclusive.

MacBookPro5,2 + D-Link DWL-G122 rev C1 + encrypted TrueOS Desktop booting from a USB flash drive without savecache service at runlevel shutdown:

This morning I reintroduced the offending service to that USB flash drive and as I expected:

I shutdown the MacBookPro5,2, removed both USB devices and introduced them – and the offending service – to a different computer …


HP EliteBook 8540p with the USB flash drive in its left port, D-Link in the rearmost of its right ports:

On to a different computer …


Ergo Vista 621 with the USB flash drive in a port at the rear (the left, viewed from the front), D-link in the rearmost of its right ports:

On to a different computer …


MacBookPro11,2 with the USB flash drive to the left, D-Link to the right:

So I deleted the offending service, restarted the OS:

pkgdemon commented 7 years ago

Can you provide the output of kldstat before, and after the problem?

grahamperrin commented 7 years ago
$ date ; uptime ; uname -v ; uname -n
Mon  2 Jan 2017 18:29:02 GMT
 6:29p.m.  up 1 min, 1 users, load averages: 1.66, 0.58, 0.22
FreeBSD 12.0-CURRENT #12 5ef9376(drm-next-4.7): Thu Dec 29 16:26:36 UTC 2016     root@gauntlet:/usr/obj/usr/src/sys/GENERIC 
momh167-gjp4-macbookpro112-trueos.university.brighton.ac.uk
$ kldstat
Id Refs Address            Size     Name
 1  150 0xffffffff80200000 1e9c038  kernel
 2    1 0xffffffff8209e000 312468   zfs.ko
 3    2 0xffffffff823b1000 c808     opensolaris.ko
 4    1 0xffffffff823be000 21b50    geom_eli.ko
 5    1 0xffffffff823e0000 12c48    tmpfs.ko
 6    1 0xffffffff823f3000 b590     aesni.ko
 7    1 0xffffffff83a48000 1023d    if_rum.ko
 8    1 0xffffffff83a59000 23cef    ipfw.ko
 9    1 0xffffffff83a7d000 3ecc6    linux.ko
10    4 0xffffffff83abc000 7830     linux_common.ko
11    1 0xffffffff83ac4000 5738     atp.ko
12    2 0xffffffff83aca000 4265     libiconv.ko
13    1 0xffffffff83acf000 2441     libmchain.ko
14    1 0xffffffff83ad2000 3a90f    linux64.ko
15    1 0xffffffff83b0d000 786      msdosfs_iconv.ko
16    1 0xffffffff83b0e000 371c2    if_bwn.ko
17    1 0xffffffff83b46000 82af     siba_bwn.ko
18    1 0xffffffff83b4f000 1fdb2    if_bwi.ko
19    1 0xffffffff83b6f000 26e5     runfw.ko
20    1 0xffffffff83b72000 1a0c9    if_iwm.ko
21    1 0xffffffff83b8d000 83a1     cuse.ko
22    1 0xffffffff83b96000 6db3     sem.ko
23    1 0xffffffff83b9d000 8d3d     geom_uzip.ko
24    1 0xffffffff83ba6000 5887     fdescfs.ko
25    4 0xffffffff83bac000 316c1    linuxkpi.ko
26    1 0xffffffff83bde000 2e538    iwn4965fw.ko
27    1 0xffffffff83c0d000 52d5d    iwn1000fw.ko
28    1 0xffffffff83c60000 539cc    iwn5000fw.ko
29    1 0xffffffff83cb4000 52cec    iwn5150fw.ko
30    1 0xffffffff83d07000 6f6c4    iwn6000fw.ko
31    1 0xffffffff83d77000 a5cad    iwn6000g2afw.ko
32    1 0xffffffff83e1d000 a6509    iwn6000g2bfw.ko
33    1 0xffffffff83ec4000 7320d    iwn6050fw.ko
34    1 0xffffffff83f38000 3667     acpi_video.ko
35    1 0xffffffff83f3c000 de62     fuse.ko
36    1 0xffffffff83f4a000 3bd0     ums.ko
37    1 0xffffffff83f4e000 12c540   i915kms.ko
38    1 0xffffffff8407b000 81595    drm.ko
39    2 0xffffffff840fd000 5c0e     debugfs.ko
40    1 0xffffffff84103000 bdd3     linprocfs.ko
41    1 0xffffffff8410f000 8177     autofs.ko
42    1 0xffffffff84118000 4f25     ng_ubt.ko
43    2 0xffffffff8411d000 c69d     netgraph.ko
44    1 0xffffffff8412a000 a577     ng_hci.ko
45    1 0xffffffff84135000 105c     ng_bluetooth.ko
46    1 0xffffffff84137000 412a     wsp.ko
47    1 0xffffffff8413c000 bf4c     if_lagg.ko
$ rc-update
                  abi | boot                                   
           accounting |                                        
            adjkerntz | boot                                   
                  amd |                                        
              anacron |                                        
               auditd |                                        
           auditdistd |                                        
            automount |      default                           
           automountd |                                        
         autounmountd |                                        
         avahi-daemon |                                        
       avahi-dnsconfd |                                        
           blacklistd |                                        
            bluetooth |                                        
             bootmisc | boot                                   
               bridge | boot                                   
                 cron | boot                                   
         cups_browsed |      default                           
                cupsd |      default                           
                 dbus |      default                           
                 devd | boot                                   
                devfs |                                        
               dhcpcd |                                        
           dhcpcd.ue0 |                                        
         dhcpcd.wlan0 |                                        
               dumpon | boot                                   
              encswap |                                        
                 fsck | boot                                   
                 ftpd |                                        
                 gssd |                                        
                 hald |                                        
              hostapd |                                        
               hostid | boot                                   
             hostname | boot                                   
                 ipfw | boot                                   
                 jail |                                        
             ldconfig |                                        
                local |      default nonetwork                 
        local_unbound |                                        
           localmount | boot                                   
                lockd |      default                           
             loopback | boot                                   
                mixer |                                        
              modules | boot                                   
         modules-load |                                        
                 motd | boot                                   
               mountd |                                        
               moused |      default                           
          moused.atp0 |                                        
          moused.ums0 |                                        
          moused.ums1 |                                        
          moused.ums2 |                                        
          moused.wsp0 |                                        
                 natd |                                        
             netmount |      default                           
              network | boot                                   
          network.lo0 |                                        
         network.rum0 |                                        
          network.ue0 |                                        
        network.wlan0 |                                        
            newsyslog | boot                                   
            nfsclient |                                        
                 nfsd |                                        
             nfsuserd |                                        
                 nscd |                                        
             openntpd |      default                           
              osclock |                                        
                 pcdm |      default                           
                   pf |                                        
               powerd |                                        
                rarpd |                                        
           rc-enabled |                                        
                 root | boot                                   
              routing |                                        
              rpcbind |      default                           
             runsvdir |                                        
            s6-svscan |                                        
            savecache |                                        
             savecore | boot                                   
             sendmail |                                        
                 sshd |      default                           
                statd |      default                           
          staticroute | boot                                   
                 swap | boot                                   
              swclock |                                        
               sysadm |      default                           
        sysadm-bridge |                                        
          sysadm-rest |                                        
              syscons | boot                                   
               sysctl | boot                                   
              syslogd | boot                                   
       tmpfiles.setup |                                        
           trueosinit |      default                           
              urandom | boot                                   
              webcamd |                                        
       wpa_supplicant |                                        
 wpa_supplicant.wlan0 |                                        
                  zfs | boot default                           
                 zvol | boot                                   
$ sudo rc-update add savecache shutdown
Password:
 * service savecache added to runlevel shutdown
$ 
grahamperrin commented 7 years ago
$ date ; uptime ; uname -v ; uname -n
Mon  2 Jan 2017 18:33:39 GMT
 6:33p.m.  up 2 mins, 1 users, load averages: 1.52, 0.55, 0.21
FreeBSD 12.0-CURRENT #12 5ef9376(drm-next-4.7): Thu Dec 29 16:26:36 UTC 2016     root@gauntlet:/usr/obj/usr/src/sys/GENERIC 
momh167-gjp4-macbookpro112-trueos.university.brighton.ac.uk
$ kldstat
Id Refs Address            Size     Name
 1  150 0xffffffff80200000 1e9c038  kernel
 2    1 0xffffffff8209e000 312468   zfs.ko
 3    2 0xffffffff823b1000 c808     opensolaris.ko
 4    1 0xffffffff823be000 21b50    geom_eli.ko
 5    1 0xffffffff823e0000 12c48    tmpfs.ko
 6    1 0xffffffff823f3000 b590     aesni.ko
 7    1 0xffffffff83a48000 23cef    ipfw.ko
 8    1 0xffffffff83a6c000 3ecc6    linux.ko
 9    4 0xffffffff83aab000 7830     linux_common.ko
10    1 0xffffffff83ab3000 5738     atp.ko
11    2 0xffffffff83ab9000 4265     libiconv.ko
12    1 0xffffffff83abe000 2441     libmchain.ko
13    1 0xffffffff83ac1000 3a90f    linux64.ko
14    1 0xffffffff83afc000 786      msdosfs_iconv.ko
15    1 0xffffffff83afd000 371c2    if_bwn.ko
16    1 0xffffffff83b35000 82af     siba_bwn.ko
17    1 0xffffffff83b3e000 1fdb2    if_bwi.ko
18    1 0xffffffff83b5e000 26e5     runfw.ko
19    1 0xffffffff83b61000 1a0c9    if_iwm.ko
20    1 0xffffffff83b7c000 83a1     cuse.ko
21    1 0xffffffff83b85000 6db3     sem.ko
22    1 0xffffffff83b8c000 8d3d     geom_uzip.ko
23    1 0xffffffff83b95000 5887     fdescfs.ko
24    4 0xffffffff83b9b000 316c1    linuxkpi.ko
25    1 0xffffffff83bcd000 2e538    iwn4965fw.ko
26    1 0xffffffff83bfc000 52d5d    iwn1000fw.ko
27    1 0xffffffff83c4f000 539cc    iwn5000fw.ko
28    1 0xffffffff83ca3000 52cec    iwn5150fw.ko
29    1 0xffffffff83cf6000 6f6c4    iwn6000fw.ko
30    1 0xffffffff83d66000 a5cad    iwn6000g2afw.ko
31    1 0xffffffff83e0c000 a6509    iwn6000g2bfw.ko
32    1 0xffffffff83eb3000 7320d    iwn6050fw.ko
33    1 0xffffffff83f27000 3667     acpi_video.ko
34    1 0xffffffff83f2b000 de62     fuse.ko
35    1 0xffffffff83f39000 3bd0     ums.ko
36    1 0xffffffff83f3d000 12c540   i915kms.ko
37    1 0xffffffff8406a000 81595    drm.ko
38    2 0xffffffff840ec000 5c0e     debugfs.ko
39    1 0xffffffff840f2000 bdd3     linprocfs.ko
40    1 0xffffffff840fe000 1023d    if_rum.ko
41    1 0xffffffff8410f000 8177     autofs.ko
42    1 0xffffffff84118000 4f25     ng_ubt.ko
43    2 0xffffffff8411d000 c69d     netgraph.ko
44    1 0xffffffff8412a000 a577     ng_hci.ko
45    1 0xffffffff84135000 105c     ng_bluetooth.ko
46    1 0xffffffff84137000 412a     wsp.ko
47    1 0xffffffff8413c000 bf4c     if_lagg.ko
$ rc-update | grep shutdown
            savecache |                        shutdown        
$ sudo rc-update delete savecache shutdown 
Password:
 * service savecache removed from runlevel shutdown
$ cat /etc/rc.conf
rc_verbose="YES"
rc_interactive="YES"
rc_crashed_start="NO"
rc_depend_strict="YES"
rc_parallel="YES"
rc_logger="YES"
rc_log_path="/var/log/rc.log"
zfs_enable="YES"
kldload_i915kms="i915kms"
linux_enable="YES"
ifconfig_ue0="DHCP"
ifconfig_ue0_ipv6="inet6 accept_rtadv"
wlans_rum0="wlan0"
ifconfig_wlan0="WPA DHCP"
sshd_enable="YES"
hostname="momh167-gjp4-macbookpro112-trueos.university.brighton.ac.uk"
$ cat /boot/loader.conf
# * IMPORTANT NOTICE *
# If using GRUB, run 'grub-mkconfig -o /boot/grub/grub.cfg' after making
# changes to this file
###############################################################################
crypto_load="YES"
aesni_load="YES"
geom_eli_load="YES"
# Tune ZFS Arc Size - Change to adjust memory used for disk cache
vfs.zfs.arc_max="2048M"
zfs_load="YES"
$ cat /boot/loader.conf.trueos 
# Kernel Options
kern.ipc.shmseg=1024
kern.ipc.shmmni=1024
kern.maxproc=10000

# Accept the wifi firmware license
legal.intel_ipw.license_ack=1
legal.intel_iwi.license_ack=1
legal.realtek.license_ack=1

# Load File-System Support
opensolaris_load="YES"
zfs_load="YES"
tmpfs_load="YES"

# Disable acpi throttle by default, fixes issues with powerd and later AMDs
hint.acpi_throttle.0.disabled="1"

# Show keystokes for passphrases
kern.geom.eli.visible_passphrase=2 

# Speed up boot
kern.cam.scsi_delay="500"

# Skip the often slow memory tests in VMs
hw.memtest.tests=0

# Load geom support
crypto_load="YES"
geom_eli_load="YES"

# Enable hardware crypto
aesni_load="YES"

# Enable NewCons / vt
kern.vty=vt

# Disable some labels
kern.geom.label.gptid.enable="0"
kern.geom.label.disk_ident.enable="0"
kern.geom.label.ufsid.enable="0"

# Don't power devices with no driver
hw.pci.do_power_nodriver=3

# Disable the ipv6 auto_linklocal.
# If you use the lagg interface you may want to set this in /boot/loader.conf
#net.inet6.ip6.auto_linklocal="0"

# Set ipfw to default accept
net.inet.ip.fw.default_to_accept="1"

# Allow more than one pass through firewall (for pipes, etc)
net.inet.ip.fw.one_pass=0

# Increase maxdata for net.graph, fixes issues with scp / ssh wile running VirtualBox
net.graph.maxdata=65536

# Set the brand/loader logo
loader_brand="trueos"
loader_logo="trueos"
loader_menu_title="Welcome to TrueOS"

# Enable Synaptics for touchpads
hw.psm.synaptics_support="1"

# Enable Elantech touchpad support
hw.psm.elantech_support="1"

# Speed up boot time
autoboot_delay="01"

# Enable the TrueOS splash-screen
# boot_mute="YES"
$ shutdown -r now
grahamperrin commented 7 years ago

Issue and workaround reproduced with the D-Link device connected to a Samsung NF110 netbook.

Observation

Whilst there's no wlan0, there is a periodic flash from the Lnk indicator of the D-Link device.

The same was probably observable with the device at the Mac notebooks.

pkgdemon commented 7 years ago

Looks like that is kldstat before? What does kldstat look like after?

grahamperrin commented 7 years ago

Truly, those were the before and after.

Before the problem, without the service:

Mon  2 Jan 2017 18:29:02 GMT
 6:29p.m.  up 1 min, 1 users, load averages: 1.66, 0.58, 0.22

Still before the problem:

$ sudo rc-update add savecache shutdown
Password:
 * service savecache added to runlevel shutdown
$ 

Then the restart (… run of savecache … start).

After that restart, with the problem:

Mon  2 Jan 2017 18:33:39 GMT
 6:33p.m.  up 2 mins, 1 users, load averages: 1.52, 0.55, 0.21
grahamperrin commented 7 years ago

https://discourse.trueos.org/t/trueos-desktop-2016-12-27-x64-and-ipv4-lan-with-dhcp/595/11:

… With TrueOS from 10/28/2016, wlan (D-Link, USB) worked "out of the box". But every update since then killed it.

I decided to do a fresh install with 12/27/2016 (the latest). Result: no wlan. …

grahamperrin commented 7 years ago

From https://gitter.im/trueos/Random?at=587959a4dec171b811e7d9b3:

… Thank you !

… after reboot rc-update delete savecache shutdown.png

after-reboot-rc-update-delete-savecache-shutdown

From https://gitter.im/trueos/troubleshooting?at=587962c611e7a7f61d935f1c:

wlans_urtw0="wlan0"

pkgdemon commented 7 years ago

I encountered this with another user with built in wireless at the office using if_run. Adding the kernel module to modules fixes. The issue seems to be devd starting after networking and loading the kernel module after network. In your case you could try adding if_rum to /etc/conf.d/modules to see if that resolves it without the removal of savecache as well.

grahamperrin commented 7 years ago

Thanks. rum(4) tests progressing at a MacBookPro11,2

For the @Mystified1234 case, urtw(4) and I guess that /etc/conf.d/modules should include if_urtw

grahamperrin commented 7 years ago

Tested successfully at the MacBookPro11,2:

– with both atp and if_rum in /etc/conf.d/modules

pkgdemon commented 7 years ago

Yeah. For now I am going to add these into our stock modules file. It is what we have always done in PC-BSD anyway. When we have devd working properly I can revert.

pkgdemon commented 7 years ago

Fixed will be in next unstable push after packages build. https://github.com/trueos/trueos-core/commit/d0da1659cbaf9b940f77b3932ef299fb74189d23

grahamperrin commented 7 years ago

Should we also add urtw for the case at https://github.com/trueos/trueos-core/issues/252#issuecomment-272576638 above?

(Maybe overlooked, the light grey of the quoted text.)

pkgdemon commented 7 years ago

Ah. I overlooked this or may have mixed the tickets up. Will reopen until i get it added, and pushed.

pkgdemon commented 7 years ago

https://github.com/trueos/trueos-core/commit/491b7e6879af15a26e8eff659595e0915af2d70c