sublime_merge icon indicating copy to clipboard operation
sublime_merge copied to clipboard

Sublime Merge in WSL and putting computer to sleep

Open MichalSkoula opened this issue 1 year ago • 2 comments

Version info

  • OS: Windows 11
  • Build: 2096

Description

When using Sublime Merge in WSL2 (Debian 12), I noticed that if I put the computer to sleep, Sublime Merge has an active process (visible in htop), but the window is gone. It cannot be started until I manually exit the process.

Steps to reproduce

  1. Open smerge in WSL2 using "smerge" command
  2. Put computer to sleep
  3. Wake up
  4. Smerge is closed and cannot be opened unless I kill the hanging process

Expected behavior

It should remain opened or kill itself completely so I can start it again :)

Debug Information

=== App Version Information === Build: 2096

=== Git Version Information === Using Git: git (system) git version 2.39.2 PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/Microsoft/jdk-11.0.22.7-hotspot/bin:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/Microsoft SQL Server/150/Tools/Binn/:/mnt/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn/:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files (x86)/Tailscale IPN:/mnt/c/ProgramData/ComposerSetup/bin:/mnt/c/Program Files (x86)/gnupg/bin:/mnt/c/Program Files/GitHub CLI/:/mnt/c/Program Files/nodejs/:/mnt/c/Program Files/PowerShell/7/:/mnt/c/Program Files/Git/cmd:/Docker/host/bin:/mnt/c/Users/skoul/AppData/Local/Programs/Python/Launcher/:/mnt/c/Users/skoul/AppData/Local/Programs/Python/Python38/Scripts/:/mnt/c/Users/skoul/AppData/Local/Programs/Python/Python38/:/mnt/c/Users/skoul/AppData/Local/Microsoft/WindowsApps:/mnt/c/wamp64/bin/php/php8.1.0:/mnt/c/Users/skoul/AppData/Roaming/Composer/vendor/bin:/mnt/d/OneDrive/Shared/cli:/mnt/c/Program Files/Google/Chrome/Application/chrome.exe:/mnt/c/Users/skoul/.dotnet/tools:/mnt/c/Users/skoul/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/skoul/.dotnet/tools:/mnt/c/Users/skoul/AppData/Roaming/npm

=== Browse Page Information === HEAD: 8883835f9f6f797bb80b6b3838aa78106775be20 Is in merge: 0 Is in cherry_pick: 0 Is in rebase: 0 Is in revert: 0

=== Git Status Information === M app/shop/views/shared/shop_additional_services/shop_additional_services_belong_to_product_product_view.php M assets3/shared/css/styles_eshop.less

=== Our Status Information === M app/shop/views/shared/shop_additional_services/shop_additional_services_belong_to_product_product_view.php M assets3/shared/css/styles_eshop.less

=== Git Config Information === advice.ignoredhook=false alias.tree=log --oneline --graph --decorate --all ... [email protected] user.name=MichalSkoula

=== Our Config Information === Git Config Path Information Using config path: /etc/gitconfig Using config path: /home/michal/.config/git/config Using config path: /home/michal/.gitconfig Using config path: /home/michal/exitshop.test/.git/config

Our config output is identical to the Git config output

=== Git Attributes Information === git check_attr --all output app/shop/views/shared/shop_additional_services/shop_additional_services_belong_to_product_product_view.php app/shop/views/shared/shop_additional_services/shop_additional_services_belong_to_product_product_view.php: text: auto assets3/shared/css/styles_eshop.less assets3/shared/css/styles_eshop.less: text: auto

=== Our Modified Files Newline Normalisation and EOL Information === app/shop/views/shared/shop_additional_services/shop_additional_services_belong_to_product_product_view.php: automatic - native assets3/shared/css/styles_eshop.less: automatic - native

=== Our Modified Files Flag Information === Ignoring symlinks: 1 app/shop/views/shared/shop_additional_services/shop_additional_services_belong_to_product_product_view.php: Working - Normal File : Index - Normal File assets3/shared/css/styles_eshop.less: Working - Normal File : Index - Normal File

MichalSkoula avatar May 28 '24 06:05 MichalSkoula

I have a similar issue with it crashing until I kill it and restart in WSL

Jaxkr avatar Sep 27 '24 23:09 Jaxkr

Exactly. I came up with this workaroud :) script (.bat) that kills smerge in wsl and then hibernate :)

:: @echo off
:: Send command to WSL to close Sublime Merge
wsl pkill sublime_merge
:: Wait for 3 seconds
timeout /t 3 /nobreak > NUL
:: Hibernate the PC
rundll32.exe powrprof.dll,SetSuspendState 0,1,0

MichalSkoula avatar Oct 01 '24 06:10 MichalSkoula

Same issue, for years now. I wish I didn't have to use WSLg, but would really appreciate a fix. I'm sure it is also a WSL bug, but many other applications do work better so it may be fixable.

wmakley avatar Sep 19 '25 19:09 wmakley

I stopped using sublime merge because of this bug. 1,2k issues and no one cares. This is PAID product!

MichalSkoula avatar Sep 19 '25 19:09 MichalSkoula

WSLg is also a buggy unmaintained mess so I am sympathetic, but I am stuck with it.

wmakley avatar Sep 19 '25 19:09 wmakley