Packaging for Guix but got issues testing the binary
Closed this issue ยท 2 comments
I am trying to package rot8
for GNU Guix and have a package definition working for it, but I am having trouble checking whether it works as expected or not. Whenever I execute the built binary with ./rot8 --display DSI-1
, my screen rotates sideways and then won't rotate again even if I move it.
Would that be a sign that it fails to read accelerometer data, or my accelerometer is not working correcty (maybe I'm missing dependencies)? I vaguely remember I once read accelerometer data from some command in the terminal and could confirm the values were changing depending on the position of my screen, but I can't remember what was the command to confirm that now.
Also, my machine is a small UMPC and often those come with a screen that is actually recognized as a portrait screen by default. I work around this using the transform
function of sway
or wlr-randr
, but seeing that rot8
automatically rotates my screen to portrait mode makes me think the accelerometer data are not corrected accordingly. Is there a way to set an offset in rot8
so that it rotates from a reference (i.e., force a 90-degree rotation before applying its own rotation based on sensor data)?
Some accelerometer work with different sensor values (for example 1000 range, requiring a normalization factor of 1e3) . --normalization-factor 1e3
simple solution for the orientation problem is invert readings from the HW axis.
--invert-y
Perfect, thank you, that did it. I needed --invert-x
instead of --invert-y
, but that works like a charm. I'll try to send the patch to add the package to Guix later today.