Sorry if this has already been answered. Here is what worked for me. In my case I have a Chuwi Ubook X sn unknown unless it is 214-230132. My accelerometer worked but consistently was incorrect by 90 degrees counterclockwise.
Open a terminal window, ctrl-alt-T will do it- there are other ways. Get to the directory that holds (apparently) all kinds of notes on specific hardware configurations- use the cd for change directory command, like this
cd /lib/udev/hwdb.d
then if you want you can list everything that’s in there to see what there is- the command is ls (that is lower case L and s, not cap i or 1 )
I created a new item in there by using sudo nano (new file’s name)
New file name should be
61-sensor-local.hwdb
contents of this file should be
sensor:modalias:acpi:MXC6655*:dmi::svnCHUWIInnovationAndTechnology:pnUBookX:*
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, -1
NOTICE: The string in the middle of the sensor etc line above should be *:dmi: no space * no space :svnCHUWIInnovationAndTechnology etc etc but when I post it to this forum it takes the asterisk between the two colons as a command to change the text after to italic rather than just showing the asterisk in place as I wished. Sorry about that, don’t know how to fix it
The Youtube video I stole all the basics for this from is
And the values for the mount matrix I stole somewhere else online. Because I don’t know ANY of this- this is the first work of this sort I’ve done since the last Unix machine I worked on about… oh gods, I doubt too many of you were even alive back then. Maybe not even your parents. I’m just joyously stealing everyone else’s work.
Anyhoo what you’re doing is telling Ubuntu what accelerometer, what manufacturer, what model from that manufacturer, and a little bit of matrix multiplication which I once knew all about even farther back than the Unix work I did. Gods, I’m so old
Hope this helps a bit. --hafoc, bill, whatever