NixOS on Asus T102H tablet

I have an Asus T102H tablet that I am trying to run NixOS on. For the most part it is working ok, but the battery is not detected, pressing the power button freezes the system and so does inserting an SD cart into the SD card slot.

These issues are not present on other distros I have tried: Ubuntu 19.10, PopOS 19.10, PopOS 20.04. With NixOS I have tried versions of the kernel from 4.19 all the way up to 5.6.

Can anyone give me some directions on how to debug this further?

What do you see on journalctl about previous boot? journalctl -k should give you kernel logs, do you see any crashes, panic etc?
Also did you enable acpid? If not could you try with services.acpid.enable = true;

I did not have acpid enabled. Enabling it does not seem to make any difference.

I see these kernel errors in red both with and without acpid:

ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - _SB_.PCI0.I2C7.BATC (20200110/dspkginit-438)
ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - _SB_.PCI0.I2C7.BATC (20200110/dspkginit-438)
ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - _SB_.PCI0.I2C3.TIDR (20200110/dspkginit-438)

kernel: intel_atomisp2_pm 0000:00:03.0: can’t change power state from D3cold to D0 (config space inaccessible)

Going to check if these errors are present in PopOS and report back.

I see the AE_NOT_FOUND errors on PopOS too. I don’t see the intel_atomisp2_pm error.

In PopOS I see this message which is not present in NixOS:

battery: ACPI: Battery Slot [BATC] (battery present)

Hmm at this point I have not many ideas left, especially after you said you’ve tried older kernels too.
If you don’t have firmware packages:
hardware.enableRedistributableFirmware and hardware.firmware = [ pkgs.firmwareLinuxNonfree ]; can help. If there is a firmware upgrade from asus it could also help. :crossed_fingers:


I’ve been running NixOS on a system using what I believe is the same platform, based on the same cherrytrail cpu.

I have an overlay that pulls from a kernel developer that has made some work on those tablets, but I’m not sure it’s required anymore to pull from there.

Though, I do know that some of the changes in the build configuration are required for things to work on my device.

That bit links to: 96571 – [CHV] Backlight init fails on Surface 3 if module load order is wrong

And AFAICT it is still an issue. With the default kernel from NixOS, the backlight doesn’t work at all, but with those settings, and that kernel fork, it works right.

I’m not sure the following is required for your device:

(It may not be for mine, or anymore)

Thank you so much, your overlay works for me too! I am curious why we need a custom kernel for NixOS when the mainline kernel works for other distros. Could it all be caused by a different module loading order? Why is the module order different on NixOS?

The only thing that is not working with your overlay is the camera but this is not working in other distros either.

As you then follow-up with, I’m willing to bet the main thing that fixes the issue is the modules loading order. Though I am not positive it’s the only thing helping here. A diff between mainline and jwrdegoede’s tree may help figuring out what else helps.

Another option, to help test that, is to simply use the same exact derivation, but change the source to the mainline kernel equivalent, and see what works and doesn’t when built that way.

On the mainline kernel the only thing that seems to help is:

DRM_I915 m

which fixes the backlight issue you described. The other configs either don’t exist on the mainline or don’t seem to help with any of the other issues.

Ok, I was wrong. I ran into trouble because I tried to use the trick with an empty patch and extraConfig. But changing the kernel source on your overlay to mainline (took the src from nixpkgs 5.6.7) works!

1 Like