I3 screen freeze leaving X device embedded in terminal emulator!

Details of the freeze can be found here: Random screen freezes but can still use mouse/shortcuts.

At the time of freeze, I was running an Nvim-R session with a graphics device that was being displayed on my primary monitor. Upon restarting my machine, I now have this plot, which was displayed on the graphics device, embedded (faintly) in my terminal emulator (st)! Fortunately, after opening and closing a terminal multiple times, I have managed to remove this albeit faint imprint.

Could someone explain how this might be possible? I mean, after restarting my system, there is information that persists regarding the previous session and, strangely, is embedded in an application somehow. I don’t know why this can or should happen.

Whilst frozen, I generated the log using DISPLAY=:0 i3-dump-log. Here’s the final few lines from the output:

>     ../i3-4.19.1/src/resize.c:resize_find_tiling_participants:71 - Find two participants for resizing container=0x7ffd3278ef68 in direction=0
> ../i3-4.19.1/src/resize.c:resize_find_tiling_participants:113 - Found participants: first=0x557f22b8daf0 and second=0x557f22b8ce30.
> ../i3-4.19.1/src/resize.c:resize_find_tiling_participants:71 - Find two participants for resizing container=0x7ffd3278ef68 in direction=2
> ../i3-4.19.1/src/resize.c:resize_find_tiling_participants:113 - Found participants: first=0x557f22bea3e0 and second=(nil).
> ../i3-4.19.1/src/resize.c:resize_find_tiling_participants:117 - Could not find two participants for this resize request.
> ../i3-4.19.1/src/resize.c:resize_find_tiling_participants:71 - Find two participants for resizing container=0x7ffd3278ef68 in direction=1
> ../i3-4.19.1/src/resize.c:resize_find_tiling_participants:108 - No second container in this direction found, trying to look further up in the tree...
> ../i3-4.19.1/src/resize.c:resize_find_tiling_participants:113 - Found participants: first=0x557f22bea3e0 and second=(nil).
> ../i3-4.19.1/src/resize.c:resize_find_tiling_participants:117 - Could not find two participants for this resize request.
> ../i3-4.19.1/src/resize.c:resize_find_tiling_participants:71 - Find two participants for resizing container=0x7ffd3278ef68 in direction=3
> ../i3-4.19.1/src/resize.c:resize_find_tiling_participants:113 - Found participants: first=0x557f22bea3e0 and second=(nil).
> ../i3-4.19.1/src/resize.c:resize_find_tiling_participants:117 - Could not find two participants for this resize request.
> ../i3-4.19.1/src/con.c:con_border_style_rect:1674 - The border width for con is set to: 2
> ../i3-4.19.1/src/con.c:con_border_style_rect:1683 - Effective border width is set to: 2
> ../i3-4.19.1/src/render.c:render_con:106 - child will be at 2x2 with size 1431x1578
> ../i3-4.19.1/src/render.c:render_output:379 - child at (0, 1620) with (2880 x 0)
> ../i3-4.19.1/src/render.c:render_con:51 - Rendering node 0x557f22b95da0 / bottomdock / layout 3 / children 0
> ../i3-4.19.1/src/render.c:render_root:233 - Rendering floating windows:
> ../i3-4.19.1/src/x.c:x_push_changes:1164 - -- PUSHING WINDOW STACK --
> ../i3-4.19.1/src/x.c:x_push_changes:1239 - PUSHING CHANGES
> ../i3-4.19.1/src/x.c:x_push_changes:1332 - ENDING CHANGES
> ../i3-4.19.1/src/tree.c:tree_render:464 - -- END RENDERING --
> ../i3-4.19.1/src/handlers.c:handle_event:1271 - event type 85, xkb_base 85
> ../i3-4.19.1/src/handlers.c:handle_event:1280 - xkb event, need to handle it.
> ../i3-4.19.1/src/handlers.c:handle_event:1306 - xkb state group = 0
> ../i3-4.19.1/src/handlers.c:handle_event:1271 - event type 85, xkb_base 85
> ../i3-4.19.1/src/handlers.c:handle_event:1280 - xkb event, need to handle it.
> ../i3-4.19.1/src/handlers.c:handle_event:1306 - xkb state group = 0
> ../i3-4.19.1/src/handlers.c:handle_event:1271 - event type 85, xkb_base 85
> ../i3-4.19.1/src/handlers.c:handle_event:1280 - xkb event, need to handle it.
> ../i3-4.19.1/src/handlers.c:handle_event:1306 - xkb state group = 0
> ../i3-4.19.1/src/handlers.c:handle_event:1271 - event type 85, xkb_base 85
> ../i3-4.19.1/src/handlers.c:handle_event:1280 - xkb event, need to handle it.
> ../i3-4.19.1/src/handlers.c:handle_event:1306 - xkb state group = 0
> ../i3-4.19.1/src/handlers.c:handle_event:1271 - event type 85, xkb_base 85
> ../i3-4.19.1/src/handlers.c:handle_event:1280 - xkb event, need to handle it.
> ../i3-4.19.1/src/handlers.c:handle_event:1306 - xkb state group = 0
> ../i3-4.19.1/src/handlers.c:handle_event:1271 - event type 85, xkb_base 85
> ../i3-4.19.1/src/handlers.c:handle_event:1280 - xkb event, need to handle it.
> ../i3-4.19.1/src/handlers.c:handle_event:1306 - xkb state group = 0

edit: Less than 12 hours later it happened again, but this time the dump log looks more interesting -

 ../i3-4.19.1/src/startup.c:startup_timeout:36 - Timeout for startup sequence i3/st/1309-1-myusername_TIME49073799
 ../i3-4.19.1/src/handlers.c:handle_event:1271 - event type 33, xkb_base 85
 ../i3-4.19.1/src/handlers.c:handle_event:1271 - event type 33, xkb_base 85
 ../i3-4.19.1/src/handlers.c:handle_event:1271 - event type 33, xkb_base 85
 ../i3-4.19.1/src/startup.c:startup_monitor_event:235 - startup sequence i3/st/1309-1-myusername_TIME49073799 completed
 ../i3-4.19.1/src/startup.c:startup_monitor_event:240 - Will delete startup sequence i3/st/1309-1-myusername_TIME49073799 at timestamp 1626052750
 ../i3-4.19.1/src/startup.c:startup_sequence_delete:106 - Deleting startup sequence i3/st/1309-0-myusername_TIME48971224, delete_at = 1626052647, current_time = 1626052720
 ../i3-4.19.1/src/startup.c:startup_monitor_event:244 - No more startup sequences running, changing root window cursor to default pointer.
 ../i3-4.19.1/src/handlers.c:handle_event:1271 - event type 17, xkb_base 85
 ../i3-4.19.1/src/handlers.c:handle_destroy_notify_event:536 - destroy notify for 0x004000bd, 0x004000bd
 ../i3-4.19.1/src/handlers.c:handle_unmap_notify_event:465 - UnmapNotify for 0x004000bd (received from 0x004000bd), serial 3968
 Not a managed window, ignoring UnmapNotify event

Also, this only happens when I have a second monitor connected so I figure I’ll share the command which I run any time I connect my external display:

xrandr --output eDP1 --primary --mode 2560x1440 --pos 0x1080 --rotate normal --output DP-1 --off --output HDMI1 --mode 1920x1080 --pos 320x0 --rotate normal
xrandr --output eDP1 --scale 1x1 --pos 160x1620
xrandr --output HDMI1 --scale 1.5x1.5 --mode 1920x1080 --fb 3840x4200 --pos 0x0

Sorry, this is beyond my technical abilities, but I thought you might try raising an issue on github, or just contacting airblader on reddit (or just posting on r/i3wm)