kernel-patches icon indicating copy to clipboard operation
kernel-patches copied to clipboard

asus-armoury module not working

Open Emiliopg91 opened this issue 2 months ago • 5 comments

Hi, I've faced the following issue:

  • Hardware: Asus ROG Xbox Ally X
  • Kernel: 6.17.6-2-cachyos-deckify #1 SMP PREEMPT_DYNAMIC Fri, 31 Oct 2025 15:34:17 +0000 x86_64 GNU/Linux
  • chwd: chwd-1.16.0-2 provided by @1Naim via Discord
  • input-plumber: 0.67.0-1.1
  • cachyos-bugreport.sh: https://paste.cachyos.org/p/c5dd557.log
  • Result: asus-armoury not loading
  • Expected: module loading and exposing TDP firmware-attributes

Every button of the handheld PC works flawlessly. However TDP slider doesn't show up in UI and setting TDP using SimpleDeckyTDP or my own plugin (AllyDeckyCompanion) that works on Bazzite (for 2024 Asus Rog Ally X, the plugin works in bazzite and cachyos) TDP isn't working at all

I've realized that asus-armoury driver performs checks on load that doesn't ends up properly showing following output in logs:

[10621.578901] asus_armoury: Invalid CPU cores count detected: interface is not safe to be used.
[10621.578910] asus_armoury: Could not initialise CPU core control: -22

The guilty method is this one:

static struct cpu_cores *init_cpu_cores_ctrl(void)
{
	u32 cores;
	int err;
	struct cpu_cores *cores_p __free(kfree) = NULL;

	cores_p = kzalloc(sizeof(struct cpu_cores), GFP_KERNEL);
	if (!cores_p)
		return ERR_PTR(-ENOMEM);

	err = armoury_get_devstate(NULL, &cores, ASUS_WMI_DEVID_CORES_MAX);
	if (err) {
		pr_err("ACPI does not support CPU core count control\n");
		return ERR_PTR(-ENODEV);
	}

	cores_p->max_power_cores = FIELD_GET(ASUS_POWER_CORE_MASK, cores);
	cores_p->max_perf_cores = FIELD_GET(ASUS_PERF_CORE_MASK, cores);

	err = armoury_get_devstate(NULL, &cores, ASUS_WMI_DEVID_CORES);
	if (err) {
		pr_err("Could not get CPU core count: error %d\n", err);
		return ERR_PTR(-EIO);
	}

	cores_p->cur_power_cores = FIELD_GET(ASUS_POWER_CORE_MASK, cores);
	cores_p->cur_perf_cores = FIELD_GET(ASUS_PERF_CORE_MASK, cores);

	cores_p->min_power_cores = CPU_POWR_CORE_COUNT_MIN;
	cores_p->min_perf_cores = CPU_PERF_CORE_COUNT_MIN;

	if ((cores_p->min_perf_cores > cores_p->max_perf_cores) ||
	    (cores_p->min_power_cores > cores_p->max_power_cores) ||
		(cores_p->cur_perf_cores > cores_p->max_perf_cores) ||
		(cores_p->cur_power_cores > cores_p->max_power_cores) ||
		(cores_p->cur_perf_cores < cores_p->min_perf_cores) ||
		(cores_p->cur_power_cores < cores_p->min_power_cores)
	) {
		pr_err("Invalid CPU cores count detected: interface is not safe to be used.\n");
		return ERR_PTR(-EINVAL);
	}

Emiliopg91 avatar Nov 02 '25 22:11 Emiliopg91

v17 of the patchset was just posted in the mailing list which may or may not fix this. I'm not sure if I want to pull it right away. I'd like to wait a bit before updating the patchset that we use, so expect the updated patchset to land around 6.18-rc5, and whatever 6.17 version lands after that.

1Naim avatar Nov 03 '25 00:11 1Naim

If I can help with testing you can count on me I dont have experience in kernel related things but I'm developer with experience in Linux and I have the "problematic" hardware... And... I'm willing to learn new things :)

Emiliopg91 avatar Nov 03 '25 01:11 Emiliopg91

https://share.cachyos.org/x86_64_v3/kernel/6.18/ 6.18-rc5 has the new series here. I think you can use it on the Ally just fine.

1Naim avatar Nov 10 '25 07:11 1Naim

https://paste.cachyos.org/p/73a2c9f.log

It doesn't work

it seems that there's more errors here maybe the deckified kernel includes more modules. However the issue with CPU cores count is still there

nov 10 12:03:35 RogXboxAllyX kernel: i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
nov 10 12:03:35 RogXboxAllyX kernel: asus 0003:0B05:1B4C.0001: Asus input not registered
nov 10 12:03:35 RogXboxAllyX kernel: asus 0003:0B05:1B4C.0001: probe with driver asus failed with error -12
nov 10 12:03:35 RogXboxAllyX kernel: asus 0003:0B05:1B4C.0006: Asus input not registered
nov 10 12:03:35 RogXboxAllyX kernel: asus 0003:0B05:1B4C.0006: probe with driver asus failed with error -12
nov 10 12:03:35 RogXboxAllyX kernel: asus_armoury: Invalid CPU cores count detected: interface is not safe to be used.
nov 10 12:03:35 RogXboxAllyX kernel: asus_armoury: Could not initialise CPU core control: -22
nov 10 12:03:35 RogXboxAllyX kernel: bmc150_accel_i2c i2c-BOSC0200:00: Invalid chip 0

Is this one related to the motion sensor of the handheld?

Emiliopg91 avatar Nov 10 '25 11:11 Emiliopg91

Reported directly into flukejones asus-linux repository

It seems that asus handheld firmware is reporting silly values for CPU count

Emiliopg91 avatar Nov 11 '25 11:11 Emiliopg91

Solved in 6.18-rc6 I'll wait for 6.18 release being in RC

any bug I'll report it

Emiliopg91 avatar Nov 17 '25 14:11 Emiliopg91

Thanks for the heads up! I wanted to notify you regarding rc6 but forgot to do so. Glad that you were on top of it. 6.17.9 should also contain this fix.

1Naim avatar Nov 17 '25 14:11 1Naim

why do you expect to have it ready for 6.17.9? Will be added the fix/firmware for Xbox Ally X speakers to solve the issue with volume?

what about the chwd for Xbox ally x?

Emiliopg91 avatar Nov 19 '25 13:11 Emiliopg91

why do you expect to have it ready for 6.17.9?

Because it's already queued in tree and the upcoming kernel version is 6.17.9

Will be added the fix/firmware for Xbox Ally X speakers to solve the issue with volume?

Eventually. AFAIK there's still an issue that's still unresolved.

what about the chwd for Xbox ally x?

Already merged upstream, wait for a new point release.

1Naim avatar Nov 21 '25 06:11 1Naim

For firmware, in bazzite the y commited: https://github.com/ublue-os/bazzite/blob/5cd43c637c2a21f5fb22c1ec51d1600275eb0d66/build_files/install-firmware

the source of firmware is https://github.com/hhd-dev/hwfirm/tree/master/tas

I could try to install it manually in my device and give you output

Emiliopg91 avatar Nov 21 '25 07:11 Emiliopg91

I tried without success (linux-kernel already include that firmware files) However, I've investigated a bit more and a found a serie of 2 patches for xbox-rog ally

ALSA: hda/tas2781: fix speaker id retrieval for multiple probes

That sould be included in kernel as patch if is'nt included in mainline

Emiliopg91 avatar Nov 22 '25 21:11 Emiliopg91