mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-02 19:26:56 -05:00
Failed to obtain screen capture (wayland, on arch/manjora KDE) #1219
Labels
No labels
bug
documentation
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
question
unreproducible
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rustdesk-rustdesk#1219
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jjgalvez on GitHub (Jan 10, 2023).
Describe the bug you encountered:
I know that wayland isn't aware near ready, but I wanted to see where this project was at. I build directly from git (actually AUR rustdesk-git) and tried to connect from Android. When I try to connect I get the screen asking me to accept the session and once I hit accept, my phone immediately responds with "LoginError" "Failed to obtain screen capture"
...
What did you expect to happen instead?
I expected a window to pop up asking me what to share, either the entire screen, or specific window
...
How did you install
RustDesk?from the AUR rustdesk-git bulding from the [
57f9ed3] commit on Arch Linux, KDERustDesk version and environment
version 1.2.0
build date 2023-01-10
running on Arch
KDE Plasma 5.26.5
KDE framework 5.101.0
QT 5.15.8
Kernel 6.1.4
Wayland
Intel i7
Graphics Mesa Intel UHD Graphics 620
Happy to provide any additional information which would help, Thanks for a cool project
@rustdesk commented on GitHub (Jan 10, 2023):
#763
@rustdesk commented on GitHub (Jan 10, 2023):
try out nightly build please. https://github.com/rustdesk/rustdesk/releases/tag/nightly
@rustdesk commented on GitHub (Jan 10, 2023):
Wayland is working in our test. If it does not work for you, hope you can dig in, you know it is not easy to copy another failure dev env. Wayland support is experimental in our dev plan, we have no way to put too much effort on every distro and env for the time being.
@jjgalvez commented on GitHub (Jan 11, 2023):
Tried the nightly build and although it does ask which screen to share, I get the same error on my android device and nothing shows
@jjgalvez commented on GitHub (Jan 11, 2023):
completely understand, right now I am mainly using this to control windows machines. Happy to keep testing.
@st0nie commented on GitHub (Jan 13, 2023):
I was able to reproduce this problem on my kde wayland desktop
@rustdesk commented on GitHub (Jan 14, 2023):
Yes, i can reproduce. @fufesou
@fufesou commented on GitHub (Jan 14, 2023):
I'll test later.
Wayland screen share depends on the portal version and the frontend implement of portal.
@userofryzen commented on GitHub (Jan 21, 2023):
The same here with arch KDE, I'll test with manjaro kde too in a few minutes.
EDIT1: the same in manjaro with KDE
@fufesou commented on GitHub (Jan 28, 2023):
It seems portal does not support some options with KDE.
@jjgalvez @st0nie @userofryzen @rustdesk Can you please download the attached file and run it.
screenshot.tar.gz
My output
2. available_cursor_modes Ok(0)means available cursor mode of portal is 0.Unavailable cursor mode 1.It is strange. https://flatpak.github.io/xdg-desktop-portal/#gdbus-property-org-freedesktop-portal-ScreenCast.AvailableCursorModes
But I'll try to fix this issue by setting cursor mode according to available_cursor_modes.
@userofryzen commented on GitHub (Jan 29, 2023):
@fufesou Response from DBus: response: OrgFreedesktopPortalRequestResponse { response: 0, results: {"session_handle": Variant("/org/freedesktop/portal/desktop/session/1_73/u1")} }, message: Message { Type: Signal, Path: "/org/freedesktop/portal/desktop/request/1_73/u1", Interface: "org.freedesktop.portal.Request", Member: "Response", Sender: ":1.8", Destination: ":1.73", Serial: 195, Args: [0, {"session_handle": Variant("/org/freedesktop/portal/desktop/session/1_73/u1")}] }
REMOVE ME ============== 1. begin create capturer
REMOVE ME ============== 2. available_cursor_modes Ok(7)
You are attempting to capture the cursor under KDE Plasma, this may crash your desktop, see https://bugs.kde.org/show_bug.cgi?id=435042 for details! You have been warned.
REMOVE ME ============== 3. path created
REMOVE ME ============== 4. select source done
Response from DBus: response: OrgFreedesktopPortalRequestResponse { response: 0, results: {} }, message: Message { Type: Signal, Path: "/org/freedesktop/portal/desktop/request/1_73/u2", Interface: "org.freedesktop.portal.Request", Member: "Response", Sender: ":1.8", Destination: ":1.73", Serial: 207, Args: [0, {}] }
REMOVE ME ============== begin start
Response from DBus: response: OrgFreedesktopPortalRequestResponse { response: 0, results: {"restore_token": Variant("cb8c1d01-93b6-4f32-bfec-dd70a7a27b78"), "streams": Variant(InternalArray { data: 66, {"size": Variant([1680, 1050]), "source_type": Variant(1)}, inner_sig: Signature("(ua{sv})\0") })} }, message: Message { Type: Signal, Path: "/org/freedesktop/portal/desktop/request/1_73/u3", Interface: "org.freedesktop.portal.Request", Member: "Response", Sender: ":1.8", Destination: ":1.73", Serial: 223, Args: [0, {"restore_token": Variant("cb8c1d01-93b6-4f32-bfec-dd70a7a27b78"), "streams": Variant(InternalArray { data: 66, {"size": Variant([1680, 1050]), "source_type": Variant(1)}, inner_sig: Signature("(ua{sv})\0") })}] }
REMOVE ME ============== 333
thread 'main' panicked at 'called
Result::unwrap()on anErrvalue: Custom { kind: Other, error: "Failed to obtain screen capture." }', libs/scrap/examples/screenshot.rs:12:28note: run with
RUST_BACKTRACE=1environment variable to display a backtraceAbortado (`core' generado)
@jjgalvez commented on GitHub (Jan 29, 2023):
@fufesou
Response from DBus: response: OrgFreedesktopPortalRequestResponse { response: 0, results: {"session_handle": Variant("/org/freedesktop/portal/desktop/session/1_190/u1")} }, message: Message { Type: Signal, Path: "/org/freedesktop/portal/desktop/request/1_190/u1", Interface: "org.freedesktop.portal.Request", Member: "Response", Sender: ":1.7", Destination: ":1.190", Serial: 665, Args: [0, {"session_handle": Variant("/org/freedesktop/portal/desktop/session/1_190/u1")}] }
REMOVE ME ============== 1. begin create capturer
REMOVE ME ============== 2. available_cursor_modes Ok(7)
You are attempting to capture the cursor under KDE Plasma, this may crash your desktop, see https://bugs.kde.org/show_bug.cgi?id=435042 for details! You have been warned.
REMOVE ME ============== 3. path created
REMOVE ME ============== 4. select source done
Response from DBus: response: OrgFreedesktopPortalRequestResponse { response: 0, results: {} }, message: Message { Type: Signal, Path: "/org/freedesktop/portal/desktop/request/1_190/u2", Interface: "org.freedesktop.portal.Request", Member: "Response", Sender: ":1.7", Destination: ":1.190", Serial: 679, Args: [0, {}] }
REMOVE ME ============== begin start
Response from DBus: response: OrgFreedesktopPortalRequestResponse { response: 0, results: {"restore_token": Variant("d98bbe06-5aa5-446c-8f03-f90ef62e928e"), "streams": Variant(InternalArray { data: 93, {"size": Variant([2560, 1440]), "source_type": Variant(1)}, inner_sig: Signature("(ua{sv})\0") })} }, message: Message { Type: Signal, Path: "/org/freedesktop/portal/desktop/request/1_190/u3", Interface: "org.freedesktop.portal.Request", Member: "Response", Sender: ":1.7", Destination: ":1.190", Serial: 691, Args: [0, {"restore_token": Variant("d98bbe06-5aa5-446c-8f03-f90ef62e928e"), "streams": Variant(InternalArray { data: 93, {"source_type": Variant(1), "size": Variant([2560, 1440])}, inner_sig: Signature("(ua{sv})\0") })}] }
REMOVE ME ============== 333
thread 'main' panicked at 'called
Result::unwrap()on anErrvalue: Custom { kind: Other, error: "Failed to obtain screen capture." }', libs/scrap/examples/screenshot.rs:12:28note: run with
RUST_BACKTRACE=1environment variable to display a backtracezsh: IOT instruction (core dumped) ./screenshot
@fufesou commented on GitHub (Jan 29, 2023):
@userofryzen @jjgalvez Thanks. My PR dose not fix your issue from your output.
I'll install arch KDE and Mandarin and try to fix later.
@fufesou commented on GitHub (Jan 31, 2023):
Capturer can be created now, but the images are totally wrong.
It seems hard to support Arch or Manjora KDE now.
deps:
https://user-images.githubusercontent.com/13586388/215711876-61d84f4c-f109-43d9-8ed1-597087cfccc9.mp4
@rustdesk commented on GitHub (Jan 31, 2023):
Try out obs on it
@fufesou commented on GitHub (Jan 31, 2023):
@userofryzen @jjgalvez Hi, how did you enable wayland on manjora KDE? I installed
pacman -S plasma-wayland-session, maybe it's not a good way. I'm trying Arch linux now.Can you please test obs as well? Thanks.
If obs works, the result should be like this
https://user-images.githubusercontent.com/13586388/215731382-91aca64b-a9ff-4937-a58e-8b110f1ee875.mp4
@userofryzen commented on GitHub (Jan 31, 2023):
Yes, and obs studio works since you install portal packages. I have it
installed already and working while rust desk doesn't works. Actually I
have TeamViewer and TeamViewer works too with Wayland (arch and manjaro
it's the same almost so... )
El mar, 31 ene 2023, 11:12, fufesou @.***> escribió:
@fufesou commented on GitHub (Jan 31, 2023):
My OS seems not installed correctly.
I did not install portal manually. I'll try later.
BTW, I'm using a vm manjora, the default desktop is x11. I switch to wayland by
pacman -S plasma-wayland-session.How did you enable wayland?
@fufesou commented on GitHub (Jan 31, 2023):
@userofryzen And can you please try my nightly build? Maybe it works on your OS 😄.
https://github.com/fufesou/rustdesk/releases/tag/nightly
@userofryzen commented on GitHub (Jan 31, 2023):
You should select plasma(wayland) on sddm, at the start before logging in.
You have to install manually portal packages and after that you'll be able
to. I can't test it right now but I think you can do it. If you have any
other questions tell me
El mar, 31 ene 2023, 13:13, fufesou @.***> escribió:
@jjgalvez commented on GitHub (Jan 31, 2023):
@fufesou I ran OBS and it works as expected capturing the desktop. I tried the nightly build (AppImage) and it did not work I got the same error as before that it could not create the screen capture. As for how I enabled wayland, yes I installed the plasma-wayland-session and then selected that as my session when I logged in
I finally got the build to compile and running the compiled version screen capture is working! haven't tried any input yet, I will give that a try later tonight
@fufesou commented on GitHub (Jan 31, 2023):
I've tried different versions of manjaro, and update all applications. OBS still dose not work. I'm not sure if it is caused by VM.
@jjgalvez Is the latest rustdesk working? Have you ever install
gstreamermanually?pacman -S gst-plugins-base gst-plugin-pipewire@userofryzen commented on GitHub (Jan 31, 2023):
It's probably VM related then. Because portals KDE package and portal package is the only things needed that I have to install manually the last time I installed manjaro or arch. I think pipewire has something to be related with drivers and not every driver works, so, VM thing are interferimg with those thing(?)
I'll give a try when I have time
@jjgalvez commented on GitHub (Jan 31, 2023):
yes I have gstreamer and gst-plugin-pipewire both installed
@jjgalvez commented on GitHub (Jan 31, 2023):
now I just need to figure out what features I should be using to build and make the package. Looking through the build.py file it looks like building with "cargo build --features hwcodec --release" is the way to go. not looked at the incuded PKGBUILD file yet to see if anything needs to be changed, but at this stage I would say thank you so much for getting wayland working!
@fufesou commented on GitHub (Jan 31, 2023):
@jjgalvez You'd better build flutter version. See https://github.com/rustdesk/rustdesk/blob/master/.github/workflows/flutter-nightly.yml for details.
cargo buildresults sciter version, which is not maintained currently.For debug, you can
@jjgalvez commented on GitHub (Jan 31, 2023):
Thanks, I'll review the yml file and give the flutter build a try.
@userofryzen commented on GitHub (Feb 1, 2023):
if you can try the input. I have tested the flatpak version of rustdesk and it's not working the input( but the screen capture yeah) So no idea of whatever is happening. It would be a help to create a arch install package because I can't compile the bin of rustdesk because of my pc resources.
EDIT2: tested with the arch package inside your github page( i didn't see before) all is working well on plasma arch wayland desktop :) input and screen capture.
@fufesou
@jjgalvez commented on GitHub (Feb 1, 2023):
Last night I tested the input from Android to Arch desktop and was able to fully control the desktop. I'm going to try and build the flutter version and will do the same test. FYI I'm now building on full metal no docker or VM if that matters, with rustup from the official repos. I'll be using the latest flutter from the AUR.
@rustdesk commented on GitHub (Feb 1, 2023):
Input is not working in flatpak / appimage + wayland, this is expected, because wayland input requires root.
@userofryzen commented on GitHub (Feb 1, 2023):
shouldn't it in a future be possible to install rustdesk like a flatpak and being able to remote desktop with wayland too?
@rustdesk commented on GitHub (Feb 1, 2023):
It is up to Flatpak, not us.