johndbritton / teleport

Virtual KVM for macOS
GNU General Public License v2.0
785 stars 131 forks source link

Mouse control becomes unstable after long use #95

Open spjohnst opened 3 years ago

spjohnst commented 3 years ago

Bug report

What you were trying to do (and why)

Use the mouse to control another device; selecting text in particular is difficult when this happens.

What happened (include any debug output)

It is difficult to control the mouse; it starts jumping more than it should and makes using teleport almost impossible.

What you expected to happen

Smooth mouse control—like soon after restarting the application.

Step-by-step reproduction instructions

Simply wait—it takes a few days to appear as an issue.

Environment information

Server (Mac with keyboard and pointing device)

Client (Mac being remotely controlled)

stanger commented 3 years ago

I frequently run into another extended-use related issue. After about 24 hours of use the teleport application will start hanging on the client machines after moving focus over to that machine. The mouse and keyboard will still work, but the Application will not respond and it is not possible to move focus back to the server machine until the Teleport app either starts responding again or the application is terminated.

I operate in a three machine configuration with a 2019 MacBook Pro as the server machine flanked by a 2020 27" iMac and a 2015 27" iMac.

EDIT I was running a build from January 5th, not the build in HomeBrew. I have switched over to that build and will amend this if I run into the issue again or in a couple days if nothing crops up.

tomads commented 3 years ago

I had a similar problem. Scrolling between different screens on the client became quite jerky after a while. As a workaround, I now use an AppleScript that restarts Teleport with the help of the app 'EventScripts' every time, the client wakes up from sleep mode. Since then everything works fine for a longer period of time.

Maybe this will help until there might be a fix for this problem.

Greetings

Tom

briantully commented 2 years ago

I've been having this same issue!!! It's been happening for months, maybe once a week, and the only thing that resolves it is to force reboot my secondary/client machine. I've been trying to debug this for weeks, but sadly none of my Mac's logs give any hint that there's an issue when the freeze occurs. Again it's the very same issue that is described here, where on wake from sleep when I teleport over to the client machine my host machine shows the bezel that it is controlling the secondary machine. However on the secondary machine everything is "frozen" other than the mouse cursor. I can move the mouse cursor but clicking on windows does nothing. The keyboard doesn't work so I can't use the force quit keyboard shortcut. Once thing I've noticed is that the menu bar clock usually also freezes, indicating the time of when the freeze occurred. For example, my host machine will say 11:45pm whereas the frozen client machine will say 11:40pm indicating that the freeze occurred 5 minutes ago. Again, even though I can move the cursor i cannot click anything to change focus and the keyboard is unresponsive. The only solution is to force reboot the client machine by holding down the power button. @tomads any chance you can share your AppleScript via gist or some other method?

tomads commented 2 years ago

Here`s the script:

tell application "Finder" try tell application "teleport" to quit repeat tell application "System Events" if "teleport" is not in (name of application processes) then exit repeat end tell do shell script "sleep 0.5" end repeat delay 5 tell application "teleport" to activate end try end tell

Enjoy.

Tom

briantully commented 2 years ago

Thanks so much @tomads ! The Applescript/Eventscript combination has really improved my secondary machine's stability. It's been a full week without it freezing and me having to force reboot the computer.

I'm still experimenting with Eventscript to figure out what the best "event" should be used to trigger the teleport restart Applescript. So far I've settled on "Screen password unlocked" on my primary machine (with keyboard/mouse) and "Screensaver stopped" and "Screen did wake" on my secondary/client machine.

One odd thing that happens periodically is that when the Eventscript runs on both host and client machines, teleport on the host machine will do its restart, but then quit after the client machine does its teleport restart (triggered by Eventscript). Does this happen for you as well?

tomads commented 2 years ago

No, that did not happen with me. However, I had configured EventScripts on both Macs so that the restart only occurred after exiting sleep mode. Maybe that's the reason?

Am 29.06.2022 um 19:51 schrieb Brian Tully @.***>:

Thanks so much @tomads https://github.com/tomads ! The Applescript/Eventscript combination has really improved my secondary machine's stability. It's been a full week without it freezing and me having to force reboot the computer.

I'm still experimenting with Eventscript to figure out what the best "event" should be used to trigger the teleport restart Applescript. So far I've settled on "Screen password unlocked" on my primary machine (with keyboard/mouse) and "Screensaver stopped" and "Screen did wake" on my secondary/client machine.

One odd thing that happens periodically is that when the Eventscript runs on both host and client machines, teleport on the host machine will do its restart, but then quit after the client machine does its teleport restart (triggered by Eventscript). Does this happen for you as well?

— Reply to this email directly, view it on GitHub https://github.com/johndbritton/teleport/issues/95#issuecomment-1170301159, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLVU4B6Z7GIBZ6ERD34UZDVRSEJJANCNFSM4Z3ET3NQ. You are receiving this because you were mentioned.

briantully commented 2 years ago

Thanks. Sorry to be a nag, but there are several sleep related events within Eventscripts. Do you know if you have it set to "Computer wakes" or "Screen did wake"? Thanks again :)

tomads commented 1 year ago

Computer Wakes …

Am 29.06.2022 um 22:39 schrieb Brian Tully @.***>:

 Thanks. Sorry to be a nag, but there are several sleep related events within Eventscripts. Do you know if you have it set to "Computer wakes" or "Screen did wake"? Thanks again :)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

TheFou commented 1 year ago

Hi, Just to add my voice, same issue here, more and more unstable over time on the slave computer. No memory leak or excessive CPU activity though... I will monitor closely to find a clue.