Running Comfast CF-953AX on Ubuntu 22.04

Based on list of wireless cards supported on Linux, I decided to buy Comfast CF-953AX as it should have been supported since Linux kernel 5.19. And HWE kernel on Ubuntu 22.04 LTS brings me right there. With only the source of that card being AliExpress, it took some time for it to arrive. All that wait for nothing to happen once I plugged it in.

In order to troubleshoot the issue, I first checked my kernel, and it was at the expected version.

Linux 5.19.0-38-generic #39~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC

Then I checked with lsusb my devices, and there it was.

Bus 002 Device 003: ID 3574:6211 MediaTek Inc. Wireless_Device

However, checking for network using lshw -C network showed nothing. As always, looking stuff up on the Internet brought a bit more clarity to the issue. Not only the driver wasn't loaded but the USB VID:PID combination was unrecognized. The solution was simple enough: load the driver and teach it the new VID:POD combination.

sudo modprobe mt7921u
echo 3574 6211 | sudo tee /sys/bus/usb/drivers/mt7921u/new_id

Running lshw has found the card.

  *-network
       description: Wireless interface
       physical id: 5
       bus info: usb@2:1
       logical name: wlxe0e1a9389d77
       serial: e0:e1:a9:38:9d:77
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=mt7921u driverversion=6.2.0-20-generic firmware=____010000-20230302150956
       multicast=yes wireless=IEEE 802.11

Well, now to make changes permanent, we need to teach Linux a new rule:

sudo tee /etc/udev/rules.d/90-usb-3574:6211-mt7921u.rules << EOF
ACTION=="add", \
    SUBSYSTEM=="usb", \
    ENV{ID_VENDOR_ID}=="3574", \
    ENV{ID_MODEL_ID}=="6211", \
    RUN+="/usr/sbin/modprobe mt7921u", \
    RUN+="/bin/sh -c 'echo 3574 6211 > /sys/bus/usb/drivers/mt7921u/new_id'"
EOF

After that, we should update our initramfs.

sudo update-initramfs -k all -u

And that's it. Our old 22.04 just learned a new trick.

Leave a Reply

Your email address will not be published. Required fields are marked *