Getting wifi, power management, and maybe also cameras working on venue 11 pro 5130 baytrail tablet

I just got a Dell Venue 11 pro 5130 tablet from ebay for taking notes. I found out that apparently Baytrail devices are weird and have a bunch of issues. I installed Fedora on it because that was one of the few distros I could find which could handle booting on 32 bit UEFI, other than Debian where packages have a tendancy to get a little older than I like. (Most 64 bit distros can’t boot on 32 bit UEFI, and most 32 bit distros seem to be BIOS only.) On mine, most things work out of the box, but there are a few notable issues that I’d like to fix.

Wifi did not work out of the box. It did not show up in lspci or lsusb, but I found in dmesg that it was complaining about being unable to load firmware ath6k/AR6004/hw3.0/bdata.bin. I checked, and there was a hw1.2 and hw1.3 folder, but no hw3.0 folder. To make it work, I had to download the two files in this folder of a github repo and place them in a hw3.0 folder that I made. However, this is not a full solution yet:

  • I can connect to open wifi and WPA2 wifi with pre-shared key, but cannot connect to WPA2 enterprise wifi. If I attempt to connect to a WPA2 enterprise network, the icon just spins around forever.
  • After a random amount of time (usually multiple hours after boot), the connection to the wifi will drop, and no networks will show up until I either reboot or after wait a really long time. If it comes back after a really long wait without a reboot, I see “ath6kl: firmware crashed” in dmesg, and it only works for a few more minutes before breaking again. It might or might not be correlated with pressing the power button (even though it’s not configured to put the tablet to sleep for reasons that will become clear later) and with attempting to connect to a WPA2 enterprise network. I tried disabling wifi power management with sudo iwconfig wlan0 power off because I’ve heard that wifi power saving can cause issues. It didn’t make a difference to the WPA2 enterprise issue, and it is too soon to tell whether it fixed the random wifi drops that I am guessing are caused by firmware crashes.
  • If it turns out that disabling wifi power saving is the solution, what is the best way to make it persistent? The most promising way I’ve found was this StackExchange answer (others seem to be either excessively complicated or to involve commands and directories that haven’t existed for years, such as those related to pre-systemd init systems). However, this file does not already exist on my system (though the rest of the path does), so I would be creating the file. Should I create that file, or is there a “Fedora way” to do it?
  • I don’t really like random files not being tracked by the package manager. I’m worried that I’ll eventually forget about them and then they might fall out of date or get overwritten by an update. Is there a package that provides these files? I can’t figure out how to search for that myself.
  • Even after I got the wifi working, it still doesn’t show up in lspci or lsusb, which I guess is not a problem as long as it works, but is still very weird. What other interface would it use? Magic?

Additionally, sleep and shutdown seems to be broken. Attempting to put the tablet to sleep just turns the screen off and freezes the tablet, requiring a hard reboot to wake again. Attempting to reboot or power off just causes the tablet to freeze and require a hard reset. If I switch plymouth to show a verbose screen instead of a logo, I can see systemd saying that it’s shutting down and then something about exiting hardware virtualization, but then the tablet just stays in that state forever. However, as far as I can tell, other power management features like screen brightness, battery level reporting, and CPU scaling work perfectly fine. Right now, I turn the screen off but leave the rest of the system awake, but this still causes excessive battery drain. It loses about 25% of the battery power overnight in this state. (The tablet otherwise has good battery life and the battery is reporting 98% health, so I don’t think it’s a bad battery.)

The cameras do not work and do not show up in lsusb or lspci. I don’t know where to begin with trying to get these to work, but I feel like actually identifying what they are would be a helpful first step, and I might even be able to do the rest of it myself with that information. How would I do that? (Or is there no hope of getting the cameras on these things to work?)

Other random issues that I don’t really care about, but have noticed:

  • The Bluetooth capability isn’t detected. (GNOME’s Bluetooth settings ask me to plug in a dongle.)
  • I don’t see any way to control the vibration motor. Right now, it vibrates when powering on the tablet before the screen turns on and when pressing the built-in capacitive super key. I feel like the vibration motor might not be exposed to the OS because it still vibrates when pressing the super key even when no OS is booted or after the system froze when trying to shut down, but is there a way to tell that for sure?
  • Unplugging or plugging in the tablet causes the screen backlight to come on, but the actual screen stays black until I manually wake it up (in which case it works normally) or let the backlight time out (in which case it turns off again.)

Update: Turning off wifi power management did not fix the wifi connection dropping and no networks available issue, as it just reoccurred. This time, I checked dmesg and saw that it has been spammed with many lines of ath6kl: wmi ctrl ep full, dropping pkt : <some hexadecimal>, len:<some decimal number>. I thought I’d try unloading and reloading the relevant kernel modules (ath6kl_core and ath6kl_sdio), but modprobe just hangs forever when attempting to do that, and is also unkillable. If I attempt to kill -9 it, the kill -9 command also hangs and becomes unkillable.

Additionally, blacklisting the kvm and kvm_intel kernel modules makes rebooting and shutting down work correctly. I guess a side effect of this is that I will no longer be able to run virtual machines on this thing, but considering that it has an atom from 2014 and 2GB of RAM, I don’t think I really wanted to do that anyways. Suspend is still broken, but now that I can turn the tablet off overnight that is less of a problem.