Chuwi Hi10Go iio-sensor-proxy service does not find trigger name
I'm currently trying to get automatic screen rotation working on my Chuwi Hi10Go. It uses the same acceleration sensor as the Hi10x, it's the MXC6655
module.
The iio-sensor-proxy.service
is started, but shows the following output:
$ systemctl status iio-sensor-proxy.service
● iio-sensor-proxy.service - IIO Sensor Proxy service
Loaded: loaded (/lib/systemd/system/iio-sensor-proxy.service; static; vendor preset: enabled)
Active: active (running) since Mon 2021-08-02 14:58:57 EDT; 21s ago
Main PID: 564 (iio-sensor-prox)
Tasks: 3 (limit: 6753)
Memory: 1.4M
CGroup: /system.slice/iio-sensor-proxy.service
└─564 /usr/sbin/iio-sensor-proxy
Aug 02 14:58:57 hi10go-hi10go systemd[1]: Starting IIO Sensor Proxy service...
Aug 02 14:58:57 hi10go-hi10go systemd[1]: Started IIO Sensor Proxy service.
Aug 02 14:58:57 hi10go-hi10go iio-sensor-prox[564]: Could not find trigger name associated with /sys/devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-4/i2c-MXC6655:00/iio:device0
It looks like the sensor is detected:
$ udevadm info --export-db | grep iio
P: /devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-4/i2c-MXC6655:00/iio:device0
N: iio:device0
E: DEVPATH=/devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-4/i2c-MXC6655:00/iio:device0
E: SUBSYSTEM=iio
E: DEVNAME=/dev/iio:device0
E: DEVTYPE=iio_device
E: IIO_SENSOR_PROXY_TYPE=iio-poll-accel iio-buffer-accel
E: SYSTEMD_WANTS=iio-sensor-proxy.service
And:
$ gdbus introspect --system --dest net.hadess.SensorProxy --object-path /net/hadess/SensorProxy
node /net/hadess/SensorProxy {
interface org.freedesktop.DBus.Properties {
methods:
Get(in s interface_name,
in s property_name,
out v value);
GetAll(in s interface_name,
out a{sv} properties);
Set(in s interface_name,
in s property_name,
in v value);
signals:
PropertiesChanged(s interface_name,
a{sv} changed_properties,
as invalidated_properties);
properties:
};
interface org.freedesktop.DBus.Introspectable {
methods:
Introspect(out s xml_data);
signals:
properties:
};
interface org.freedesktop.DBus.Peer {
methods:
Ping();
GetMachineId(out s machine_uuid);
signals:
properties:
};
interface net.hadess.SensorProxy {
methods:
ClaimAccelerometer();
ReleaseAccelerometer();
ClaimLight();
ReleaseLight();
ClaimProximity();
ReleaseProximity();
signals:
properties:
readonly b HasAccelerometer = true;
readonly s AccelerometerOrientation = 'normal';
readonly b HasAmbientLight = false;
readonly s LightLevelUnit = 'lux';
readonly d LightLevel = 0.0;
readonly b HasProximity = false;
readonly b ProximityNear = false;
};
node Compass {
};
};
I then run monitor-sensor
to see if the sensor shows any outputs, but receive the following:
(While changing the orientation of the device as the command is running...)
$ monitor-sensor
Waiting for iio-sensor-proxy to appear
+++ iio-sensor-proxy appeared
=== Has accelerometer (orientation: normal)
=== No ambient light sensor
=== No proximity sensor
By stopping the iio-sensor-proxy.service and then running the sudo /usr/sbin/iio-sensor-proxy -v -r
as asked in the readme shows:
** (process:1858): WARNING **: 15:13:51.394: Could not find trigger name associated with /sys/devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-4/i2c-MXC6655:00/iio:device0
This is the tree of the device:
$ sudo tree /sys/devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-4/i2c-MXC6655:00/iio:device0
/sys/devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-4/i2c-MXC6655:00/iio:device0
├── buffer
│ ├── data_available
│ ├── enable
│ ├── length
│ └── watermark
├── current_timestamp_clock
├── dev
├── in_accel_scale
├── in_accel_scale_available
├── in_accel_x_raw
├── in_accel_y_raw
├── in_accel_z_raw
├── name
├── power
│ ├── async
│ ├── autosuspend_delay_ms
│ ├── control
│ ├── runtime_active_kids
│ ├── runtime_active_time
│ ├── runtime_enabled
│ ├── runtime_status
│ ├── runtime_suspended_time
│ └── runtime_usage
├── scan_elements
│ ├── in_accel_x_en
│ ├── in_accel_x_index
│ ├── in_accel_x_type
│ ├── in_accel_y_en
│ ├── in_accel_y_index
│ ├── in_accel_y_type
│ ├── in_accel_z_en
│ ├── in_accel_z_index
│ ├── in_accel_z_type
│ ├── in_timestamp_en
│ ├── in_timestamp_index
│ └── in_timestamp_type
├── subsystem -> ../../../../../../../bus/iio
├── trigger
│ └── current_trigger
└── uevent
I went ahead and created a file in /lib/udev/hwdb.d/61-sensor-local.hwdb
and filled it up with the following content:
sensor:modalias:acpi:MXC6655*:dmi:*:svnCHUWIINNOVATIONLIMITED:pnHi10Go:*
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
This matrix is copied from the Hi10X example in the 60-sensor.hwdb file.
Then:
sudo systemd-hwdb update
sudo udevadm trigger -v -p DEVNAME=/dev/iio:device0
This does not make any difference however.
Any idea what's going wrong? Any help is greatly appreciated!
P.S. This is using version 3.0.1, on KDE Neon (Ubuntu 20.04) with linux kernel 5.11