Page 1 of 1

Using autostart hangs

Posted: Thu Aug 05, 2021 5:55 pm
by snatchy
I'm using two touchscreens with a Pi 4, so have this script to map the USB interfaces with the displays:

Code: Select all

xinput map-to-output 8 HDMI-1
xinput map-to-output 7 HDMI-2
This works great, until I put it into `/home/pi/.config/lxsession/LXDE-pi/autostart`, but then it just boots to blank screens.

I've tried inserting a `sleep` in case it wasn't ready to do it, and also I have tried prefixing with `@`

Code: Select all

@sleep 60
@xinput map-to-output 8 HDMI-1
@xinput map-to-output 7 HDMI-2
but neither made a difference, and also calling it as a script like

Code: Select all

@. /home/pi/mapdisplays
...but still nothing. What am I doing wrong?

Re: Using autostart hangs

Posted: Sun Aug 08, 2021 8:34 am
by drooly
So, do I understand correctly:
  • a graphical login hangs as soon as you add these commands
  • without these commands the graphical login does not hang
  • the commands work fine executed by themselves
???

You can always try appending an ampersand to each command, like so:

Code: Select all

xinput map-to-output 8 HDMI-1 &
xinput map-to-output 7 HDMI-2 &
although I don't think this is what's causing this error.

Please define "hangs" - What _exactly_ happens? Anything in the logs?
Show us a part of

Code: Select all

journalctl -b
for the relevant timespan.