OneXPlayer maintains a line of handheld gaming consoles following in the success of the likes of Valve’s Steam Deck, Lenovo Legion Go, and ASUS ROG Ally. These OneXPlayer devices ship with Microsoft Windows by default but the Linux support has been improving.
Over the past two years there has been a OneXPlayer sensor monitoring and control driver among other open-source driver work for enhancing the support for these AMD-powered gaming handhelds. The OneXPlayer hardware monitoring driver has seen numerous improvements since being mainlined back in Linux 6.2. A set of new patches posted on Thursday bring this OneXPlayer driver closer to parity with the support found for these devices on Microsoft Windows.
The new patches add support for the newer “2024” model OneXPlayer handheld gaming consoles plus add support for battery charge limiting and the turbo LED. Antheas Kapenekakis who posted the set of 10 patches explained:
“This three part series updates the oxpsensors module to bring it in line with its Windows OneXPlayer counterpart. First, it adds support for all 2024 OneXPlayer handhelds and their special variants.
Then, it adds the new charge limiting and bypass features that were first introduced in the X1 and retrofit to older OneXFly variants and for controlling the turbo led found in the X1 models. For Bypass, it adds a new bypass variant BypassS0 that is only active while the device is in the S0 state.”
But the third and likely to prove to be more contentious part is a user-space ABI break… Some breaks typically aren’t permitted for the upstream Linux kernel. The change is around the sysfs interface for user-space software wanting to control the fan speed for these devices. There is a rename from “oxpec” to “oxp_ec” so existing user-space software will simply stop working until updated. But we’ll see if this break is okay’ed by the HWMON maintainers and ultimately Torvalds himself. Kapenekakis explained of the break:
“It performs a minor refactor by moving around switch statements into their own functions, in order to allow for fixing the pwm1_enable ABI in the final patch. Currently, pwm1_enable sets the fan to auto with the value 0 and allows manual control with the value 1. This patch makes it so 0 sets the fan to full speed, 1 sets the fan to manual control, and 2 sets the fan to auto. This requires both setting enable and the fan speed when the enable sysfs is written to as 0, hence the refactor.
As this is a breaking ABI change and there is userspace software relying on this previous behavior, the last patch also changes the /name of the hwmon endpoint to “oxp_ec” from “oxpec” (mirroring WMI module conventions) such that userspace software that relied on the previous behavior can be retrofit to the new kernel while enabling correct functionality on old and new kernels. Failing that, software that is not updated will just stop controlling the fans, ensuring no malignant behavior.”
Those with any OneXPlayer handheld gaming devices can find the new patches under review on the Linux power management list.