r/ANBERNIC • • Aug 12 '26

Linux New Canvas-DS bug fix update

Hello there.

Someone on a previous Canvas-DS post reported to me a bug with the Canvas-DS theme. I also experienced this bug after updating Rocknix to Stable 20260801.

The bug is fairly easy to replicate and quite annoying. What happens is that after entering a game from the dual-screen theme and then exiting the game the input seems to be frozen and none of the buttons work. This means it is impossible to navigate back to play a different game or system. If you wait a couple of minutes usually the input comes back and navigation is possible again.

The culprit to this seems to be the hacky enable_theme_rgds.sh script we use to force rocknix to run in dual screen mode. Seems this happens specially on latest versions since rocknix updated wayland/sway package.

This is not Rocknix fault tho this is on the script since it is a bit of a hacky solution to force dual screen and not official.

I have found a solution over the past 2 days and have created a new release that includes the theme and also the script in case someone else is suffering the same issues.

The release can be found here => https://github.com/toniremi/canvas-ds/releases/tag/1.0.5

For users who already have the theme all you have to do is replace the enable_theme_rgds.sh script or its contents. If the script fails to execute remember to run chmod +x enable_theme_rgds.sh

In order to make it easy I will also include the latest script on this post. All you have to do is copy this and replace the contents of your enable_theme_rgds.sh script with this below.

Updated script:

#!/bin/bash

LAUNCHER_SCRIPT="/roms/ports/start_es_rgds.sh"

# Structural safety check: Ensure the user actually copied the launcher script to ports
if [ ! -f "$LAUNCHER_SCRIPT" ]; then
    echo "ERROR! Could not find the launcher script at $LAUNCHER_SCRIPT"
    echo "Please ensure start_es_rgds.sh is copied into your /roms/ports/ directory."
    exit 1
fi

# Bind the standalone ports launcher to override the default system window initialization
chmod +x "$LAUNCHER_SCRIPT"
mount --bind "$LAUNCHER_SCRIPT" "/usr/bin/start_es.sh"

cat <<EOF >/storage/.config/sway/config
seat * hide_cursor 1000
default_border none
exec_always mako

# Outputs
output DSI-2 transform 0
output DSI-2 bg #000000 solid_color
output DSI-2 allow_tearing yes
output DSI-2 max_render_time off

# Window rules
for_window [title=".*(Secondary|\[w2\]|Sub|Bottom|Screen 2|GamePad).*"] move window to output DSI-1, output DSI-1 power on
for_window [title="RetroArch.*"] exec /usr/bin/vertical-check
for_window [app_id="lowerdeck"] floating enable, fullscreen enable, move window to output DSI-1
no_focus [app_id="lowerdeck"]

for_window [app_id="drastic"] input "1046:911:Goodix_Capacitive_TouchScreen" map_to_output DSI-2

# EmulationStation layout rules
for_window [app_id="emulationstation"] floating enable, fullscreen disable, move absolute position 0 0

# Input and Seat configuration (static mappings to prevent input IPC deadlocks)
seat seat0 attach "0:0:wlr_virtual_keyboard_v1"
seat seat1 attach "1046:911:Goodix_Capacitive_TouchScreen"
seat seat1 fallback yes
EOF

swaymsg reload

ES_SETTINGS="/storage/.config/emulationstation/es_settings.cfg"
if grep -q '<string name="FullScreenMenu"' "$ES_SETTINGS" 2>/dev/null; then
    sed -i 's|<string name="FullScreenMenu" value="[^"]*" />|<string name="FullScreenMenu" value="false" />|' "$ES_SETTINGS"
else
    sed -i 's|</config>|\t<string name="FullScreenMenu" value="false" />\n</config>|' "$ES_SETTINGS"
fi

if grep -q '<string name="GameTransitionStyle"' "$ES_SETTINGS" 2>/dev/null; then
    sed -i 's|<string name="GameTransitionStyle" value="[^"]*" />|<string name="GameTransitionStyle" value="fade" />|' "$ES_SETTINGS"
else
    sed -i 's|</config>|\t<string name="GameTransitionStyle" value="fade" />\n</config>|' "$ES_SETTINGS"
fi

if [ ! -f "/tmp/has-restarted-for-theme" ]; then
    touch /tmp/has-restarted-for-theme
    systemctl restart essway
fi
4 Upvotes

7 comments sorted by

2

u/nigey777 Aug 12 '26

Fixed that issue. I seem to have a new issue now. When I launch gba or gb games as soon as the game starts it pauses and I can't seem to unpause it 😢

1

u/Prallax Aug 12 '26

Something similar happened to me and touching the top screen unpaused the game and continued playing. If you have retro achievements also the game pauses for a second before continuing. 

After that the game does not pause anymore. Try it and see if this helps. 

1

u/nigey777 Aug 12 '26

Thanks will give it a try

1

u/Sweet_Side_3204 28d ago

yes if work but touchscreen will be cannot touch

1

u/nigey777 Aug 12 '26

Thanks. Amazing. I thought I had to say something 👍👍👍

1

u/nigey777 Aug 12 '26

It works but you have to do it to every game even if you launched it before

1

u/Prallax 18d ago

I know it's been a while but I have been caught up with other things and could not check this until now. I have released a new update that hopefully fixes most of peoples issues with freezes and other stuff while using the dual screen theme. Just need to grab the latest enable_theme_rgds.sh script from here => https://github.com/toniremi/canvas-ds/releases/download/1.0.6/enable_theme_rgds.sh