rustdesk icon indicating copy to clipboard operation
rustdesk copied to clipboard

Win10 -> MacOS black screen with mouse cursor only (awake and keep the screen unlocked for all OS)

Open misaka10086 opened this issue 3 years ago • 29 comments

Describe the bug you encountered: When Win10(should be any version of client but only tested on Win10 yet) try to connect a MacOS machine with RustDesk pre-installed(internal Remote Desktop function also enabled which allow VNC client to connect). If the target Mac is auto locked due to long time no operation, it will show a black screen with mouse cursor only and unable to show login page.

One way to resolve it is open a tunnel of port 5900(VNC) and run VNC viewer to connect to target machine and it will prompt login page normally, once unlocked, close VNC viewer and back to RustDesk, the login page is now prompted.

What did you expect to happen instead? When connected, a login page(same as login locally) should be displayed which allows unlock remote machine. ...

How did you install RustDesk? Github release

RustDesk version and environment Windows: 1.1.8 MacOS: 1.1.6 Mac mini m1(OS version: Big Sur 11.5) with no external display This bug can only be recreated when target machine is locked(either manually or automatic due to timeout)

misaka10086 avatar Sep 13 '21 16:09 misaka10086

Screenshot of Win10 Rustdesk after connected: HKVA3NI 5NY}I8MF6W5 (R

misaka10086 avatar Sep 13 '21 16:09 misaka10086

A background service with privilege is required, should be duplicate to https://github.com/rustdesk/rustdesk/issues/77

rustdesk avatar Sep 13 '21 17:09 rustdesk

Any progress?

Lighfer avatar May 30 '22 00:05 Lighfer

I am also curious about any news regarding this issue. I can confirm that this issue persists with the latest version 1.1.9 on both Windows 10 and macOS. I have provided all permissions required by RuskDesk on my Mac.

In addition, this behavior is also reproducible from Android 12 (version 1.1.10-1) to macOS, again I only see a black screen with a cursor.

mrcblt avatar Aug 31 '22 19:08 mrcblt

Is there any update on this issue. I still cannot connect to any Mac that has gone to sleep.

Thanks.

donthomas21 avatar Oct 11 '22 13:10 donthomas21

@asur4s

rustdesk avatar Oct 11 '22 14:10 rustdesk

I just met the similar issue. But I find that I can only see the previous screen (yesterday evening), now MacOS should be on lock screen to input password.

tan-wei avatar Nov 08 '22 00:11 tan-wei

Still an issue, lock screen does not render via rustdesk. If I connect via another remote software the screen will show and then everything will work in rustdesk.

working-name avatar Dec 19 '22 15:12 working-name

There is a temporary solution:

  1. open a tcp tunnel to remote host's ssh port
  2. ssh to remote host, andcaffeinate -u to wake up the screen

Lighfer avatar Dec 20 '22 01:12 Lighfer

#981 - to be tackled when they have time.

working-name avatar Dec 25 '22 19:12 working-name

Hi I intorduced a small hack to overcome this problem by integrating caffeinate in the source, in case somebody wants to use it: https://github.com/rustdesk/rustdesk/compare/master...fazakis:rustdesk:mac_hack

fazakis avatar Dec 27 '22 09:12 fazakis

Hi I intorduced a small hack to overcome this problem by integrating caffeinate in the source, in case somebody wants to use it: master...fazakis:rustdesk:mac_hack

But I think spawn is better, output will block for 2 seconds.

rustdesk avatar Dec 27 '22 10:12 rustdesk

Hi I intorduced a small hack to overcome this problem by integrating caffeinate in the source, in case somebody wants to use it: master...fazakis:rustdesk:mac_hack

But I think spawn is better, output will block for 2 seconds.

Thanks fixed that

fazakis avatar Dec 27 '22 20:12 fazakis

@fazakis good job, could you submit a pull request?

rustdesk avatar Dec 29 '22 06:12 rustdesk

After https://github.com/rustdesk/rustdesk/pull/2678 the wake up problem should be solved (#981)

Time to try the latest nightly https://github.com/rustdesk/rustdesk/releases/tag/nightly

Still any issues?

grummbeer avatar Feb 08 '23 10:02 grummbeer

@grummbeer yes, caffeinate is not run periodically and so the remote mac goes to sleep after the timeout and leaves rustdesk in the dark or disconnects it. To get it back ones has to disconnect and reconnect to wait for rustdesk to run caffeinate.

working-name avatar Feb 08 '23 13:02 working-name

Need to add something in wakelock pub to prevent mac from sleeping. @sj6219 wondering if you have interest to take a look at this. Remove wakelock after connection closed.

https://github.com/creativecreatorormaybenot/wakelock/blob/main/wakelock_macos/macos/Classes/WakelockMacosPlugin.swift

rustdesk avatar Feb 08 '23 13:02 rustdesk

thanks for explaination.

To get it right. Wakelock can only help when connected to an running Mac (to prevent it from falling into dreams), but not when trying to connect to an already sleeping mac? In this case caffeinate will waking up the mac?

Beware, force keeping it awake (depend on connection not on active usage) could be security/privacy related.

grummbeer avatar Feb 08 '23 14:02 grummbeer

It is questionable whether the ability to prevent clients from falling asleep while connecting to the server is required. Because user can just wake the client up with a mouse or keyboard. I guess what the user wants is the ability to wake up a Mac computer server remotely that is sleeping.

I tried waking up Mac computers remotely, but it isn't easy. As someone else explained above, if you try to connect to the port of vnc or ssh program that Apple provided the server, the server wakes up. However, in the case of the 3rd party program like rustdesk, there seems to be no wake-up function.

It's even very difficult to set up the wake on lan on the Mac.

sj6219 avatar Feb 28 '23 08:02 sj6219

This PR https://github.com/rustdesk/rustdesk/pull/2678 does not work for you?

rustdesk avatar Feb 28 '23 08:02 rustdesk

I don't know how to use it. I briefly analyzed the source, and it seems to prevent the server from falling asleep while the client connects to the server. It doesn't seem to wake up a server that's already asleep.

sj6219 avatar Feb 28 '23 09:02 sj6219

I just tested, this PR (with nightly build) does awake my sleeping mac. But I got "offline" message after sleeping a while (more than 15 seconds, no matter installed as background service or not). So the problem becomes how to make the connection online while sleeping.

rustdesk avatar Feb 28 '23 09:02 rustdesk

I tested it, but it doesn't work.

By the way, it's amazing that you can wake up a server that's already asleep.

sj6219 avatar Feb 28 '23 10:02 sj6219

https://github.com/rustdesk/rustdesk/discussions/3732

rustdesk avatar Mar 21 '23 15:03 rustdesk

Hi. I was the guy that asked if there is an option like others remote desktop apps that block the Windows to lock the screen while the Remote connection is open. After some research I realized that most apps send some key inputs time to time to archive that... like NUMLOCK twice in sequence.

That is the only issue I'm having right now moving from AnyDesk... the notebook in on my side but when I'm doing something in the main notebook the remove (on my side) goes locked... and the Windows login screen is based in Domain and limit the Remote Desktop apps to show it so I had to move a bit to side to login win in the machine to make the Remote Controll works again.

Can something like that to be implemented? Like each 30 seconds innactive to send some keys to keep the windows unlocked.

ethpsantos avatar Mar 22 '23 19:03 ethpsantos

@sj6219

It is questionable whether the ability to prevent clients from falling asleep while connecting to the server is required. Because user can just wake the client up with a mouse or keyboard. I guess what the user wants is the ability to wake up a Mac computer server remotely that is sleeping.

Maybe each case is a case... the remote PC is a bit away from me and I need to wake up go there and unlock it (because consumer windows prevent the remote app to enter credentials). Having to make that 20 times or more a day is really painful.

So while I'm connected to the remove PC it should have an option to not enter in lock screen or sleep at all. That is how AnyDesk always worked for me.

ethpsantos avatar Apr 03 '23 18:04 ethpsantos

Hello. Some update.

I found an app called Caffeine (seems like Insommia do the same but I did not tested) and I'm letting it active while I'm using Rustdesk... the only annoying is that I have to remember to turn it off when I will left remote session at the end of day to let Windows lock the screen and my childrens didn't mess with it after school.

For now it is working very well.. it could be better if it was auto in the Rustdesk but it is fine.

ethpsantos avatar Apr 18 '23 14:04 ethpsantos

This problem also occurs in the ArchLinux KDE desktop environment of the Wayland Protocol

Silentdoer avatar Apr 20 '23 02:04 Silentdoer

  • [ ] https://github.com/rustdesk/rustdesk/discussions/4452 https://github.com/rustdesk/rustdesk/issues/550 https://github.com/rustdesk/rustdesk/pull/729

rustdesk avatar May 23 '23 03:05 rustdesk

I wanted to share that you guys are awesome. You don't know how much happiness I have with your app after it stopped to go back to login screen in the remote host. Thanks so much.

ethpsantos avatar Aug 02 '23 19:08 ethpsantos