During development dynamic rotation stopped working

I’m not really sure how I managed this, but I blieve I killed dynamic orientation. Perhaps playing with: //import Sailfish.Silica.private 1.0

In any case I can’t seem to get it back. Which makes it a little difficult to test the behaviour of apps I’m working on :slight_smile: Sigh.

Rebooting and so have not helped and I’m not sure where to look in /etc

And, just looking at a compass app shows calibration does’t work anymore:

orientationsensor=Feature_GyroSensor|Feature_AccelerationSensor

… hmmm. any ideas?

I’ll ask the silly question, have you checked to make sure you haven’t toggled orientation off dynamic by accident?

Nope. And apps do work in landscape, for instance. It appears as if a sensor no longer works. Can’t calibrate (as with compass app) some, one ? sensor any longer. This worked fine.

What does
systemctl status -l sensorfwd
tell?

Sadly, I’ve already reflashed, but for the sake of it:

"[root@VollaPhone defaultuser]# systemctl status -l sensorfwd
● sensorfwd.service - Sensor daemon for sensor framework
   Loaded: loaded (/usr/lib/systemd/system/sensorfwd.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2021-03-30 20:44:06 CEST; 1h 14min ago
 Main PID: 1505 (sensorfwd)
   CGroup: /system.slice/sensorfwd.service
           └─1505 /usr/sbin/sensorfwd -c=/etc/sensorfw/primaryuse.conf --systemd --log-level=warning --no-magnetometer-bg-calibration

Mar 30 21:56:44 VollaPhone sensorfwd[1505]: virtual bool HybrisAdaptor::setInterval(unsigned int, int) setInterval not ok
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
"

And now I can’t login to my Jolla account. funny. wonder how long this is gonna take. “Unable to sign in with this username and password”, indeed.

So, nothing interesting in the logs and restarting sensor services did nothing. I wanted a clean slate and to see how difficult a recovery is so I flashed.

At first orientation worked again. I installed some stuff and then orientation stopped working.

● sensorfwd.service - Sensor daemon for sensor framework
   Loaded: loaded (/usr/lib/systemd/system/sensorfwd.service; disabled; vendor preset: enabled)
   Active: active (running) since Wed 2021-03-31 08:26:14 CEST; 33min ago
 Main PID: 822 (sensorfwd)
   CGroup: /system.slice/sensorfwd.service
           └─822 /usr/sbin/sensorfwd -c=/etc/sensorfw/primaryuse.conf --systemd --log-level=warning --no-magnetometer-bg-calibration

Mar 31 08:36:39 VollaPhone sensorfwd[822]: SensorManagerError:  "requested sensor id 'orientationsensor' not registered"
Mar 31 08:36:39 VollaPhone sensorfwd[822]: SensorManagerError:  "requested sensor id 'orientationsensor' not registered"
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
And restart:
[root@VollaPhone ~]# systemctl restart -l sensorfwd
[root@VollaPhone ~]# systemctl status -l sensorfwd
● sensorfwd.service - Sensor daemon for sensor framework
   Loaded: loaded (/usr/lib/systemd/system/sensorfwd.service; disabled; vendor preset: enabled)
   Active: active (running) since Wed 2021-03-31 09:01:32 CEST; 2s ago
 Main PID: 9232 (sensorfwd)
   CGroup: /system.slice/sensorfwd.service
           └─9232 /usr/sbin/sensorfwd -c=/etc/sensorfw/primaryuse.conf --systemd --log-level=warning --no-magnetometer-bg-calibration

Mar 31 09:01:32 VollaPhone sensorfwd[9232]: "proximitysensor instantiation failed"
Mar 31 09:01:32 VollaPhone sensorfwd[9232]: SensorManagerError:  "sensor has not been instantiated"
Mar 31 09:01:32 VollaPhone sensorfwd[9232]: SensorManagerError:  "requested sensor id 'alssensor' not registered"
Mar 31 09:01:32 VollaPhone sensorfwd[9232]: SensorManagerError:  "unknown adaptor id 'accelerometeradaptor'"
Mar 31 09:01:32 VollaPhone sensorfwd[9232]: QObject::connect: Cannot connect (null)::propertyChanged(const QString&) to AccelerometerChain::propertyChanged(const QString&)
Mar 31 09:01:32 VollaPhone sensorfwd[9232]: QObject::connect: Cannot connect (null)::propertyChanged(const QString&) to AccelerometerChain::propertyChanged(const QString&)
Mar 31 09:01:32 VollaPhone sensorfwd[9232]: Node ' "orientationchain" ' state changed to invalid
Mar 31 09:01:32 VollaPhone sensorfwd[9232]: Node ' "orientationsensor" ' state changed to invalid
Mar 31 09:01:32 VollaPhone sensorfwd[9232]: "orientationsensor instantiation failed"
Mar 31 09:01:32 VollaPhone sensorfwd[9232]: SensorManagerError:  "sensor has not been instantiated"

So, I took systemd out of the picture to see what happens:

running the command systemd does:
sensorfwd -c=/etc/sensorfw/primaryuse.conf --log-level=warning --no-magnetometer-bg-calibration

We get:

SensorManagerError:  "unknown adaptor id 'alsadaptor'"
Node ' "alssensor" ' state changed to invalid
"alssensor instantiation failed"
SensorManagerError:  "sensor has not been instantiated"
SensorManagerError:  "unknown adaptor id 'proximityadaptor'"
Node ' "proximitysensor" ' state changed to invalid
"proximitysensor instantiation failed"
SensorManagerError:  "sensor has not been instantiated"
SensorManagerError:  "requested sensor id 'alssensor' not registered"
SensorManagerError:  "unknown adaptor id 'accelerometeradaptor'"
QObject::connect: Cannot connect (null)::propertyChanged(const QString&) to AccelerometerChain::propertyChanged(const QString&)
QObject::connect: Cannot connect (null)::propertyChanged(const QString&) to AccelerometerChain::propertyChanged(const QString&)
Node ' "orientationchain" ' state changed to invalid
Node ' "orientationsensor" ' state changed to invalid
"orientationsensor instantiation failed"
SensorManagerError:  "sensor has not been instantiated"

The conf:

^C[root@VollaPhone ~]cat /etc/sensorfw/primaryuse.conf
[plugins]
accelerometeradaptor = hybrisaccelerometeradaptor
alsadaptor = hybrisalsadaptor
proximityadaptor = hybrisproximityadaptor
magnetometeradaptor = hybrismagnetometeradaptor
gyroscopeadaptor = hybrisgyroscopeadaptor
orientationadaptor = hybrisorientationadaptor
 
[magnetometer]
scale_coefficient = 1
transformation_matrix = "-1,0,0,0,1,0,0,0,1"
needs_calibration = 0
 
[accelerometer]
transformation_matrix = "1,0,0,0,1,0,0,0,1"

This is odd. So, as one sees above, it seemed the service was disabled. so I die an enable with systemctl and rebooted. that also doesn’t work.

Is this a hardware problem! I think I have to ask piggz.

Is it possible I killed some part of the android hal bits? It really looks like some middleware is missing.

Just to report:
Did a full reflash including the volla system img (android).
After reboot, orientation was working as were other sensors. After some time? It just died.

Starting to track this beginning with dmesg:
https://raw.githubusercontent.com/poetaster/SFOS-debug/master/dmesg/2021-04-02.1

This one is over 1mb: https://raw.githubusercontent.com/poetaster/SFOS-debug/master/journalctl/2021.04.02.jctl

Argh. help.