Linux hardware support for the Chuwi Minibook X convertible laptop. Provides tablet mode detection through accelerometer data and integrates with desktop environments.
The cmxd and cmxsd may be useful for other platforms that use two accelerometers in order to detect tablet mode configuration. The cmx module is only required as the CHUWI Minibook X platform ACPI does not bring up both accelerometers. If you find that these daemons work for you, please email or message me with your platform information.
- cmx-kernel-patch/ - Kernel patches for accelerometer device support
- cmx/ - Kernel module for tablet mode detection and input events
- cmxd/ - System daemon for accelerometer processing
- cmxsd/ - User session daemon for desktop integration
- tools/ - Optional utilities for EC configuration
Follow these steps in order:
Rebuild your kernel after applying the patch in ./cmx-kernel-patch/. This patch:
- Disables automatic ACPI loading for MXC4005 accelerometer devices
- Enables serial-multi-instantiate support for multiple MXC4005 instances
- Selects serial-multi-instantiate and mxc4005 modules.
cd cmx-kernel-patch/
# Follow instructions to apply patch to your kernel source
# Reboot with patched kernelEnable the following options in your kernel configuration:
CONFIG_CMX- Chuwi Minibook X platform driver- This will automatically select
CONFIG_MXC4005andCONFIG_SERIAL_MULTI_INSTANTIATE
- This will automatically select
Note: Module build <M> has been tested. Compiled-in <*> has not been tested.
NOTE: after rebuilding the kernel with the patch, you can do steps 3, 4, and 5 manually, or you can run the normal make, make install dance from the top-level directory.
See cmx/README.md for details.
cd cmx/
make
sudo make modules_install
sudo modprobe cmxSee cmxd/README.md for details.
cmxd must be started at the system level (by root).
cd cmxd/
make
sudo make install
sudo systemctl enable --now cmxdSee cmxsd/README.md for details.
cmxsd runs per user session. Customize the support scripts for your desktop environment.
cd cmxsd/
make
sudo make install
make install-user # optional, but scripts customized for your environment are required
systemctl --user enable --now cmxsdSee tools/README.md for details.
The support scripts in ./tools/ are optional and may improve performance and enable advanced BIOS settings on the N150 platform device.
Hardware Kernel Userspace
-------- ------ ---------
IIO Devices → cmx kernel module ⇄ cmxd (system daemon)
(accelerometers) (SW_TABLET_MODE events) (calculates hinge angles)
↓
cmxsd (session daemon)
(desktop integration)
- IIO accelerometer devices provide raw sensor data
- cmx kernel module creates input device and sysfs interface
- cmxd reads accelerometer data, calculates hinge angles, updates kernel module
- cmx generates
SW_TABLET_MODEinput events - cmxsd responds to events and executes desktop environment actions
- cmx/, cmxd/, cmxsd/: GPL-2.0-or-later (see LICENSE files in each directory)
- tools/: MIT License (see tools/LICENSE)
- Root directory: Dual-licensed (LICENSE-1 for MIT, LICENSE-2 for GPL-2.0)
See individual component READMEs for development information and testing procedures.