Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting the share-screen prompt every view minutes in a wayland screen share session #4276

Closed
amenk opened this issue May 5, 2023 · 33 comments
Labels
bug Something isn't working unreproducible Can not be reproduced

Comments

@amenk
Copy link

amenk commented May 5, 2023

Bug Description

I am using two screens

I am getting the prompt which screen to share every few minutes in a session

How to Reproduce

Connect to my computer
wait

Expected Behavior

Don't ask over and over again to share the screen

Operating system(s) on local side and remote side

Ubuntu 22.04 -> Ubuntu 22.04

RustDesk Version(s) on local side and remote side

fc4585b07e2108a01ed271a64241e051 rustdesk-1.2.0-x86_64.deb

Screenshots

image

Additional Context

No response

@amenk amenk added the bug Something isn't working label May 5, 2023
@rustdesk
Copy link
Owner

rustdesk commented May 5, 2023

@fufesou

@rustdesk
Copy link
Owner

rustdesk commented May 5, 2023

@amenk can you try out obs or some video meeting software (screen sharing), or TeamViewer? if they have this behavior.

@fufesou
Copy link
Collaborator

fufesou commented May 5, 2023

@amenk Hi, has your computer ever entered a lock screen state?
Screen sharing on Wayland does not support lock for now.

@amenk
Copy link
Author

amenk commented May 5, 2023

@rustdesk
Microsoft Teams (teams-for-linux / in the browser) does not have the problem, OBS not yet tried. I don't have a TeamViewer license / and AnyDesk does not support Wayland at all (big plus for rustdesk) - would it help to try OBS as well?

@fufesou Yes, I am regularily locking my screen (but the prompt does not seem have a direct relation to that)

Any debug logs to check?

@rustdesk
Copy link
Owner

rustdesk commented May 5, 2023

locking my screen

Did you lock while you tested Teams?

@amenk
Copy link
Author

amenk commented May 5, 2023

@rustdesk yes I am locking my screen all the time when I leave the desk, not necessarily during a Teams session, but I also I did that before and never noticed this re-prompt.

Also I did not lock the screen in the current rustdesk session, and to get this right: it's not like I am locking my screen and then the re-prompt comes, the re-prompt just comes seemingly out of nowhere.

@rustdesk
Copy link
Owner

rustdesk commented May 5, 2023

I do not think it is what we can control, that's also why anydesk etc do not support wayland.

@amenk
Copy link
Author

amenk commented May 5, 2023

Other than that, the wayland support works great :-)

@rustdesk
Copy link
Owner

rustdesk commented May 5, 2023

Are you ok with current circle mouse cursor?

@amenk
Copy link
Author

amenk commented May 5, 2023

@rustdesk what do you mean?

@rustdesk
Copy link
Owner

rustdesk commented May 5, 2023

seem you did not notice that, ignore my question please. :)

@rustdesk
Copy link
Owner

rustdesk commented May 5, 2023

I will close this issue, because we can not find what we can do. Let's collect more feedback from the other users before dive into this.

@amenk
Copy link
Author

amenk commented May 5, 2023

I am also happy to help with debugging, are there debugging logs?

@rustdesk
Copy link
Owner

rustdesk commented May 5, 2023

I am also happy to help with debugging, are there debugging logs?

@fufesou

@amenk
Copy link
Author

amenk commented May 5, 2023

Did some more tests.. .the dialog always comes directly after locking the screen, yes.. (this is fine for me)

But in my earlier session it came also when I was not locking the screen and actively working on something :-)

@amenk
Copy link
Author

amenk commented May 5, 2023

Are you ok with current circle mouse cursor?

I just noticed that the remote side does not see any cursor .. but probably that is another issue :o)

@rustdesk
Copy link
Owner

rustdesk commented May 5, 2023

see any cursor .

Not implemented yet, because we have not found a good / beautiful api to capture cursor image or name yet.

@fufesou
Copy link
Collaborator

fufesou commented May 6, 2023

I am also happy to help with debugging, are there debugging logs?

@amenk Thanks.

The logs on the controlled side may be helpful.

Can you please package and send the log files to me (shuanglongchen@yeah.net) ?

The log file locations are:

~/.local/share/logs/RustDesk
/root/.local/share/logs/RustDesk

And you can also run sudo journalctl -f, to see if any logs are printed when the prompt occurs?
Send to me if you see any.

@amenk
Copy link
Author

amenk commented May 6, 2023

In the moment I only have the chance to try to reproduce with Android on the controlling side - so far it did not happen in this combination.
Will send logs if it happens again for example in the next session with a colleague.

I also have to say that I did not start the service at all in that past session with a colleague where it happend frequently (because I did not need any input control, only sharing). Maybe that might also be related.

I can trigger the re-prompt still with locking the screen, but this is fine.
What's also interesting: Whatever I choose there it has no effect. I have to displays (see also #4288) and initially shared the 2nd screen. Now when the re-prompt comes it does not make a difference if I chose 1st or 2nd. Still 2nd is shared.

I don't know how I even could switch to the 1st screen (probably I would need to delete the config). But that's maybe another issue :-)

But thanks again for this awesome project and the help so far.

@rustdesk
Copy link
Owner

rustdesk commented May 6, 2023

Screencast shows after sudo apt install xdg-desktop-portal xdg-desktop-portal-gnome and reboot.

Known wayland issues.

Wayland is hard to maintain, as RustDesk developer, I failed to bring wayland up on Ubuntu 22.04 .1 (in VM) today, I remember it worked 2 months ago.

image
image

Somehow xdg-desktop-portal has been removed, I install xdg-desktop-portal and xdg-desktop-portal-gnome again, but there is no screencast interface as above (run d-feet).
image

image

image

flatpak/xdg-desktop-portal#861

@rustdesk
Copy link
Owner

rustdesk commented May 6, 2023

I have to close this issue because wayland screencast behavior is so unstable as stated above, it is totally out of our control. We should not spend our limit time on this.

@rustdesk rustdesk closed this as completed May 6, 2023
@rustdesk rustdesk added unreproducible Can not be reproduced and removed unreproducible Can not be reproduced labels May 11, 2023
@fufesou
Copy link
Collaborator

fufesou commented May 11, 2023

Logs from @amenk

It seems that the capturer often fails to capture picture.
The capture and encoder are created in seconds.

the reprompt happened today in a session between 17:33-19:00 quite ofen (approx all 5 minutes)
My colleague is also on Ubuntu.

[2023-05-08 19:04:19.158033 +02:00] INFO [src/rendezvous_mediator.rs:179] request_pk received from rs-sg.rustdesk.com:21116
[2023-05-08 19:04:34.086344 +02:00] ERROR [src/server/service.rs:242] Error of video service: Wayland capturer none 100 times, try restart capture
[2023-05-08 19:04:34.146550 +02:00] DEBUG [src/server/service.rs:239] Enter video service inner loop
[2023-05-08 19:04:34.248396 +02:00] DEBUG [src/server/wayland.rs:143] #displays=1, current=0, origin: (1920, 0), width=3440, height=1440, cpus=8/8
[2023-05-08 19:04:34.252162 +02:00] INFO [src/server/wayland.rs:176] update mouse resolution: (1920, 5360), (0, 1440)
[2023-05-08 19:04:34.284413 +02:00] INFO [src/server/video_service.rs:457] init bitrate=4086, abr enabled:true
[2023-05-08 19:04:34.284465 +02:00] INFO [libs/scrap/src/common/codec.rs:99] new encoder:VPX(VpxEncoderConfig { width: 3440, height: 1440, timebase: [1, 1000], bitrate: 4086, codec: VP9, num_threads: 4 })
[2023-05-08 19:04:39.223719 +02:00] ERROR [src/server/service.rs:242] Error of video service: Wayland capturer none 100 times, try restart capture
[2023-05-08 19:04:39.283928 +02:00] DEBUG [src/server/service.rs:239] Enter video service inner loop
[2023-05-08 19:04:39.380816 +02:00] DEBUG [src/server/wayland.rs:143] #displays=1, current=0, origin: (1920, 0), width=3440, height=1440, cpus=8/8
[2023-05-08 19:04:39.383698 +02:00] INFO [src/server/wayland.rs:176] update mouse resolution: (1920, 5360), (0, 1440)
[2023-05-08 19:04:39.413298 +02:00] INFO [src/server/video_service.rs:457] init bitrate=4086, abr enabled:true
[2023-05-08 19:04:39.413350 +02:00] INFO [libs/scrap/src/common/codec.rs:99] new encoder:VPX(VpxEncoderConfig { width: 3440, height: 1440, timebase: [1, 1000], bitrate: 4086, codec: VP9, num_threads: 4 })
[2023-05-08 19:04:42.137110 +02:00] DEBUG [libs/hbb_common/src/udp.rs:35] Receive buf size of udp 0.0.0.0:0: Ok(212992)
[2023-05-08 19:04:56.144352 +02:00] DEBUG [src/rendezvous_mediator.rs:166] Latency of rs-sg.rustdesk.com:21116: 314.506ms
[2023-05-08 19:04:56.144446 +02:00] INFO [src/rendezvous_mediator.rs:179] request_pk received from rs-sg.rustdesk.com:21116
[2023-05-08 19:05:09.911044 +02:00] DEBUG [src/rendezvous_mediator.rs:166] Latency of rs-cn.rustdesk.com:21116: 320.385ms
[2023-05-08 19:05:12.658555 +02:00] ERROR [src/server/service.rs:242] Error of video service: Wayland capturer none 100 times, try restart capture
[2023-05-08 19:05:12.718760 +02:00] DEBUG [src/server/service.rs:239] Enter video service inner loop
[2023-05-08 19:05:12.793428 +02:00] DEBUG [src/server/wayland.rs:143] #displays=1, current=0, origin: (1920, 0), width=3440, height=1440, cpus=8/8
[2023-05-08 19:05:12.796937 +02:00] INFO [src/server/wayland.rs:176] update mouse resolution: (1920, 5360), (0, 1440)
[2023-05-08 19:05:12.827302 +02:00] INFO [src/server/video_service.rs:457] init bitrate=4086, abr enabled:true
[2023-05-08 19:05:12.827341 +02:00] INFO [libs/scrap/src/common/codec.rs:99] new encoder:VPX(VpxEncoderConfig { width: 3440, height: 1440, timebase: [1, 1000], bitrate: 4086, codec: VP9, num_threads: 4 })
[2023-05-08 19:05:22.371342 +02:00] ERROR [src/server/service.rs:242] Error of video service: Wayland capturer none 100 times, try restart capture
[2023-05-08 19:05:22.431561 +02:00] DEBUG [src/server/service.rs:239] Enter video service inner loop
[2023-05-08 19:05:22.526494 +02:00] DEBUG [src/server/wayland.rs:143] #displays=1, current=0, origin: (1920, 0), width=3440, height=1440, cpus=8/8
[2023-05-08 19:05:22.529570 +02:00] INFO [src/server/wayland.rs:176] update mouse resolution: (1920, 5360), (0, 1440)
[2023-05-08 19:05:22.559975 +02:00] INFO [src/server/video_service.rs:457] init bitrate=4086, abr enabled:true
[2023-05-08 19:05:22.560018 +02:00] INFO [libs/scrap/src/common/codec.rs:99] new encoder:VPX(VpxEncoderConfig { width: 3440, height: 1440, timebase: [1, 1000], bitrate: 4086, codec: VP9, num_threads: 4 })

@rustdesk
Copy link
Owner

reopen as @fufesou will follow up

@rustdesk
Copy link
Owner

@fufesou how about the status of this issue?

@fufesou
Copy link
Collaborator

fufesou commented May 22, 2023

I haven't delved into this issue recently, I'll take a look at it tomorrow.

@Aqua1ung
Copy link

I haven't delved into this issue recently, I'll take a look at it tomorrow.

Please do! We're desperate!

@fufesou
Copy link
Collaborator

fufesou commented May 23, 2023

It may be my fault.
The most probable reason is there is no movement on the screen. There's no need to send new data.
I should not reset the capturer just in a few seconds.

return Ok(PixelProvider::NONE);

This issue may be fixed by PR 4450.

@rustdesk
Copy link
Owner

New build for x86-64 is ready.

@rustdesk
Copy link
Owner

close as fix merged

@bayazidbh
Copy link

I know that this is merged, but portal seems to have merged remote-desktop-restore-token portal per late July, so it might be useful: flatpak/xdg-desktop-portal/pull/1004

@fufesou
Copy link
Collaborator

fufesou commented Sep 4, 2023

@bayazidbh Thanks.

We've already used this feature in our project. 😄

@TamaMcGlinn
Copy link

I just had this error with the latest release of RustDesk (1.2.3-1), on Ubuntu 22.04 LTS; is there any workaround?

@Mr-MooMoo
Copy link

Same error here ; Trying to connect two NixOS/Hyprland Hosts with Client 1.2.4. ((Flutter))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unreproducible Can not be reproduced
Projects
None yet
Development

No branches or pull requests

7 participants