FreeBSD Current WiFi and Audio problem

I installed FreeBSD however I'm facing 3 problems related to hardware:
  1. WiFI is not working at all
  2. Front panel audio not working. Only rear audio (connected to the board) works
  3. Booting takes long with a message: "waiting 30s for the default route interface"
Here's some info you may need to look at:
Code:
# ifconfig
alc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=c3198<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MCAST,WOL_MAGIC,VLAN_HWTSO,LINKSTATE>
        ether 50:e5:49:48:28:08
        media: Ethernet autoselect (none)
        status: no carrier
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 16:68:d4:26:05:37
        inet 192.168.42.82 netmask 0xffffff00 broadcast 192.168.42.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

# usbconfig
ugen0.1: <Intel EHCI root HUB> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.1: <Intel EHCI root HUB> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: <vendor 0x8087 product 0x0024> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.2: <vendor 0x8087 product 0x0024> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.3: <Logitech Logitech USB Optical Mouse> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)
ugen1.3: <HMD Global Nokia 1> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
ugen1.4: <MediaTek 802.11 n WLAN> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (160mA)
ugen1.5: <vendor 0x046d product 0x0825> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

# cat /boot/loader.conf
security.bsd.allow_destructive_dtrace=0
fusefs_load="YES"
if_run_load="YES"
runfw_load="YES"
if_ral_load="YES"
if_ural_load="YES"
if_rum_load="YES"
if_ral_load="YES"

# cat /etc/rc.conf
sendmail_enable="NONE"
hostname="mitu"
moused_nondefault_enable="NO"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
dbus_enable="YES"
hald_enable="YES"
sddm_enable="YES"
sound_load="YES"
snd_hda_load="YES"
ifconfig_alc0="DHCP"
ifconfig_ue0="DHCP"
webcamd_enable="YES"

# uname -a
FreeBSD mitu 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n257513-545db925c3d: Fri Aug 19 08:39:24 UTC 2022     [email]root@releng1.nyi.freebsd.org[/email]:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
 
-CURRENT is an unsupported, development version.

Topics about unsupported FreeBSD versions
I thought -CURRENT, being development version, should have better hardware support. My bad. Is there anyway to turn my system to the latest supported version? Or is there anything I can do to make it become the latest version when it's due. I mean some day it this development version will be stable I guess, for example:
Suppose I'm running Debian Testing. If I don't do anything it will forever remain Testing, but if I change the "testing" to "bookworm" in the repository source list, it will become the next Debian stable when the latter is ready and released. I was looking for something similar. Anyways, I can live with sound problem and boot delay, but would deeply appreciate if I get the WiFi working. I'm ready to put in extra effort and time if required.
 
Is there anyway to turn my system to the latest supported version?
While you could certainly checkout a -RELEASE or -STABLE version from the source tree and build that, downgrades are never supported. There's a very high risk of completely hosing the system that way. So, just reinstall from scratch (using a -RELEASE version) is the best course of action.

Or is there anything I can do to make it become the latest version when it's due.
14.0-RELEASE is still a long way away. I don't know the exact schedule but I suspect it won't be released until some time in 2024 (around the time 12 will be EoL).

but would deeply appreciate if I get the WiFi working
Wifi support is not that good to be honest. Support for the latest Intel Wifi 6 cards was fairly recently added (13.1-RELEASE has support for it). That was a big step up. Still lots of older Wifi cards ("wifi 5") around that aren't supported though. It begs the question though, what wifi card does this machine have?
 
While you could certainly checkout a -RELEASE or -STABLE version from the source tree and build that, downgrades are never supported. There's a very high risk of completely hosing the system that way. So, just reinstall from scratch (using a -RELEASE version) is the best course of action.


14.0-RELEASE is still a long way away. I don't know the exact schedule but I suspect it won't be released until some time in 2024 (around the time 12 will be EoL).


Wifi support is not that good to be honest. Support for the latest Intel Wifi 6 cards was fairly recently added (13.1-RELEASE has support for it). That was a big step up. Still lots of older Wifi cards ("wifi 5") around that aren't supported though. It begs the question though, what wifi card does this machine have?
My card is: <MediaTek 802.11 n WLAN> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (160mA)
 
Yeah, that's not telling me much. MediaTek uses a bunch of different chips for their 802.11n cards. It might be supported by the run(4) driver. That has support for some RT chipsets.
 
I'm sorry if I'm wrong. Please have a look at the packages in CURRENT and Stable. There's not much difference. So there must be a way to switch from CURRENT to Stable. Here's distrowatch screengrab:
Screenshot 2022-08-24 at 02-59-51 DistroWatch.com FreeBSD.png
 
Debian suggests it as "Mediatek MT7601u"
Apparently that's a rebranded Ralink RT5370, which is supported by the run(4) driver: PR 247545

I'm sorry if I'm wrong. Please have a look at the packages in CURRENT and Stable. There's not much difference.
3rd party software, ports/packages, have nothing to do with the version of the FreeBSD OS itself. There's only one ports tree. All versions on all architectures use the exact same ports tree, thus have the exact same 3rd party software available to them. Versions of 3rd party software are not linked to the version of the OS as is the case with most Linux distributions.
 
Apparently that's a rebranded Ralink RT5370, which is supported by the run(4) driver: PR 247545


3rd party software, ports/packages, have nothing to do with the version of the FreeBSD OS itself. There's only one ports tree. All versions on all architectures use the exact same ports tree, thus have the exact same 3rd party software available to them. Versions of 3rd party software are not linked to the version of the OS as is the case with most Linux distributions.
Thanks a lot for the prompt reply. Deeply appreciate if you suggest me how to install and configure that "run(4)" driver.
 
Now another, unrelated issue cropped up that's driving my crazy. Now I can't install, update or do any admin task.

manmath@mitu:/usr/home/manmath $ sudo -s
Password:
manmath is not in the sudoers file.
This incident has been reported to the administrator.

manmath@mitu:/usr/home/manmath $ su -
su: Sorry

I don't know what happened. Please help me out. Even the "su" doesn't work. However, I can login to single user mode. Please suggest me how to fix it.
 
Only members of the wheel group can su(1) to root. And sudo(8) needs to be configured, after you install it. The default sudoers doesn't allow anyone by default.

Simple solution to both problems. Add your user to the wheel group. And edit sudoers and enable this line:
Code:
## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL:ALL) ALL
 
I gave up! How could I do that with su or sudo permission? Anyways, FreeBSD group has been very welcoming and helpful. I will check back after some time. Maybe, things for desktop will improve then.
 
I gave up!
Giving up is just a path to certain failure & defeat - don't do that :)

There are some other solutions you can resort to if for whatever reason your WiFi hardware truly doesn't work on your FreeBSD machine. A fairly common one is to run a very slim Linux based OS in a bhyve VM (FreeBSD's native hypervisor). Then pass the WiFi card to that VM and use the existing Linux driver(s).
There is a port which does just that pretty much out-of-the-box: net/wifibox.

As already mentioned, running -CURRENT is not really recommended unless you know exactly what you're doing.
A lot of us are running -STABLE on their desktop machines. I made very good experiences with that so far. That gives you the "latest stuff" while still providing you with a reasonably stable system (I didn't run into any issues so far).
 
How could I do that with su or sudo permission?
You login as root, then pw groupmod wheel -m <user>. Now your user is a member of the wheel group and can use su(1). Second step (still logged in as root), run visudo(8) and modify the sudoers file.

I normally do this during the installation. You are asked if you want to create a new user account. That will ask you if the user needs to be added to any additional groups, enter wheel here.
 
I reinstalled FreeBSD stable. Everything worked except for that Mediatek WiFi card. Well, I will check back later. Members please update me if you can regarding support of this wifi card. Thanks all.
 
Thanks T-Daemon. Here's a good news and a bad news.
Bad news: The motherboard stopped working.
Good news: I'll build a new system handpicking devices that are supported in FreeBSD. Please suggest me low cost devices that are available in Amazon India website.

What I already have:
1. CPU: Intel Pentium G620 (It's a sandybridge socket 1155 proc with Intel HD graphics on die)
2: Board: Gigabyte H61M-DS2 with Qualcomm Atheros AR8151 Gigabit Ethernet and Realtek HD audio
3. Storage: Kingston 240 GB SSD
4. Input devices: Logitek USB mouse and keyboard

I want recommendations for:
1. WiFi card
2. Video capture card
3. Webcam with mic
 
I want recommendations for:
1. WiFi card
Atheros is a good choice. We only support N cards. Chipsets include AR9280, AR9380, AR9580.

Here is a good example of an Atheros AR9280 in hiding: HP Wireless PCIe card WPEA-113N

HP Goldcrest PN: 502299-001

Please note that some do not expose the antenna jacks to the backplate.
 
For 13.1-RELEASE iwlwifi(4) supported cards might be good choice. Wifi 6 speeds aren't yet supported but at least the card is recognized and works. Support for the faster wifi speeds is being worked on.

Code:
While iwlwifi supports all	802.11 a/b/g/n/ac/ax the compatibility code
     currently only supports 802.11 a/b/g modes.  Support for 802.11 n/ac is
     to	come. 802.11ax and 6Ghz	support	are planned.
 
Back
Top