[SOLVED] Cannot invoke my PAL60 script (tweakvec.py) through runcommand-onstart
-
SOLUTION HERE
Hi,
PAL60 is an SDTV mode that has NTSC geometry but uses PAL color sync.
There is a python-based tool called tweakvec that allows you to switch the Raspberry Pi's 3.5mm Composite output to PAL60. The user first has to usetvservice -c "NTSC 4:3"
for 480i ortvservice -c "NTSC 4:3 P"
for 240p, and then callssudo python3 /home/pi/tweakvec/tweakvec.py --preset PAL60
to switch the color sync to PAL.Now I've been trying to integrate this into my RetroPie setup, but can't get this working.
What does work:- calling tweakvec from
autostart.sh
. EmulationStation runs in PAL60. - calling tweakvec from
runcommand-onend.sh
; ES will be set to PAL60 again.
The part that fails is calling
tweakvec
fromruncommand-onstart.sh
. I let RetroPie handle switching toNTSC 4:3
andNTSC 4:3 P
normally through thevideomodes.cfg
file. But the tweakvec call doesn't work for some reason. My emulators (all libretro), will be in the right NTSC mode, but not with PAL color sync.
I can call tweakvec through SSH, which will switch the color sync for me; note that tweakvec will not cause a crash or black screen here. It can be run while the emulator is running.
However of course, SSH'ing into the Pi each time is not something I want to do.I also tried adding my tweakvec command into
/opt/retropie/supplementary/runcommand/runcommand.sh
manually, on a new line in the if block where it says$TVSERVICE -c "${mode_id[*]}" >/dev/null
, but that also doesn't work, leading me to believe that this is something in the RetroPie script chain that I don't know about.If anyone knows what I can do here, please share your knowledge.
Pi Model or other hardware: 3B+
Power Supply used: official
RetroPie Version Used: 4.7.12
Built From: Pre made SD Image on RetroPie website
USB Devices connected: Logitech K400+, DualShock 4, USB sound card (to separate audio from composite video)
Controller used: DualShock 4
Error messages received: -
Verbose log (if relevant): -
Guide used: No
Emulator: lr-* - calling tweakvec from
-
@froyoxsg said in Cannot invoke my PAL60 script (tweakvec.py) through runcommand-onstart:
The part that fails is calling tweakvec from runcommand-onstart.sh. I let RetroPie handle switching to NTSC 4:3 and NTSC 4:3 P normally through the videomodes.cfg file.
The
runcommand-onstart.sh
commands are run before any mode switching (viatvservice
) occurs. If the script relies on a certain TV mode to be set, you cannot use it in conjunction with the runcommand's video mode switching. -
@mitu I suspected as much! Good to have confirmation. Any call to
tvservice -c
will throw out tweakvec's color sync overrides.
Do you have an explanation why it doesn't work from the mainruncommand.sh
either?This morning, I remembered that I can dump the command output with a
>
operator, so I'll check for that when I have time. Will also check if I can somehow schedule the actual call 30 seconds into the future or so. I think that will work in the end. -
@froyoxsg said in Cannot invoke my PAL60 script (tweakvec.py) through runcommand-onstart:
Do you have an explanation why it doesn't work from the main runcommand.sh either?
Not sure where you actually added that line in
runcommand
, but since it's not going to play well withruncommand
's usage oftvservice
, I'd recommend you use theonstart
script for the necessary commands (tvservice
andtweakvc
). -
Righto, here's the solution for everyone who wants to let RetroPie handle NTSC/ NTSC progressive modes but then switch to the PAL60 equivalent:
Put this intoruncommand-onstart.sh
:(sleep 15 && sudo /home/pi/tweakvec/tweakvec.py --preset PAL60) &
If it doesn't work for your Pi, try sleeping a bit longer. On my Pi3, 15 seconds seems like the sweet spot.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.