Need Help: HowTo start to programm a first app: "Pause" (break or "face down") for Xperia 10 III

harbour-situations2application

Ok, that’s my output now:

[defaultuser@Xperia10III ~]$ harbour-situations2application
[D] unknown:0 - Using Wayland-EGL
library “libGLESv2_adreno.so” not found
library “eglSubDriverAndroid.so” not found
library “vendor.qti.qspmhal@1.0.so” not found
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Datei oder Verzeichnis nicht gefunden
Created symlink /home/defaultuser/.config/systemd/user/user-session.target.wants/harbour-situations2application.service → /usr/lib/systemd/user/harbour-situations2application.service.
[W] unknown:8 - qrc:/qml/application/Background.qml:8:37: Unable to assign [undefined] to bool

Thank you for the hint. At the moment, Situations works well: The proximity sensor shows no malfunction and the app didn’t hang up.
I’ll observe some days.
Perhaps I’ll start Situations after a reboot per terminal per hand, using “arrow up” for recent commands; or I could add an entry in crontab (which I have not tested yet).

Why not to use systemd timers?

Further problems:

  • Situations worked for 2 days as desired.
  • Today -again- the sensor reacted, although the display was “on” → the display /WiFi is deactivated for a short moment each time, I come near the sensor.
  • I uninstalled the app graphically.
  • Nevertheless, the deactivation still went on, i.e. some task was still running.
  • For documentation, I made a picture of the output of “top”
  • Now, several hours later, the deactivation stopped (I didn’t anything more).

FYI, I didn’t reboot the phone the last days, nor did I install something else.
In the end it doesn’t work for me and I can’t understand, what’s the cause. I’m disappointed, because I thought it would be a good approach to save some battery power over the day.

Can you check:

systemctl --user status harbour-situations2application

and

devel-su systemctl status situations-sonar

[defaultuser@Xperia10III ~]$     systemctl --user status harbour-situations2application
● harbour-situations2application.service - Situations Background Service
   Loaded: loaded (/usr/lib/systemd/user/harbour-situations2application.service;
 enabled; vendor preset: enabled)
   Active: inactive (dead) since Mon 2022-10-10 10:39:44 CEST; 8h ago
  Process: 17085 ExecStart=/usr/bin/harbour-situations2application server (code=
exited, status=0/SUCCESS)
 Main PID: 17085 (code=exited, status=0/SUCCESS)
[defaultuser@Xperia10III ~]$     devel-su systemctl status situations-sonar
Password: 
● situations-sonar.service - Situations Companion Service
   Loaded: loaded (/etc/systemd/system/situations-sonar.service; enabled; vendor
 preset: enabled)
   Active: active (running) since Fri 2022-10-07 20:36:09 CEST; 2 day
s ago
 Main PID: 3248 (situations-sona)
   Memory: 6.9M
   CGroup: /system.slice/situations-sonar.service
           └─3248 /usr/bin/situations-sonar

Warning: Journal has been rotated since unit was started. Log output is incomple
te or unavailable.


As far as I understand, the application “harbour-situations2application” when invoked graphically or from the terminal without any argument is only a graphical frontend to configure the user service running in background “harbour-situations2application.service”. This service “talks” with a server (also launched in the background as a root service) “situations-sonar”. Being launched as root, this service is allowed to enable/disable wifi, bluetooth, set airplane mode…
It seems that in your case the user service has ended (I don’t know why). You can try to restart it with:

systemctl --user start harbour-situations2application

1 Like

I had to install “Situations” again, which I did from the Jollastore. Then I opened a terminal on the phone and started Situations again with the command “harbour-situations2application”
After that, I opened a ssh-connection from my pc and got the following status:

● harbour-situations2application.service - Situations Background Serv
ice
   Loaded: loaded (/usr/lib/systemd/user/harbour-situations2application.service;
 enabled; vendor preset: enabled)
   Active: active (running) since Mon 2022-10-10 21:13:21 CEST; 57s a
go
 Main PID: 9234 (harbour-situati)
   CGroup: /user.slice/user-100000.slice/user@100000.service/harbour-situations2
application.service
           └─9234 /usr/bin/harbour-situations2application server

Tomorrow I’ll test it again and post the status, when I observe the malfunction again.

Now, my created situation “display down” works for over 10 days without problems.
The solution was to start the app in terminal (in my case over ssh) per harbour-situations2application.
With my usage behavior, WiFi is disabled by “Situations” for many hours. So I observe that my battery last longer.
Edit: In order to have situations started after every reboot, I added per crontab -e the line:
@reboot harbour-situations2application

Two remarkable small problems:
a) 24.10., again: Situations disabled WiFi, although the display was “on”, when coming near to the sensor
b) 31.10.: WiFi is not disabled, although is laid down with display off.
In both cases systemctl --user status harbour-situations2application and devel-su systemctl status situations-sonar showed the same as days before.
Funnily enough, it always occurred so far on monday mornings :-).