6

I have a tablet with builtin sensors which allow me automatic screen rotation, based on iio-sensors-proxy. However, the screen orientation is off, and I need to fix it.

On it's GitHub page (https://github.com/systemd/systemd/blob/master/hwdb/60-sensor.hwdb) is explained how to change this behavior: Create a file /etc/udev/hwdb.d/61-sensor-local.hwdb and write to it

sensor:modalias:<parent device modalias>:dmi:<dmi string>

and

ACCEL_MOUNT_MATRIX=1, 0, 0; 0, 1, 0; 0, 0, 1 

(this matrix has to be changed ofc).

Problem : I have no idea how to get the neccessary information for the first line, the sensor-prefix.

Solution : Final file contains:

sensor:modalias:acpi:KIOX000A*:dmi:*:svnEVE*:pnEveV:*
    ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1

What I've found so far:

This gives me device name:

udevadm info --export-db | grep iio
P: /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-KIOX000A:00/iio:device0
N: iio:device0
E: DEVNAME=/dev/iio:device0
E: DEVPATH=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-KIOX000A:00/iio:device0
E: DEVTYPE=iio_device
E: IIO_SENSOR_PROXY_TYPE=iio-buffer-accel
E: SUBSYSTEM=iio
E: SYSTEMD_WANTS=iio-sensor-proxy.service

This gives me more info about the device:

udevadm info -n "/dev/iio:device0" 
P: /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-KIOX000A:00/iio:device0
N: iio:device0
E: DEVNAME=/dev/iio:device0
E: DEVPATH=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-KIOX000A:00/iio:device0
E: DEVTYPE=iio_device
E: IIO_SENSOR_PROXY_TYPE=iio-buffer-accel
E: MAJOR=245
E: MINOR=0
E: SUBSYSTEM=iio
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: TAGS=:systemd:
E: USEC_INITIALIZED=1959744

And via pci I find the so-called modalias:

cat /sys/devices/pci0000:00/0000:00:15.0/modalias
pci:v00008086d00009D60sv00008086sd00007270bc11sc80i00

Would really appreciate help from here on!


My system: Linux jva 4.14.5-1-ARCH #1 SMP PREEMPT Sun Dec 10 14:50:30 UTC 2017 x86_64 GNU/Linux running under GNOME 3.26.2 (Wayland-seesion)

Tablet: Eve V i7Y

2 Answers 2

4

I just solved this problem for my Lenovo Miix 320.

You already have the driver name:

udevadm info -n  /dev/iio:device0

In your case: KIOX000A

Then find out vendor and productname with dmidecode (should be one of the first hits, in my Case LENOVO and XF80):

dmidecode | grep Manufacturer
dmidecode | grep Product

Now just put the things together:

sensor:modalias:acpi:[driver name]*:dmi:*:svn[Manufacturer]*:pn[Product Name]:*

without the square brackets.

I found this information on: https://www.aixin.fr/jipeblog/?p=119

1
  • 1
    Many thanks, it worked wonderfully! ;) (I updated my post to include the final answer) Commented Dec 17, 2017 at 18:55
1

I have more or less the same issue, but I was not able to write a rule to match my device (or it is, for some reason, not working as expected). Could you have a look at ACCEL_MOUNT_MATRIX for ARCHOS 90 CESIUM?

Thanks a lot.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .