How to enable WIFI on a NitroPC | Realtek RTL8821CE

Since some time I run a NitroPC as my desktop machine using qubes os 4.0 on a LAN line.
It has a built-in WIFI adapter that does not run out of the box due to a missing kernel module.
My sys-net is based on the fedora-33 template.

I solved the issue by adding the missing driver to the template. My information comes from this post:
https://ask.fedoraproject.org/t/install-realtek-rtl8821ce-wifi-driver/9170

Open a terminal on the fedora-33 template. Then issue the following commands:

sudo dnf update
sudo dnf install dkms make kernel-devel -y
git clone https://github.com/tomaspinho/rtl8821ce.git
cd rtl8821ce/
sudo ./dkms-install.sh 
exit

and reboot your machine.

Security remark: Only do it if you trust the cloned git repository. At least I did not find a package to install from official sources.

Please give any remarks / improvements. Hope my comment is helpful for somebody.

Hi,

In sys-net Qubes settings :

  1. I set Virtualization mode on PV in place of HVM
  2. I moved Connections from Available Applications to Selected
  3. I was then able to create a (USB) tethering connection with my smartphone to (see sys-net started at reboot then have been able to) use those command lines

In the fedora template :

      sudo dnf update
      sudo dnf install dkms make kernel-devel -y
      git clone https://github.com/tomaspinho/rtl8821ce.git
      cd rtl8821ce/
      sudo ./dkms-install.sh 
      exit

BUT, before going further, at the command line : git clone …
I received the error :
“fatal: unable to access ‘GitHub - tomaspinho/rtl8821ce’: Could not resolve host: github.com

Stopped by this error I read here below the recommandations of DVM and set the “provide by qube” kernel as explained. After a reboot sys-net did not started and when I did a qvm-start sys-net in dom0 ot returned : Start failed: internal error: libxenlight failed ro create new domain ‘sys-net’, see /var/log/libvirt/libxl/libxl-driver.log

I am not surprised due to the fact I was not able to finalize the previous command lines at the git clone.

So how could I solve this git clone resolve problem ?

How to solve this please ?

Have a nice day.

Instead of using PV, which exposes the hypervisor to attack, have you tried HVM with kernel provided by qube and memory balancing disabled?

Dear DVM,

I did not know what you are talking about.
I just now set now the “provided by qube” default kernel you mentionned.

But in regard of the memory balancing there is no way to disable it. There is a “Minimum qube memory” value and a “Additional dom0 memory” one. Where could I disable it ?

Thanks for your answers.

Have a nice day.

It’s a checkbox under it, set it like that:
2023-07-25-174039

Dear DVM,

then I just find out now (during you was answering this) that you was talking about memory balancing in sys-net Qubes settings (I just saw already disabled by default) and not in the Qubes Global Settings where I previously changed it in the “Default kernel used by qubes” and where I changed it to “provided by qubes”. OMG.

I supposed you previously also talkzed about “provided by qube” kernel on this sys-net Qubes settings and not in the Qubes Global Settings.
Then I set it back on this Global to the 5.15.94-1.f 32 and set the sys-net kernel to your recommanded “provided by qube”.

I rebooted with your sys-net Qubes settings (provided by qube kernel and already disabled memory balancing.

Now sys-net start at boot but did not connect in wireless to my router even the fact I set the router ssid and pwd and saw the connection perfectly set to “Connect automatically with priority 0”.
Then I disabled the “Enable networking” (by righrt clicking on the network icon available in the systray) but when I enable it back to see if it will try to connect to a network it just displayed the message : “Disconnected The network connection has been disconnected”.
It does not say that when I disable it but well when I enable it (it reverse the message)…

When I right click the NetworkManager it just offer me to enable/disable Networking and Notifications.
I mean it does not display an item allowing to enable/disable wifi… and this even if I created a wifi connections through the Edit connections item (NetworkManager) menu.

Dear DVM,

Because I saw that sys-net is based on fedora-template…
As you said I set sys-net the kernel setting to “provided by qube” and have memory balancing disabled with HVM virtualization mode

But I saw that fedora-template has not memory balancing disabled and the kernel is to the default 5.15.94-1.fc32 (then not to the “provided by qube” too).

Is it ok with that ?

This is a normal behavior, template have no networking access. You have to download this git repository to a different vm and then copy or move the folder using qvm-copy (or qvm-move) to the template, then you will be able to run the script.

Set the template to the same kernel (provided by qube), then do your building steps inside it.

Ok. That will be foe tomorow because I use a tethering for this internet download on the concerned laptop.

Please read back my 20 min ago end text concerning the NetworkManager (unexisting) wifi item menu.

Have a good night and sincerely thank you for your support until now. I learned more even if it still does not work :wink:

I hope to get it working because I will not be able to go back to a classic distribution :wink:

Dear all,

Today I tried to go further by running the dkms-install.sh in the fedora template as recommanded here above.

As its script returned an error saying :
sudo: ./dkms-install.sh: command not found

I successfully ran (with sudo) the four lines (cp then the three dkms command lines) you can read in this sh script.

Afterthat I rebooted and as I was still not able to see the “Enable WiFi” as item menu in the NetworkManager (from the systray) I forced (in dom0) a sys-net shutdown followed by a restart.

Nothing happend to give me the way to enable the wifi in the NetworManager.

Now I succefully installed the RTL8821CE (with this dkms-install command lines) how could I enavle the wifi ?

Sincerely thank you to whom could help me here.

Have a nice day.