tomaspinho / rtl8821ce

Other
1.6k stars 409 forks source link

Bluetooth not working #261

Open abkein opened 2 years ago

abkein commented 2 years ago

I've installed the dirver by

sudo apt-get install --reinstall git dkms build-essential linux-headers-$(uname -r)
git clone https://github.com/tomaspinho/rtl8821ce
cd rtl8821ce
chmod +x dkms-install.sh
chmod +x dkms-remove.sh
sudo ./dkms-install.sh

But bluetooth doesn't work

System Linux Mint 20.3 (Una)

Kernel: 5.11.0-46-generic #51~20.04.1-Ubuntu SMP Fri Jan 7 06:51:40 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Service bluetooth - inactive(dead), restart is not helpful

root@redox:/home/kein# systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
     Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
       Docs: man:bluetoothd(8)

Feb 16 09:23:10 redox systemd[1]: Condition check resulted in Bluetooth service being skipped.
Feb 16 09:23:35 redox systemd[1]: Condition check resulted in Bluetooth service being skipped.
Feb 16 09:57:15 redox systemd[1]: Condition check resulted in Bluetooth service being skipped.
Feb 16 13:53:06 redox systemd[1]: Condition check resulted in Bluetooth service being skipped.
Feb 17 09:02:56 redox systemd[1]: Condition check resulted in Bluetooth service being skipped.
root@redox:/home/kein# lspci -vvv
0000:01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter
    DeviceName: Realtek Wireless LAN + BT
    Subsystem: Hewlett-Packard Company RTL8821CE 802.11ac PCIe Wireless Network Adapter
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 64 bytes
    Interrupt: pin A routed to IRQ 151
    Region 0: I/O ports at 3000 [size=256]
    Region 2: Memory at 84000000 (64-bit, non-prefetchable) [size=64K]
    Capabilities: [40] Power Management version 3
        Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Address: 00000000fee00558  Data: 0000
    Capabilities: [70] Express (v2) Endpoint, MSI 00
        DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 <64us
            ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 10.000W
        DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
            RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
            MaxPayload 128 bytes, MaxReadReq 512 bytes
        DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
        LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <2us, L1 <64us
            ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-
        LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- CommClk+
            ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
        LnkSta: Speed 2.5GT/s (ok), Width x1 (ok)
            TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        DevCap2: Completion Timeout: Not Supported, TimeoutDis+, NROPrPrP-, LTR+
             10BitTagComp-, 10BitTagReq-, OBFF Via message/WAKE#, ExtFmt-, EETLPPrefix-
             EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
             FRS-, TPHComp-, ExtTPHComp-
             AtomicOpsCap: 32bit- 64bit- 128bitCAS-
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis+, LTR+, OBFF Disabled
             AtomicOpsCtl: ReqEn-
        LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
             EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
    Capabilities: [100 v2] Advanced Error Reporting
        UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
        CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
        AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
            MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
        HeaderLog: 00000000 00000000 00000000 00000000
    Capabilities: [148 v1] Device Serial Number 00-e0-4c-ff-fe-c8-21-01
    Capabilities: [158 v1] Latency Tolerance Reporting
        Max snoop latency: 3145728ns
        Max no snoop latency: 3145728ns
    Capabilities: [160 v1] L1 PM Substates
        L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
              PortCommonModeRestoreTime=30us PortTPowerOnTime=60us
        L1SubCtl1: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+
               T_CommonMode=0us LTR1.2_Threshold=98304ns
        L1SubCtl2: T_PwrOn=60us
    Capabilities: [170 v1] Precision Time Measurement
        PTMCap: Requester:- Responder:+ Root:-
        PTMClockGranularity: Unimplemented
        PTMControl: Enabled:+ RootSelected:-
        PTMEffectiveGranularity: Unknown
    Capabilities: [17c v1] Vendor Specific Information: ID=0003 Rev=1 Len=054 <?>
    Kernel driver in use: rtl8821ce
    Kernel modules: rtw88_8821ce, 8821ce, rtl8821ce

inxi -F

root@redox:/home/kein# inxi -F
System:    Host: redox Kernel: 5.11.0-46-generic x86_64 bits: 64 Desktop: Cinnamon 5.2.7 
           Distro: Linux Mint 20.3 Una 
Machine:   Type: Laptop System: HP product: HP Laptop 15s-fq2xxx v: N/A serial: 5CD117CYJ3 
           Mobo: HP model: 87FE v: 57.16 serial: PKWHH028JF4EOO UEFI: AMI v: F.09 date: 02/19/2021 
Battery:   ID-1: BAT0 charge: 39.6 Wh condition: 39.6/41.0 Wh (97%) 
CPU:       Topology: Dual Core model: 11th Gen Intel Core i3-1115G4 bits: 64 type: MT MCP 
           L2 cache: 6144 KiB 
           Speed: 1200 MHz min/max: 400/4100 MHz Core speeds (MHz): 1: 1200 2: 1201 3: 1201 
           4: 1201 
Graphics:  Device-1: Intel driver: i915 v: kernel 
           Display: server: X.Org 1.20.13 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa Intel UHD Graphics (TGL GT2) 
           v: 4.6 Mesa 22.1.0-devel (git-ffdac8b 2022-02-15 focal-oibaf-ppa) 
Audio:     Device-1: Intel driver: sof-audio-pci 
           Sound Server: ALSA v: k5.11.0-46-generic 
Network:   Device-1: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter driver: rtl8821ce 
           IF: wlo1 state: dormant mac: ec:2e:98:08:89:25 
           Device-2: Huawei E33372 LTE/UMTS/GSM HiLink Modem/Networkcard type: USB 
           driver: cdc_ether,usb-storage 
           IF: enx0c5b8f279a64 state: up speed: N/A duplex: N/A mac: 0c:5b:8f:27:9a:64 
Drives:    Local Storage: total: 238.47 GiB used: 111.26 GiB (46.7%) 
           ID-1: /dev/nvme0n1 vendor: SK Hynix model: BC511 HFM256GDJTNI-82A0A size: 238.47 GiB 
RAID:      Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd 
Partition: ID-1: / size: 233.24 GiB used: 111.26 GiB (47.7%) fs: ext4 dev: /dev/nvme0n1p2 
Sensors:   System Temperatures: cpu: 50.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 248 Uptime: 1d 5m Memory: 7.42 GiB used: 2.66 GiB (35.8%) Shell: bash 
           inxi: 3.0.38 

I also tried:

sudo modprobe -r rtw_8821ce
sudo modprobe -r 8821ce
sudo modprobe -r rtl8821ce
sudo modprobe rtl8821ce

And

sudo modprobe -r rtw_8821ce
sudo modprobe -r 8821ce
sudo modprobe -r rtl8821ce
sudo modprobe rtw_8821ce

And

sudo modprobe -r rtw_8821ce
sudo modprobe -r 8821ce
sudo modprobe -r rtl8821ce
sudo modprobe 8821ce

But it doesn't work too

root@redox:/home/kein# rfkill
ID TYPE DEVICE    SOFT      HARD
1 wlan phy1   blocked unblocked

Another info

root@redox:/home/kein# dkms status
rtl8821ce, 5.5.2.1, 5.11.0-46-generic, x86_64: built
rtl8821ce, 5.5.2.1, 5.4.0-91-generic, x86_64: built
rtl8821ce, v5.5.2_34066.20200325, 5.11.0-46-generic, x86_64: installed (WARNING! Diff between built and installed module!)

dmesg [ 3.915477] Error: Driver 'rtl8821ce' is already registered, aborting... $ dmesg | grep 'RTL: rtl:'

abkein commented 2 years ago

Secure boot is disabled

root@redox:/home/kein/repos/rtl8821ce# mokutil --sb-state
SecureBoot disabled

I've enabled debug in Makefile

abkein commented 2 years ago

Installation log

root@redox:/home/kein/repos/rtl8821ce# ./dkms-install.sh 
About to run dkms install steps...

Creating symlink /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/source ->
                 /usr/src/rtl8821ce-v5.5.2_34066.20200325

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
'make' -j4 KVER=5.11.0-46-generic..................
Signing module:
 - /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/5.11.0-46-generic/x86_64/module/8821ce.ko
Secure Boot not enabled on this system.
cleaning build area...

DKMS: build completed.

8821ce.ko:
Running module version sanity check.

Good news! Module version v5.5.2_34066.20200325_COEX20180712-3232 for 8821ce.ko
exactly matches what is already found in kernel 5.11.0-46-generic.
DKMS will not replace this module.
You may override by specifying --force.

depmod...

DKMS: install completed.
Finished running dkms install steps.
ganler commented 2 years ago

Got the same problem on Ubuntu 20.04 (kernel = 5.13). The wifi can work but the bluetooth cannot...

ghost commented 2 years ago

Check the readme, there's a bluetooth section

ushby commented 2 years ago

Some of the debugging steps on the documentation of this repository in itself might cause bluetooth conflicts

Before anything install bluez to see if it will do it on your behalf, sudo apt-get install bluez Run bluez from menu and enable using gui..

If not then, attempt to restart, enable and then start again by the following : sudo systemctl restart bluetooth ; sudo systemctl enable bluetooth ; sudo systemctl start bluetooth

Check status sudo systemctl status bluetooth

Does rfkill list bluetooth show you anything ?

ninadnaik10 commented 9 months ago

Facing the exact same issue with 8821ce, wifi is working but bluetooth not sudo inxi -Fxxxrz shows

System:
  Kernel: 5.15.0-94-generic x86_64 bits: 64 compiler: gcc v: 11.4.0
    Desktop: Cinnamon 5.6.8 tk: GTK 3.24.33 wm: muffin dm: GDM3 42.0
    Distro: Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy
Machine:
  Type: Laptop System: HP product: HP Laptop-dr0001TU v: Type1ProductConfigId
    serial: <filter> Chassis: type: 10 serial: <filter>
  Mobo: HP model: 85EF v: 36.41 serial: <filter> UEFI: Insyde v: F.61
    date: 05/19/2023
Battery:
  ID-1: BAT1 charge: 21.7 Wh (99.1%) condition: 21.9/42.1 Wh (52.1%)
    volts: 12.7 min: 11.6 model: Hewlett-Packard PABAS0241231 type: Li-ion
    serial: <filter> status: Charging
CPU:
  Info: dual core model: Intel Core i3-8145U bits: 64 type: MT MCP
    smt: enabled arch: Comet/Whiskey Lake note: check rev: C cache: L1: 128 KiB
    L2: 512 KiB L3: 4 MiB
  Speed (MHz): avg: 700 min/max: 400/3900 volts: 0.7 V ext-clock: 100 MHz
    cores: 1: 700 2: 700 3: 700 4: 700 bogomips: 18399
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel WhiskeyLake-U GT2 [UHD Graphics 620]
    vendor: Hewlett-Packard driver: i915 v: kernel ports: active: eDP-1
    empty: DP-1,HDMI-A-1,HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:3ea0
    class-ID: 0300
  Device-2: Quanta HP TrueVision HD Camera type: USB driver: uvcvideo
    bus-ID: 1-5:2 chip-ID: 0408:5365 class-ID: 0e02
  Display: server: X.Org v: 1.21.1.4 driver: X: loaded: modesetting
    unloaded: fbdev,vesa gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2")
    s-diag: 582mm (22.9")
  Monitor-1: eDP-1 model: Chi Mei Innolux res: 1920x1080 hz: 60 dpi: 142
    size: 344x193mm (13.5x7.6") diag: 394mm (15.5") modes: 1920x1080
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (WHL GT2)
    v: 4.6 Mesa 23.0.4-0ubuntu1~22.04.1 direct render: Yes
Audio:
  Device-1: Intel Cannon Point-LP High Definition Audio
    vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus-ID: 00:1f.3
    chip-ID: 8086:9dc8 class-ID: 0403
  Sound Server-1: ALSA v: k5.15.0-94-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8169 v: kernel pcie: speed: 2.5 GT/s
    lanes: 1 port: 4000 bus-ID: 01:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: eno1 state: down mac: <filter>
  Device-2: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter
    vendor: Hewlett-Packard driver: rtl8821ce v: v5.5.2.1_35598.20191029 pcie:
    speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:c821
    class-ID: 0280
  IF: wlo1 state: up mac: <filter>
  IF-ID-1: virbr0 state: down mac: <filter>
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
    v: 3.0 port: 5060 bus-ID: 00:17.0 chip-ID: 8086:282a rev: N/A
    class-ID: 0104
Drives:
  Local Storage: total: 1.36 TiB used: 39.81 GiB (2.8%)
  ID-1: /dev/nvme0n1 vendor: Kingston model: SNVS500G size: 465.76 GiB
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: S8J41100
    temp: 33.9 C scheme: GPT
  ID-2: /dev/sda vendor: Toshiba model: MQ04ABF100 size: 931.51 GiB
    speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter> rev: 4C scheme: GPT
Partition:
  ID-1: / size: 73.09 GiB used: 39.74 GiB (54.4%) fs: ext4
    dev: /dev/nvme0n1p6
  ID-2: /boot/efi size: 96 MiB used: 76.2 MiB (79.4%) fs: vfat
    dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: 29.8 C pch: 41.0 C mobo: 27.8 C
  Fan Speeds (RPM): N/A
dubhater commented 9 months ago

Maybe the kernel is too old.

This repository only provides the wifi driver. The bluetooth driver is separate, and part of the kernel (btrtl).

dubhater commented 9 months ago

I found this: https://github.com/radxa/rtkbt

It claims to support up to kernel 5.10, but maybe it compiles for 5.15 too. If not, you can open an issue there.