Both work on windows but none on Ubuntu 14.04 LTS

  • kernel 4.4.0-137-generic #163~ 14.04.1-Ubuntu SMP x86_64
  • GRUB options: ro quiet splash vt.handoff=7
  • identified as Realtek RTL8822BE 802.11ac PCIe wireless network adapters.

If I go to settings, select Bluetooth and try to enable it nothing happens.

$ lspci -knn | grep -i net -A3 
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
    Subsystem: ASUSTeK Computer Inc. Device [1043:200f]
    Kernel driver in use: r8169
03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:b822]
    Subsystem: AzureWave Device [1a3b:2950]

$lsmod | grep rtl
btrtl                  16384  1 btusb
bluetooth             540672  17 
btrtl,hci_uart,btintel,btqca,bnep,btbcm,rfcomm,btusb

$Error when turning laptop on Ubuntu
[    23.804997] tpm_crb MSFT0101:00: [Firmware Bug]: ACPI region does not cover t
sponse buffer. [mem 0xfed400000-0xfed4087f flags 0x201] vs fed 40080 f80
[    23.805039] tpm_crb MSFT0101:00: [Firmware Bug]: ACPI region does not cover t
sponse buffer. [mem 0xfed400000-0xfed4087f flags 0x201] vs fed 40080 f80
[    24.790248] r8822be: Selected firmware is not available

$dmesg --level=err,warn
[    0.044039] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[    0.044040] ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)
[    0.625867] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[    0.640341] i8042: PNP: PS/2 appears to have AUX port disabled, if 
this is incorrect please boot with i8042.nopnp
[    0.725243] r8169 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
[   17.963317] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[   18.048745] tpm_crb MSFT0101:00: [Firmware Bug]: ACPI region does not cover the entire command/response buffer. [mem 0xfed40000-0xfed4087f flags 0x201] vs fed40080 f80
[   18.048816] tpm_crb MSFT0101:00: [Firmware Bug]: ACPI region does not cover the entire command/response buffer. [mem 0xfed40000-0xfed4087f flags 0x201] vs fed40080 f80
[   18.628287] i2c_hid i2c-ELAN1200:00: i2c-ELAN1200:00 supply vdd not found, using dummy regulator
[   18.718771] i915 0000:00:02.0: Direct firmware load for i915/kbl_dmc_ver1_01.bin failed with error -2
[   19.295390] r8822be: module is from the staging directory, the quality is unknown, you have been warned.
[   19.755793] uvcvideo 1-6:1.0: Entity type for entity Extension 4 was not initialized!
[   19.755795] uvcvideo 1-6:1.0: Entity type for entity Processing 2 was not initialized!
[   19.755795] uvcvideo 1-6:1.0: Entity type for entity Camera 1 was not initialized!
[   23.734167] init: failsafe main process (713) killed by TERM signal
[   24.975378] init: cups main process (834) killed by HUP signal
[   24.975386] init: cups main process ended, respawning
[   25.655309] init: samba-ad-dc main process (888) terminated with status 1
[   27.876713] init: mongodb main process (995) terminated with status 100
[   29.044999] init: plymouth-upstart-bridge main process ended, respawning
[   29.048690] init: plymouth-upstart-bridge main process (1176) terminated with status 1
[   29.048698] init: plymouth-upstart-bridge main process ended, respawning
[   34.387832] r8822be: [ERR]Pwr cmd polling timeout!!
[   34.387835] r8822be: [ERR]Pwr cmd offset : 5!!
[   34.387836] r8822be: [ERR]Pwr cmd value : 0!!
[   34.387837] r8822be: [ERR]Pwr cmd msk : 2!!
[   34.387837] r8822be: [ERR]Read offset = 5 value = 2!!
[   34.387838] r8822be: [Err]pwr sub seq parser fail, status = 0x28!
[   34.387839] r8822be: Handle power off cmd error
[   50.999015] r8822be: halmac_init_hal failed
[   50.999137] r8822be: halmac_init_hal failed
[   50.999254] r8822be: halmac_init_hal failed
[   50.999371] r8822be: halmac_init_hal failed
[   50.999488] r8822be: halmac_init_hal failed
[   50.999604] r8822be: halmac_init_hal failed
[   50.999720] r8822be: halmac_init_hal failed
[   50.999854] r8822be: halmac_init_hal failed
[   50.999969] r8822be: halmac_init_hal failed
[   51.000084] r8822be: halmac_init_hal failed
[   51.000116] return H2C cmd because of Fw download fail!!!
[   51.000131] ------------[ cut here ]------------
[   51.000141] WARNING: CPU: 3 PID: 1103 at /home/kernel/COD/linux/drivers/staging/rtlwifi/rtl8822be/fw.c:239 rtl8822be_fill_h2c_cmd+0x1ac/0x610 [r8822be]
[   51.000142] Modules linked in: bnep rfcomm binfmt_misc nls_iso8859_1 intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel snd_hda_codec_hdmi snd_soc_skl snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp snd_hda_ext_core kvm snd_soc_sst_match snd_soc_core irqbypass snd_compress ac97_bus snd_pcm_dmaengine crct10dif_pclmul crc32_pclmul asus_nb_wmi ghash_clmulni_intel joydev snd_hda_codec_generic pcbc snd_hda_intel asus_wmi hid_multitouch spi_pxa2xx_platform wmi_bmof snd_hda_codec aesni_intel sparse_keymap 8250_dw aes_x86_64 crypto_simd xpad ff_memless snd_hda_core glue_helper uvcvideo snd_hwdep snd_pcm cryptd videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core videodev media snd_seq_midi snd_seq_midi_event arc4 snd_rawmidi intel_cstate snd_seq snd_seq_device intel_rapl_perf
[   51.000161]  snd_timer hci_uart btusb r8822be(C) serdev btrtl btbcm btqca btintel bluetooth mac80211 snd cfg80211 ecdh_generic input_leds soundcore i915 serio_raw i2c_hid wmi drm_kms_helper mac_hid drm int3403_thermal i2c_algo_bit fb_sys_fops syscopyarea sysfillrect sysimgblt video idma64 virt_dma processor_thermal_device int340x_thermal_zone pinctrl_sunrisepoint acpi_pad pinctrl_intel parport_pc asus_wireless shpchp intel_lpss_pci intel_lpss_acpi acpi_als kfifo_buf industrialio intel_soc_dts_iosf ppdev tpm_crb lp int3400_thermal parport intel_pch_thermal acpi_thermal_rel mei_me intel_lpss mei hid_generic usbhid hid r8169 ahci mii libahci
[   51.000183] CPU: 3 PID: 1103 Comm: wpa_supplicant Tainted: G         C      4.14.0-041400-generic #201711122031
[   51.000184] Hardware name: ASUSTeK COMPUTER INC. X405UA/X405UA, BIOS X405UA.203 05/05/2017
[   51.000184] task: ffff8e07c0561780 task.stack: ffffb45241248000
[   51.000190] RIP: 0010:rtl8822be_fill_h2c_cmd+0x1ac/0x610 [r8822be]
[   51.000191] RSP: 0018:ffffb4524124b800 EFLAGS: 00010286
[   51.000192] RAX: 000000000000002d RBX: ffff8e07d2281560 RCX: 0000000000000006
[   51.000192] RDX: 0000000000000000 RSI: 0000000000000086 RDI: ffff8e07ded8dc90
[   51.000193] RBP: ffffb4524124b878 R08: 0000000000000001 R09: 0000000000000386
[   51.000193] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8e07d1450600
[   51.000194] R13: ffff8e07d2280780 R14: ffff8e07d22815c8 R15: ffff8e07d22810e8
[   51.000195] FS:  00007f3273897740(0000) GS:ffff8e07ded80000(0000) knlGS:0000000000000000
[   51.000195] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   51.000196] CR2: 0000555a6c2e3198 CR3: 00000001c45e9003 CR4: 00000000003606e0
[   51.000196] Call Trace:
[   51.000205]  halbtc_fill_h2c_cmd+0x29/0x30 [r8822be]
[   51.000212]  halbtc8822b1ant_query_bt_info+0x46/0xa0 [r8822be]
[   51.000218]  ex_btc8822b1ant_ips_notify+0xa4/0x150 [r8822be]
[   51.000224]  exhalbtc_ips_notify+0x5a/0x60 [r8822be]
[   51.000231]  rtl_btc_ips_notify+0x26/0x50 [r8822be]
[   51.000236]  rtl_ips_nic_on+0xac/0xc0 [r8822be]
[   51.000240]  rtl_op_config+0x23a/0x470 [r8822be]
[   51.000250]  ieee80211_hw_config+0x1c0/0x350 [mac80211]
[   51.000258]  ieee80211_recalc_idle+0x22/0x30 [mac80211]
[   51.000265]  __ieee80211_start_scan+0x1b6/0x6d0 [mac80211]
[   51.000272]  ieee80211_request_scan+0x30/0x50 [mac80211]
[   51.000280]  ieee80211_scan+0x69/0x90 [mac80211]
[   51.000290]  nl80211_trigger_scan+0x67d/0x7e0 [cfg80211]
[   51.000292]  genl_family_rcv_msg+0x1f5/0x3e0
[   51.000294]  genl_rcv_msg+0x4c/0x90
[   51.000295]  ? genl_family_rcv_msg+0x3e0/0x3e0
[   51.000296]  netlink_rcv_skb+0x91/0x130
[   51.000297]  genl_rcv+0x28/0x40
[   51.000298]  netlink_unicast+0x18e/0x220
[   51.000299]  netlink_sendmsg+0x2c5/0x3c0
[   51.000301]  sock_sendmsg+0x38/0x50
[   51.000302]  ___sys_sendmsg+0x29a/0x2f0
[   51.000305]  ? __fpu__restore_sig+0x96/0x470
[   51.000306]  __sys_sendmsg+0x54/0x90
[   51.000308]  ? __sys_sendmsg+0x54/0x90
[   51.000309]  SyS_sendmsg+0x12/0x20
[   51.000311]  entry_SYSCALL_64_fastpath+0x1e/0xa9
[   51.000312] RIP: 0033:0x7f3272127160
[   51.000312] RSP: 002b:00007fff09bb3dc8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
[   51.000313] RAX: ffffffffffffffda RBX: 000000000253c120 RCX: 00007f3272127160
[   51.000314] RDX: 0000000000000000 RSI: 00007fff09bb3df0 RDI: 0000000000000007
[   51.000314] RBP: 000000000253ee00 R08: 0000000000000001 R09: 000000000000000f
[   51.000315] R10: 00007f32723e8fe0 R11: 0000000000000246 R12: 00007fff09bb3e40
[   51.000315] R13: 0000000002541b50 R14: 00000000000000d7 R15: 000000000253c610
[   51.000316] Code: 00 00 00 48 89 c6 75 b1 48 89 c6 4c 89 e7 e8 ec db 68 e6 e9 5b ff ff ff 48 c7 c7 70 5d 91 c0 c6 05 65 df 09 00 01 e8 25 b2 e3 e5 <0f> ff e9 92 fe ff ff c6 83 14 09 00 00 01 48 89 c6 4c 89 e7 e8 
[   51.000334] ---[ end trace 1353df30adbe2664 ]---
[   56.701963] r8822be: [ERR]Pwr cmd polling timeout!!
[   56.701966] r8822be: [ERR]Pwr cmd offset : 5!!
[   56.701967] r8822be: [ERR]Pwr cmd value : 0!!
[   56.701968] r8822be: [ERR]Pwr cmd msk : 2!!
[   56.701968] r8822be: [ERR]Read offset = 5 value = 2!!
[   56.701969] r8822be: [Err]pwr sub seq parser fail, status = 0x28!
[   56.701970] r8822be: Handle power off cmd error
[   83.982092] r8822be: halmac_init_hal failed
[   83.982213] r8822be: halmac_init_hal failed
[   83.982332] r8822be: halmac_init_hal failed
[   83.982449] r8822be: halmac_init_hal failed
[   83.982567] r8822be: halmac_init_hal failed
[   83.982683] r8822be: halmac_init_hal failed
[   83.982799] r8822be: halmac_init_hal failed
[   83.982916] r8822be: halmac_init_hal failed
[   83.983032] r8822be: halmac_init_hal failed
[   83.983149] r8822be: halmac_init_hal failed
[   89.860907] r8822be: [ERR]Pwr cmd polling timeout!!
[   89.860919] r8822be: [ERR]Pwr cmd offset : 5!!
[   89.860924] r8822be: [ERR]Pwr cmd value : 0!!
[   89.860927] r8822be: [ERR]Pwr cmd msk : 2!!
[   89.860930] r8822be: [ERR]Read offset = 5 value = 2!!
[   89.860933] r8822be: [Err]pwr sub seq parser fail, status = 0x28!
[   89.860937] r8822be: Handle power off cmd error
[  126.960076] r8822be: halmac_init_hal failed
[  126.960212] r8822be: halmac_init_hal failed
[  126.960343] r8822be: halmac_init_hal failed
[  126.960474] r8822be: halmac_init_hal failed
[  126.960604] r8822be: halmac_init_hal failed
[  126.960735] r8822be: halmac_init_hal failed
[  126.960866] r8822be: halmac_init_hal failed
[  126.960996] r8822be: halmac_init_hal failed
[  126.961153] r8822be: halmac_init_hal failed
[  126.961290] r8822be: halmac_init_hal failed
[  132.887637] r8822be: [ERR]Pwr cmd polling timeout!!
[  132.887640] r8822be: [ERR]Pwr cmd offset : 5!!
[  132.887641] r8822be: [ERR]Pwr cmd value : 0!!
[  132.887642] r8822be: [ERR]Pwr cmd msk : 2!!
[  132.887643] r8822be: [ERR]Read offset = 5 value = 2!!
[  132.887643] r8822be: [Err]pwr sub seq parser fail, status = 0x28!
[  132.887644] r8822be: Handle power off cmd error
[  179.934289] r8822be: halmac_init_hal failed
[  179.934452] r8822be: halmac_init_hal failed
[  179.934604] r8822be: halmac_init_hal failed
[  179.934760] r8822be: halmac_init_hal failed
[  179.934911] r8822be: halmac_init_hal failed
[  179.935063] r8822be: halmac_init_hal failed
[  179.935213] r8822be: halmac_init_hal failed
[  179.935364] r8822be: halmac_init_hal failed
[  179.935515] r8822be: halmac_init_hal failed
[  179.935664] r8822be: halmac_init_hal failed
[  186.002951] r8822be: [ERR]Pwr cmd polling timeout!!
[  186.002958] r8822be: [ERR]Pwr cmd offset : 5!!
[  186.002960] r8822be: [ERR]Pwr cmd value : 0!!
[  186.002962] r8822be: [ERR]Pwr cmd msk : 2!!
[  186.002963] r8822be: [ERR]Read offset = 5 value = 2!!
[  186.002965] r8822be: [Err]pwr sub seq parser fail, status = 0x28!
[  186.002967] r8822be: Handle power off cmd error
[  242.905678] r8822be: halmac_init_hal failed
[  242.905827] r8822be: halmac_init_hal failed
[  242.905970] r8822be: halmac_init_hal failed
[  242.906110] r8822be: halmac_init_hal failed
[  242.906250] r8822be: halmac_init_hal failed
[  242.906389] r8822be: halmac_init_hal failed
[  242.906528] r8822be: halmac_init_hal failed
[  242.906670] r8822be: halmac_init_hal failed
[  242.906809] r8822be: halmac_init_hal failed
[  242.906949] r8822be: halmac_init_hal failed
[  248.988222] r8822be: [ERR]Pwr cmd polling timeout!!
[  248.988234] r8822be: [ERR]Pwr cmd offset : 5!!
[  248.988238] r8822be: [ERR]Pwr cmd value : 0!!
[  248.988241] r8822be: [ERR]Pwr cmd msk : 2!!
[  248.988245] r8822be: [ERR]Read offset = 5 value = 2!!
[  248.988248] r8822be: [Err]pwr sub seq parser fail, status = 0x28!
[  248.988252] r8822be: Handle power off cmd error

$ lsmod | grep 8822
r8822be               839680  0 
mac80211              778240  1 r8822be
cfg80211              614400  2 mac80211,r8822be

$ rfkill list
0: hci0: Bluetooth
Soft blocked: yes
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no

$ ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 88:d7:f6:da:78:e2 brd ff:ff:ff:ff:ff:ff
3: wlan1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
link/ether 40:9f:38:28:41:a9 brd ff:ff:ff:ff:ff:ff

$lspci -knn | grep -i net -A3

02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
Subsystem: ASUSTeK Computer Inc. Device [1043:200f]
Kernel driver in use: r8169
03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:b822] (rev ff)
Kernel driver in use: r8822be

$make
make -C /lib/modules/4.14.0-041400-generic/build 
M=/home/julio/rtlwifi-next modules
make[1]: Entering directory `/usr/src/linux-headers-4.14.0-041400-generic'
CC [M]  /home/julio/rtlwifi-next/rtl8188ee/trx.o
/home/julio/rtlwifi-next/rtl8188ee/trx.c: In function ‘rtl88ee_rx_query_desc’:
/home/julio/rtlwifi-next/rtl8188ee/trx.c:447:22: error: ‘RX_FLAG_40MHZ’ undeclared (first use in this function)
 rx_status->flag |= RX_FLAG_40MHZ;
                  ^
/home/julio/rtlwifi-next/rtl8188ee/trx.c:447:22: note: each undeclared identifier is reported only once for each function it appears in
/home/julio/rtlwifi-next/rtl8188ee/trx.c:450:22: error: ‘RX_FLAG_HT’ undeclared (first use in this function)
 rx_status->flag |= RX_FLAG_HT;
                  ^
make[3]: *** [/home/julio/rtlwifi-next/rtl8188ee/trx.o] Error 1
make[2]: *** [/home/julio/rtlwifi-next/rtl8188ee] Error 2
make[1]: *** [_module_/home/julio/rtlwifi-next] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-4.14.0-041400-generic'
make: *** [all] Error 2

1. Use your kernel and compile rtl8822be

sudo apt install build-essential git
git clone https://github.com/rtlwifi-linux/rtlwifi-next
cd rtlwifi-next
make
sudo make install
sudo modprobe rtl8822be

Some hints from Ubuntu Forum:

The second can't compile without making a little change in the source code. The change is to add the line

#define IEEE80211_NUM_BANDS NUM_NL80211_BANDS

in two files:

  • in wifi.h after

    #ifndef __RTL_WIFI_H__
    #define __RTL_WIFI_H__
    
  • in base.c before

    #include lines
    

2. Install kernel 4.14 and rtl8822 firmware

As an alternative use this solution which includes a kernel update!

The mainline kernels do not include any Ubuntu-provided drivers or patches. They are not supported and are not appropriate for production use.

See this link for supported kernels, for Ubuntu 14.04.5 the newest and last kernel is 4.4.

  1. Install the latest 4.14 kernel with the driver code, (from the instructions here)

    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14/linux-headers-4.14.0-041400_4.14.0-041400.201711122031_all.deb
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14/linux-headers-4.14.0-041400-generic_4.14.0-041400.201711122031_amd64.deb
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14/linux-image-4.14.0-041400-generic_4.14.0-041400.201711122031_amd64.deb
    
    sudo dpkg -i linux*.deb
    
  2. Download the rtl8822befw.bin firmware file from here:

    wget https://github.com/wkennington/linux-firmware/raw/master/rtlwifi/rtl8822befw.bin
    

    Paradoxically the bin differs from the realteak driver page, and seems not to work:

    # wget  https://github.com/rtlwifi-linux/rtlwifi-next/tree/master/firmware/rtlwifi/rtl8822befw.bin # non-working - use the one above
    
  3. Move it into /lib/firmware/rtlwifi. Please note newer distributions may have this file already in here.

    sudo cp rtl8822befw.bin /lib/firmware/rtlwifi/
    
  4. Reboot.


rtl8822be is supported since kernel > 4.9-rc1 (see kconfig-v4.16). Otherwise you have to compile it manually.

The RTL8822BE is a new Realtek wifi and BT device. Support for the BT part is hereby added.

As this device is similar to most of the other Realtek BT devices, the changes are minimal. The main difference is that the 8822BE needs a configuration file for enabling and disabling features. Thus code is added to select and load this configuration file. Although not needed at the moment, hooks are added for the other devices that might need such configuration files.

One additional change is to the routine that tests that the project ID contained in the firmware matches the hardware. As the project IDs are not sequential, continuing to use the position in the array as the expected value of the ID would require adding extra unused entries in the table, and any subsequant rearrangment of the array would break the code. To fix these problems, the array elements now contain both the hardware ID and the expected value for the project ID.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.