@sdetweil
@sdetweil
Well, I start the xin.sh with PM2 and it works with calibrating the IR-frame:
xin.sh:
#!/bin/bash
DISPLAY=:0.0 xinput --set-prop “Multi touch Multi touch overlay device” “Coordinate Transformation Matrix” 0 -1 1 1 0 0 0 0 1
However, after the mm.sh (the MagicMirror) has started, then when I go back to Raspberry disktop the the Calibration is off again. If I then run the xin.sh with “pm2 start xin.sh” in a terminal window then the calibration is okay again.
This is the error that I get from pm2 log file:
Bo@MMpi:~ $ pm2 list
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
│ id │ name │ mode │ ↺ │ status │ cpu │ memory │
├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
│ 0 │ xin │ fork │ 15 │ errored │ 0% │ 0b │
└────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
[PM2][WARN] Current process list is not synchronized with saved list. App led mm differs. Type ‘pm2 save’ to synchronize.
Bo@MMpi:~ $ pm2 log
[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
/home/Bo/.pm2/pm2.log last 15 lines:
PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] online
PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] exited with code [0] via signal [SIGINT]
PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] starting in -fork mode-
PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] online
PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] exited with code [0] via signal [SIGINT]
PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] starting in -fork mode-
PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] online
PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] exited with code [0] via signal [SIGINT]
PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] starting in -fork mode-
PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] online
PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] exited with code [0] via signal [SIGINT]
PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] starting in -fork mode-
PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] online
PM2 | 2022-03-31T20:11:38: PM2 log: App [xin:0] exited with code [0] via signal [SIGINT]
PM2 | 2022-03-31T20:11:38: PM2 log: Script /home/Bo/xin.sh had too many unstable restarts (16). Stopped. “errored”
/home/Bo/.pm2/logs/xin-out.log last 15 lines:
/home/Bo/.pm2/logs/xin-error.log last 15 lines:
0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
0|xin | Unable to connect to X server
0|xin | Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
0|xin | Unable to connect to X server
0|xin | Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
0|xin | Unable to connect to X server
0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
0|xin | Invalid MIT-MAGIC-COOKIE-1 keyUnable to connect to X server
Should I do something else with pm2 or run the xin.sh in an other way?
It would be so nice to have i done automatically 😁
the mm.sh file:
cd ~/MagicMirror
DISPLAY=:0 npm start
Best Bo