Installing XUbuntu 18.04 on a HP 14-cf0013nf

(Comme beaucoup de références à cet article sont sur des pages françaises, je l’ai traduit.)

The installation of this laptop has two technical points: finding modules to handle correctly the combo wifi/bluetooth card, and setting VMware to use the Windows system of the disk.

Getting Wi-Fi and Bluetooth

The HP 14-cf0013nf contains an Intel® Core™ i3-7020U motherboard with a HD Graphics 620 graphic card. Both are perfectly handled by XUbuntu 18.04. This is however not the case for the Realtek RTL8723DE wifi/bluetooth card: it needs a few manipulations to get it to work well!

I found two solutions to get the Wi-Fi working (the Network Manager originally did not show any Wi-Fi, as the kernel module did not handle correctly the RTL8723DE card) :

  1. The solution the more widely recommended (including by HP) is to use the extended branch of Larry Finger’s rtlwifi_new GitHub repository. You can either get the archive on the page, or use git or svn to download the code.
    You can either make and install this code (make; sudo make install), or use dkms to do it (sudo dkms add ./rtlwifi_new; sudo dkms install rtlwifi-new/0.6). The second solution is better, as the module should be automatically recompile for every new kernel (if I understood well). You will need to install build-essential package, as well as dkms for the second solution.
    You can then use the module with sudo modprobe -v rtl8723de ant_sel=1, last argument setting which antenna you want to use (either 1 or 2, check which one is the better). Beware: this solution is not efficient for my laptop, as the Wi-Fi signal is much weaker (between 50 and 60 %) than under Windows on the same laptop, or under Xubuntu on other laptops.
  2. Looking for a way to have a better signal, I found in one of the issues of Larry Finger’s repository a reference to smlinux’s module, which is newer.
    I first had to remove the other module: sudo service NetworkManager stop; sudo rmmod -f rtl8723_common rtl8723de; sudo dkms uninstall rtlwifi-new/0.6; sudo dkms remove rtlwifi-new/0.6 --all; sudo service NetworkManager start.
    Once again, you can get the archive or download the code, and make and install it (make; sudo make install) or use dkms (sudo dkms add ./rtl8723de; sudo dkms install rtl8723de/ Starting this module (still with sudo modprobe -v rtl8723de ant_sel=#), the Wi-Fi signal is much better (similar to Windows or other laptops)!

For both solution, secure boot has to be disabled, or the module is not activated (and you get once again no Wi-Fi connection in the Network Manager). This may (it did for me) change the boot order, giving priority to MS boot loader (which starts Windows) instead of grub (which gives you the choice). You then need to restore the correct order in the Bios settings.

It is too bad none of these modules were proposed in a simpler way, as Dmitry Tunin’s module (indicated in the French list of Ubuntu checks on HP laptops) which is available as a package: sudo add-apt-repository ppa:hanipouspilot/rtlwifi; sudo apt-get update; sudo apt-get install rtlwifi-new-dkms; echo "options rtl8723be fwlps=1 ips=0 ant_sel=2" | sudo tee /etc/modprobe.d/rtl8723be.conf. This is an easier solution, but the module does not handle RTL8723DE, but instead RTL8723BE and others.

Getting the bluetooth was easier, thanks to Dmitry Tunin! Once again, the default module was not the good one: blueman did not have any adaptor. I found out a frightening discussion, but last post saved me: only a few commands are needed (sudo add-apt-repository ppa:hanipouspilot/bluetooth; sudo apt update; sudo apt install btrtl-rtl8723de-dkms) to solve all!

Setting VMware to use the disk system