Add in-tree Realtek 8821CE wireless module support

Bug #1885862 reported by You-Sheng Yang
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
HWE Next
Fix Released
Undecided
Unassigned
linux (Ubuntu)
Fix Released
High
You-Sheng Yang
Focal
In Progress
High
You-Sheng Yang
Groovy
Won't Fix
High
You-Sheng Yang
linux-firmware (Ubuntu)
Invalid
Undecided
Unassigned
Focal
Fix Released
High
You-Sheng Yang
Groovy
Invalid
Undecided
Unassigned
linux-oem-5.10 (Ubuntu)
Invalid
Undecided
Unassigned
Focal
Fix Released
High
You-Sheng Yang
Groovy
Invalid
Undecided
Unassigned
linux-oem-5.6 (Ubuntu)
Invalid
Undecided
Unassigned
Focal
Won't Fix
Undecided
Unassigned
Groovy
Invalid
Undecided
Unassigned

Bug Description

[SRU Justification]

[Impact]

RTL8821CE RFE Type 2 PCIE module is not supported by new rtw88 driver
in kernel version v5.11 or older. Dmesg gives:

  rtw_8821ce 0000:01:00.0: enabling device (0000 -> 0003)
  rtw_8821ce 0000:01:00.0: Firmware version 24.8.0, H2C version 12
  rtw_8821ce 0000:01:00.0: rfe 2 isn't supported
  rtw_8821ce 0000:01:00.0: failed to setup chip efuse info
  rtw_8821ce 0000:01:00.0: failed to setup chip information

Such modules are previosly covered by rtl8821ce-dkms.

[Fix]

Patch set
https://<email address hidden>/
landed in v5.12-rc1, as well as WLAN firmware updates in commit
c5e3240eff0f ("rtw88: RTL8821C: Update firmware to v24.8"), which is
already available in Hirsute version 1.195. Bluetooth firmware should
have been the latest 0x829a_7644 in both Focal/Hirsute.

[Test Case]

With patched kernel, wlan interface should be up and running:

  rtw_8821ce 0000:01:00.0: enabling device (0000 -> 0003)
  rtw_8821ce 0000:01:00.0: Firmware version 24.8.0, H2C version 12
  rtw_8821ce 0000:01:00.0 wlp1s0: renamed from wlan0

[Where problems could occur]

Previously this hardware piece can only be driven by external DKMS
modules, so with this driver patched, users can now use in-tree driver,
but may experience the difference between them in power consumption or
feature supportness.

[Other Info]

While Bionic/Focal LTS is still using rtl8821ce-dkms for RFE Type 2
cards, there is no plan to introduce such change to them. So they'll be
upgraded only at the next point release with kernel >= 5.11.

========== original bug description ==========

8821ce is being upstreamed in https://<email address hidden>/ . To backport it to ubuntu kernel so that we may obsolete the usage of rtl8821ce-dkms from https://bugs.launchpad.net/ubuntu/+source/rtl8821ce .

CVE References

You-Sheng Yang (vicamo)
tags: added: oem-priority originate-from-1884513 stella
Changed in linux-oem-5.6 (Ubuntu Groovy):
status: New → Invalid
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1885862

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu Focal):
status: New → Incomplete
You-Sheng Yang (vicamo)
tags: added: hwe-networking-wifi
Revision history for this message
You-Sheng Yang (vicamo) wrote :

PPA: https://launchpad.net/~vicamo/+archive/ubuntu/ppa-1885862 . So far only linux-firmware was added.

description: updated
Revision history for this message
You-Sheng Yang (vicamo) wrote :

Upstream commit 401bd6de ("rtw88: RTL8821C: add firmware file v24.5") already in groovy

Changed in linux-firmware (Ubuntu Groovy):
status: New → Invalid
Changed in linux-firmware (Ubuntu Focal):
status: New → Triaged
assignee: nobody → You-Sheng Yang (vicamo)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-oem-5.6 (Ubuntu Focal):
status: New → Confirmed
Changed in linux (Ubuntu Focal):
status: Incomplete → Confirmed
Changed in linux (Ubuntu Groovy):
status: Incomplete → Confirmed
Revision history for this message
You-Sheng Yang (vicamo) wrote :

https://<email address hidden>/ already merged. We can start following process.

You-Sheng Yang (vicamo)
Changed in linux (Ubuntu Groovy):
assignee: nobody → You-Sheng Yang (vicamo)
importance: Undecided → High
status: Confirmed → In Progress
Revision history for this message
You-Sheng Yang (vicamo) wrote :

Still:

[ 8.167475] rtw_8821ce 0000:02:00.0: Firmware version 24.5.0, H2C version 12
[ 8.186466] rtw_8821ce 0000:02:00.0: rfe 2 isn't supported
[ 8.186565] rtw_8821ce 0000:02:00.0: failed to setup chip efuse info
[ 8.186566] rtw_8821ce 0000:02:00.0: failed to setup chip information

Changed in linux (Ubuntu Groovy):
status: In Progress → Incomplete
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Revision history for this message
You-Sheng Yang (vicamo) wrote :

https://<email address hidden>/ Realtek to provide complete fix for RFE type 2.

Revision history for this message
You-Sheng Yang (vicamo) wrote :

commit 5d6651fe85837b11564a2e2c3c6279c057d078d6
Author: Guo-Feng Fan <email address hidden>
Date: Tue Feb 2 13:50:12 2021 +0800

    rtw88: 8821c: support RFE type2 wifi NIC

    RFE type2 is a new NIC which has one RF antenna shares with BT.
    Update phy parameter to verstion V57 to allow initial procedure
    to load extra AGC table for sharing antenna NIC.

    Signed-off-by: Guo-Feng Fan <email address hidden>
    Signed-off-by: Ping-Ke Shih <email address hidden>
    Tested-by: Kai-Heng Feng <email address hidden>
    Signed-off-by: Kalle Valo <email address hidden>
    Link: https://<email address hidden>

Will be available in v5.12.

Revision history for this message
You-Sheng Yang (vicamo) wrote :

All the patches backported for https://code.launchpad.net/~vicamo/+git/ubuntu-kernel/+ref/bug-1884513/support-8821CE/unstable is no longer necessary. So next step to take is to backport that RFE type2 commit and verify on hardware we have.

Changed in linux-oem-5.10 (Ubuntu Groovy):
status: New → Invalid
Changed in linux-oem-5.10 (Ubuntu Focal):
assignee: nobody → You-Sheng Yang (vicamo)
importance: Undecided → High
status: New → Triaged
Changed in linux (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
You-Sheng Yang (vicamo) wrote :
Changed in linux (Ubuntu):
status: Triaged → In Progress
Changed in linux (Ubuntu Focal):
assignee: nobody → You-Sheng Yang (vicamo)
importance: Undecided → High
status: Confirmed → In Progress
Changed in linux (Ubuntu Groovy):
status: Incomplete → Won't Fix
Changed in linux-firmware (Ubuntu Focal):
importance: Undecided → High
status: Triaged → In Progress
Changed in linux-oem-5.10 (Ubuntu):
status: New → Invalid
Changed in linux-oem-5.10 (Ubuntu Focal):
status: Triaged → In Progress
Changed in linux-oem-5.6 (Ubuntu Focal):
status: Confirmed → Won't Fix
Timo Aaltonen (tjaalton)
Changed in linux-oem-5.10 (Ubuntu Focal):
status: In Progress → Fix Committed
You-Sheng Yang (vicamo)
description: updated
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-focal
Revision history for this message
You-Sheng Yang (vicamo) wrote :

verified 5.10.0-1017.18 from focal-proposed.

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (35.2 KiB)

This bug was fixed in the package linux-oem-5.10 - 5.10.0-1017.18

---------------
linux-oem-5.10 (5.10.0-1017.18) focal; urgency=medium

  * focal/linux-oem-5.10: 5.10.0-1017.18 -proposed tracker (LP: #1917468)

  * Fix Lenovo ThinkStation P620 rear audio (LP: #1917842)
    - ALSA: usb-audio: Disable USB autosuspend properly in
      setup_disable_autosuspend()

  * alsa/hda: the hdmi audio dosn't work on TGL machines (LP: #1917829)
    - ALSA: hda/hdmi: let new platforms assign the pcm slot dynamically

  * drm/i915: Drop force_probe requirement for JSL (LP: #1917843)
    - SAUCE: drm/i915: Drop require_force_probe from JSL

  * Add in-tree Realtek 8821CE wireless module support (LP: #1885862)
    - rtw88: coex: 8821c: correct antenna switch function
    - rtw88: 8821c: Correct CCK RSSI
    - rtw88: 8821c: support RFE type2 wifi NIC

  * Can't adjust brightness on Dell Precision 7000 laptop (LP: #1917419)
    - drm/i915: Init lspcon after HPD in intel_dp_detect()
    - drm/i915/dp: Program source OUI on eDP panels

  * Please trust Canonical Livepatch Service kmod signing key (LP: #1898716)
    - [Config] enable CONFIG_MODVERSIONS=y
    - [Packaging] build canonical-certs.pem from branch/arch certs
    - [Config] add Canonical Livepatch Service key to SYSTEM_TRUSTED_KEYS
    - [Config] add ubuntu-drivers key to SYSTEM_TRUSTED_KEYS
    - [Config] enable CONFIG_MODVERSIONS=y
    - [Packaging] build canonical-certs.pem from branch/arch certs

  * Packaging resync (LP: #1786013)
    - [Packaging] update update.conf

  * Missing device id for Intel TGL-H ISH [8086:43fc] in intel-ish-hid driver
    (LP: #1914543)
    - SAUCE: HID: intel-ish-hid: ipc: Add Tiger Lake H PCI device ID

  * Fix broken efifb on graphics device without driver (LP: #1914411)
    - SAUCE: efifb: Ensure graphics device for efifb stays at PCI D0

  * Focal update: v5.10.18 upstream stable release (LP: #1917004)
    - vdpa_sim: remove hard-coded virtq count
    - vdpa_sim: add struct vdpasim_dev_attr for device attributes
    - vdpa_sim: store parsed MAC address in a buffer
    - vdpa_sim: make 'config' generic and usable for any device type
    - vdpa_sim: add get_config callback in vdpasim_dev_attr
    - IB/isert: add module param to set sg_tablesize for IO cmd
    - net: qrtr: Fix port ID for control messages
    - mptcp: skip to next candidate if subflow has unacked data
    - net/sched: fix miss init the mru in qdisc_skb_cb
    - mt76: mt7915: fix endian issues
    - mt76: mt7615: fix rdd mcu cmd endianness
    - net: sched: incorrect Kconfig dependencies on Netfilter modules
    - net: openvswitch: fix TTL decrement exception action execution
    - net: bridge: Fix a warning when del bridge sysfs
    - net: fix proc_fs init handling in af_packet and tls
    - Xen/x86: don't bail early from clear_foreign_p2m_mapping()
    - Xen/x86: also check kernel mapping in set_foreign_p2m_mapping()
    - Xen/gntdev: correct dev_bus_addr handling in gntdev_map_grant_pages()
    - Xen/gntdev: correct error checking in gntdev_map_grant_pages()
    - xen/arm: don't ignore return errors from set_phys_to_machine
    - xen-blkback: don't "handle" error by BUG()
    - xen-netback: don't "h...

Changed in linux-oem-5.10 (Ubuntu Focal):
status: Fix Committed → Fix Released
Juerg Haefliger (juergh)
Changed in linux-firmware (Ubuntu Focal):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 5.11.0-13.14

---------------
linux (5.11.0-13.14) hirsute; urgency=medium

  * CVE-2020-27170
    - bpf: Prohibit alu ops for pointer types not defining ptr_limit
    - bpf, selftests: Fix up some test_verifier cases for unprivileged

  * CVE-2020-27171
    - bpf: Fix off-by-one for area size in creating mask to left

 -- Andrea Righi <email address hidden> Fri, 19 Mar 2021 16:49:32 +0100

Changed in linux (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello You-Sheng, or anyone else affected,

Accepted linux-firmware into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/linux-firmware/1.187.11 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
You-Sheng Yang (vicamo) wrote :

Verified linux-oem-5.10 version 5.10.0-1020.21 along with linux-firmware version 1.187.11 from focal-proposed.

tags: added: verification-needed-focal
removed: verification-done-focal
tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for linux-firmware has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-firmware - 1.187.11

---------------
linux-firmware (1.187.11) focal; urgency=medium

  * Add in-tree Realtek 8821CE wireless module support (LP: #1885862)
    - rtw88: RTL8821C: Update firmware to v24.8

  * alsa/sdw: support soundwire audio for TGL-H machines (LP: #1911830)
    - SAUCE: sof-firmware: add TGL-H firmware from sof-bin v1.6.1

 -- Seth Forshee <email address hidden> Wed, 31 Mar 2021 15:34:04 -0500

Changed in linux-firmware (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Menno van G (mgrinsven) wrote :

Just wondering. I am still using rtl8821ce-dkms on Ubuntu 20.04. This is not needed anymore now and 5 Ghz Wifi DFS protetcted channels are now available?

Revision history for this message
You-Sheng Yang (vicamo) wrote :

@Menno, you can try `iw list` with that dkms removed. AFAIK in-tree Realtek 8821CE driver does have 5G freq support, but it may various with models. Everyone should be moving to this driver if possible.

Timo Aaltonen (tjaalton)
Changed in hwe-next:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.