Workaround for performance problems on video mode changes #110
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem:
Please see MiSTer-devel/Main_MiSTer#873
Workaround:
The safest approach is to redirect MiSTer's output to
/dev/null
. The challenge is to make that easy, automatic, and persistent.My solution is to move the MiSTer binary and replace it with a shell script that calls the real binary and redirects the output. The user can run
redirect_mister_output_to_file.sh /dev/null
for best performance and zero disk space consumption, or they can redirect output to a local log file (example:/tmp/MiSTer.log
) for troubleshooting.The script moves the original MiSTer binary to
/media/fat/main/stable/MiSTer
, then creates a symlink to it at/media/fat/main/MiSTer
, and finally writes a shell script to/media/fat/MiSTer
that calls the symlink. This structure is good for a user who switches between different stable and unstable builds. They can keep downloaded binaries organized (example:/media/fat/main/stable/MiSTer_20270606
,/media/fat/main/unstable/MiSTer_unstable_20290103_7432a62
) and just update the symlink to point to the one they want. The symlink makes it very clear which MiSTer build they are using.I have used this on my MiSTer for a few months, because I wanted to make sure it didn't create any new problems or interfere with
update_all.sh
. When the updater downloads a new stableMiSTer
binary and overwrites/media/fat/MiSTer
, the user can just runredirect_mister_output_to_file.sh /dev/null
again to restore the setup. If the user wants it to fix itself automatically, they can add that command/media/fat/linux/user-startup.sh
so the next reboot will fix it.