Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No wifi driver for RTL8821CE #2841

Closed
bartlebi opened this issue Oct 18, 2023 · 7 comments
Closed

No wifi driver for RTL8821CE #2841

bartlebi opened this issue Oct 18, 2023 · 7 comments
Labels
board/ova Open Virtual Appliance (Virtual Machine) bug

Comments

@bartlebi
Copy link

bartlebi commented Oct 18, 2023

Describe the issue you are experiencing

Home Assistant OS appears to be missing wifi support for on-board wireless card RTL8821CE.
I am using Hassos in proxmox VA.
I have thrown a PCI device into the virtual machine, but HA does not see any wifi device.
I think there is a driver missing for this chip. What can I check or do on my end to solve the problem or may you just include driver in image?

What operating system image do you use?

OVA image

What version of Home Assistant Operating System is installed?

Home Assistant OS 11.0

Did you upgrade the Operating System.

Yes

Steps to reproduce the issue

Just boot

Anything in the Supervisor logs that might be useful for us?

No

Anything in the Host logs that might be useful for us?

No

System information

System Information

version core-2023.10.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.5
os_name Linux
os_version 6.1.56
arch x86_64
timezone Europe/Moscow
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4873
Installed Version 1.33.0
Stage running
Available Repositories 1313
Downloaded Repositories 18
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 11.0
update_channel stable
supervisor_version supervisor-2023.10.0
agent_version 1.6.0
docker_version 24.0.6
disk_total 30.8 GB
disk_used 8.3 GB
healthy true
supported true
board ova
supervisor_api ok
version_api ok
installed_addons Samba share (10.0.2), Terminal & SSH (9.7.1), Mosquitto broker (6.3.1), go2rtc (1.8.1), RPC Shutdown (2.4), SQLite Web (3.2.1), Zigbee2MQTT (1.33.1-1), Node-RED (14.6.2), MariaDB (2.6.1), File editor (5.6.0), go2rtc master hardware (master-hardware)
Dashboards
dashboards 3
resources 8
views 7
mode storage
Recorder
oldest_recorder_run 16 октября 2023 г. в 21:20
current_recorder_run 18 октября 2023 г. в 17:58
estimated_db_size 142.72 MiB
database_engine mysql
database_version 10.6.12
Xiaomi Gateway 3
version 3.3.2 (4efeaee)
Xiaomi Miot Auto
component_version 0.7.13
can_reach_server ok
can_reach_spec ok
logged_accounts 0
total_devices 0

Additional information

rtl8821ce 802.11ac pcie wireless network adapter

@bartlebi bartlebi added the bug label Oct 18, 2023
@sairon
Copy link
Member

sairon commented Oct 18, 2023

Coincidentally I just confirmed this card (to my understanding RTW and RTL are essentially the same cards) working today on a bare-bones install - there are some issues discussed in #2722 but I haven't been able to reproduce them either. Maybe there's some problem with the passthrough, can you check output of lspci and dmesg in the guest OS?

@bartlebi
Copy link
Author

As far as I could understand in the output lspci shows that it finds the device with codes 10ec:c821 at the same time in dmesg I see only information about connecting bluetooth module via USB with a similar chip but different VID/PID: 0bda:c821.

@bartlebi
Copy link
Author

bartlebi commented Oct 18, 2023

Read carefully and I see that it does find the pci device, but doesn't seem to be trying to use it.
I'll attach screen (cannot copy output).
image

Update: changed first message. I'm using ova image instead of generic x86-64

@bartlebi
Copy link
Author

I tried removing the pci device and rescan and here is all I see in dmesg afterwards
image

@sairon sairon added the board/ova Open Virtual Appliance (Virtual Machine) label Nov 16, 2023
@sairon
Copy link
Member

sairon commented Nov 16, 2023

I went back to look into this issue and sorry for the confusion earlier - the driver is actually enabled only for the generic_x86_64 target, not for ova. I will try enabling it there too and test if it works then.

@sairon
Copy link
Member

sairon commented Nov 20, 2023

Quick update here - I tried enabling the driver and tested it in Proxmox on my mini PC with RTL8821CE card, yet the WiFi driver fails to probe the device with a null pointer dereference error :( I might look into it a bit more later but currently there's no easy fix for you.

Out of curiosity, why do you prefer passthrough of the device to the guest OS, rather than setting up the networking on host (and potentially reusing it for other guests)? For Bluetooth it makes perfect sense, but I am curious what is the use case of having dedicated card for a single guest.

sairon added a commit that referenced this issue Nov 30, 2023
Preemptively enable larger set of WiFi drivers for all platforms and add more firmwares for them with the aim to harmonize WiFi device support among all boards and to have implicit support of devices that users might want to use.  Targets `generic_aarch64`, `generic_x86_64` and `ova` also include options and firmwares for cards that are using PCI/PCIe bus - support for these is in a separate config fragment.

Especially the `generic_x86_64` is currently very tight with the rootfs space, so I had to do some triaging and select only sensible drivers and firmwares - especially archaic PCMCIA devices or devices not supporting only 802.11g or lower standards were among the first that I removed during the triaging - we can consider enabling those but this time on an someone's explicit need to have them enabled.

This closes #2815 and replaces large part of #2761, also potentially addresses (at least) these: #2806, #2783, #2841, #2776, #2725, #2600

-------------

* Remove WiFi options from generic and board kernel config fragments
* Enable MMC in OVA kernel
   This is needed for SDIO drivers to work. Use the same options as we
   currently use for generic_x86_64.
* Add CRYPTO_MICHAEL_MIC to the common kernel config
   This is requirement for TKIP and is a dependency of ATH11K driver.
* Add kernel config fragments with wireless cards support
* Add firmwares for WiFi cards
* Enable more Bluetooth device drivers
@sairon
Copy link
Member

sairon commented Dec 4, 2023

The driver has been added to the OVA image, please report back if it doesn't work for you once it's released (it's currently available in development builds, the first beta release to contain it will be 11.3-rc.1).

@sairon sairon closed this as completed Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board/ova Open Virtual Appliance (Virtual Machine) bug
Projects
None yet
Development

No branches or pull requests

2 participants