Monday, October 28, 2024

Synergy, restarting the service from the PowerShell command line because you need to...

I ran into a technical issue recently, and the solution wasn't available via simple Googling, so time for another post! 

I use Symless's Synergy application to work between a few machines at home, so I only need to use one keyboard and mouse across multiple screens and systems. Very handy, I recommend you check it out here: (non-sponsored link) Synergy - Share one mouse & keyboard across computers

It's been working fairly well between multiple systems. One of those systems is a laptop, with a docking station, and an external monitor. That one system has caused me issues, and here's how/when I rant into problems.

The scenario:

1) Use laptop, away from the laptop dock. Screen size is 1300x768 (whatever the screen size is). Works great. Synergy isn't really in play, but all good. No issues.

2) Put laptop to sleep, plug back into dock. Synergy links back up, and I can log back into the system using the keyboard plugged into the other machine...and the WQHD monitor connected to the laptop.

This is where the issue rears its head. Synergy thinks the screen is still the laptop-sized screen, instead of the external monitor that's being used. Illustrative example below. The laptop was operating at 1920x1280 (for example) but the external monitor is operating at 4k UHD...and Synergy hasn't adjusted from 1080p worth of real estate to the 4k resolution.




The net result is that you can't move the mouse to the lower right corner of the screen to get access to the Synergy app. You also can't restart the app inside the app itself, that I can tell.

What I have figured out is that I can restart the Synergy daemon from the command line and it will reconnect to the main Synergy-equipped computer, and will reassess the screen size. Here's how to do it:

  1. On the affected computer (my laptop in my example) Hit the Windows key
  2. Type [power...], find Powershell in the search result, and then choose Run As Administrator.
  3. Wait for the powershell window to open.
  4. Type [Restart-S][tab] [Syn][tab] will result in: Restart-Service 'Synergy 3 Daemon' [hit enter] (see below)
  5. Wait for the restart, and then the Synergy should sync back up and you're good to go!

Let me know if this is useful!

Chris



No comments:

Post a Comment