pavlobu / deskreen

Deskreen turns any device with a web browser into a secondary screen for your computer. ⭐️ Star to support our work!
https://deskreen.com
GNU Affero General Public License v3.0
17.55k stars 962 forks source link

Black Screen cast on Ubuntu 21.04 #140

Open thebaltee opened 3 years ago

thebaltee commented 3 years ago

Ubuntu 21.04 display only Blank screen in the preview window, as well as when casting to a remote device. Latest release, latest updates. Version installed via DEB package. Any suggestions?

thebaltee commented 3 years ago

This may be normal operation, but just a note, casting of an application, works well on 21.04 when the application is in the foreground of the monitor and when it is no longer the focus, the display goes blank.

stefanosavastano commented 3 years ago

I experience the same issue on Ubuntu 20.04.

sangmin7648 commented 3 years ago

Same here on Fedora 34 wayland. Display is shown as black when sharing whole display, only mouse cursor is shown. I would guess it has something to do with not correctly using pipewire for screen share as I've experienced similar thing when sharing screen on zoom.

Edit : just tested it on xorg and can confirm that this is a problem when using wayland. I'm not familar with wayland and general, but I reckon updating some component(electron maybe?) should fix this problem. similar problem on zoom and google meet was resolved when a new pipewire update came along

jlnxr commented 3 years ago

Can confirm on Debian testing using wayland. Sharing an application running via xwayland works but no native wayland applications and not the full desktop. Under xorg, no problems, so this is clearly related to wayland.

Likewise can confirm zoom update solved the desktop sharing under wayland issue for them, so clearly this is technically possible.

Hopefully this can be fixed- I've been using wayland for several months and dislike needing to switch back for a single (albeit very excellent) application.

pavlobu commented 3 years ago

Is zoom electronjs based? If so it is likely that they've just updated the version of electron to newer one. I actually did that before, just updated electron version and it helped to solve some linux issues.

You can submit a PR with updated electron version if you have time, or I can do it later when I have a free time spot. Maybe this simple fix will solve the problem

clemmrich commented 3 years ago

Same issue for me on Ubuntu 21.04: display only Blank screen in the preview window, as well as when casting to a remote device. Latest release, latest updates....

sferich888 commented 3 years ago

Shouldn't this be resolved with https://github.com/pavlobu/deskreen/issues/45?

my issue is that I simply can't get the AppImage to run using the settings:

./Deskreen-1.0.11.AppImage --enable-features=UseOzonePlatform --ozone-platform=wayland
13:38:51.966 › /tmp/.mount_DeskreIqg895/resources/app.asar/main.prod.js : Deskreen signaling server is online at port 3131

(deskreen:19548): Gtk-WARNING **: 13:38:51.996: cannot open display:
zhulik commented 3 years ago

Same here, Arch Linux, Wayland. Only cursor is visible. Running deskreen with -enable-features=UseOzonePlatform --ozone-platform=wayland leads to segfault in a few seconds, xlsclients still lists deskreen as an X11 app. In general electron does not play well with wayland, lot's of apps either broken or limited in functionality.

anthonyfok commented 3 years ago

Some tips about troubleshooting screen capture with PipeWire:

Also, I recommend determining whether screen capture is indeed working under PipeWire by testing Google Meet from Chrome browser, and/or OBS Studio, and/or Zoom, etc.

raniaamina commented 2 years ago

@anthonyfok, i tried your tips but still get blank screen in Debian Sid with KDE Wayland. When i use -enable-features=UseOzonePlatform --ozone-platform=wayland, it make deskreen crash as seen bellow

deskreen --enable-features=UseOzonePlatform --ozone-platform=wayland                      
11:37:44.331 › /opt/Deskreen/resources/app.asar/main.prod.js : Deskreen signaling server is online at port 3131
11:37:44.422 › APPIMAGE env is not defined, current application is not an AppImage
(node:104500) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.  See https://github.com/electron/electron/issues/23506 for more information
(node:104500) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.  See https://github.com/electron/electron/issues/23506 for more information
[1]    104500 segmentation fault  deskreen --enable-features=UseOzonePlatform --ozone-platform=wayland
RafayAK commented 2 years ago

Just tried all the flags that could possibly work but still a black screen.

./Deskreen-1.0.11.AppImage --enable-features=UseOzonePlatform --ozone-platform=wayland crashes, while running ./Deskreen-1.0.11.AppImage --enable-features=WebRTCPipeWireCapturer fails to load PipeWire(see below). I'm running Fedora 34 with GNOME 40.6 and Mutter

$ ./Deskreen-1.0.11.AppImage --enable-features=WebRTCPipeWireCapturer
21:13:30.793 › /tmp/.mount_DeskreBaPAZL/resources/app.asar/main.prod.js : Deskreen signaling server is online at port 3131
21:13:31.130 › Checking for update
(node:69044) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.  See https://github.com/electron/electron/issues/23506 for more information
(node:69044) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.  See https://github.com/electron/electron/issues/23506 for more information
21:13:34.115 › Update for version 1.0.11 is not available (latest version: 1.0.11, downgrade is disallowed).
21:13:34.115 › checkForUpdatesAndNotify called, downloadPromise is null
[69044:0102/211400.286569:ERROR:base_capturer_pipewire.cc(279)] Failed to load the PipeWire library and symbols.
RafayAK commented 2 years ago

perhaps updating to the latest Electron version will solve most of the problems.

pnunn commented 2 years ago

Just discovered this thread. Having the same issue on KDE Neon under Wayland. I eventually get a WebRTC error in the android tablet.

artogahr commented 2 years ago

I'm having the same issue.

Running with --enable-features=WebRTCPipeWireCapturer lets me open the pipewire screen sharing selection window, but crashes after selecting a window/screen to share: [1] 30264 segmentation fault (core dumped) deskreen --enable-features=WebRTCPipeWireCapturer

Arch Linux, Deskreen v1.0.11, Wayland. Screen sharing works in Chromium (when chrome://flags/#enable-webrtc-pipewire-capturer is enabled) without problems.

seffs commented 2 years ago

Hi everyone,

I upgraded electron to V13. Now sharing under Wayland works! You can see my MR #189 . You will find more details there.

Feel free to grab a copy from my fork. Download and run:

./Deskreen-1.0.12.AppImage --enable-features=WebRTCPipeWireCapturer

raniaamina commented 2 years ago

It works smoothly @seffs! Thanks!

artogahr commented 2 years ago

I upgraded electron to V13. Now sharing under Wayland works! You can see my MR #189 .

Works wonderfully, thank you @seffs!

RafayAK commented 2 years ago

@seffs really glad someone came along to do this, I was trying to upgrade (#181 ) but just have no idea of electron or node 🙏

Raskc commented 1 year ago

Hello, I'm having a similar issue after installing Deskreen, both screen display that i can select are black. Nothing seems to show

pavlobu commented 1 year ago

do you have this problem with latest chrome while sharing screen on this webpage? https://www.veed.io/screen-recorder-app

if the latest chrome is able to record the screen, but Deskreen can't, then I can try to upgrade electron version in next release

ferrlen commented 1 year ago

For people who are having issues:

I'm running the latest Linux Mint and Deskreen deb image. On the same machine that is running Deskreen, I can't see anything via Firefox, just a black screen, but if I use Brave (which is Chromium based) Deskreen works.

I found out the reason was I had WebRTC disabled on Firefox, that's why it wasn't working. Now it works as expected.

Another issue people might have is using the Private/Incognito mode, because then the software doesn't have access to IndexedDB (not sure it's necessary, but worth trying out).

I can't access the stream from my other machine that is running a VPN client, but other machines can access it so I assume it's a VPN issue. This is what I get (which makes me think the VPN connection is ignoring the stream):

TypeError: Cannot read properties of null (reading 'send')
    at n.value (index.js:239:19)
    at xe (peerConnectionHandlePeer.ts:11:26)
gXkch commented 1 year ago

I am running into issues when trying to share my screen with sway.

I am running Arch Linux with deskreen 2.0.4. I am starting it with deskreen --enable-features=WebRTCPipeWireCapturer, connect with my tablet, select Entire Screen and select the screen I want to share. As soon as I select the screen it segfaults.

Here is the stdout:

deskreen --enable-features=WebRTCPipeWireCapturer
16:20:21.878 › /opt/deskreen/resources/app.asar/main.prod.js : Deskreen signaling server is online at port 3131
[88984:0223/162021.930942:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[88984:0223/162021.930991:ERROR:select_file_dialog_linux_portal.cc(242)] Failed to read portal version property
16:20:21.972 › APPIMAGE env is not defined, current application is not an AppImage
[89015:0223/162022.019918:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
[89015:0223/162025.320302:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[89015:0223/162027.384025:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[89015:0223/162154.818882:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
Segmentation fault (core dumped)

For the record I am able to share the entire screen with Teams for Linux and Firefox. Both use webrtc and xdg-desktop-portal (and for sway xdg-desktop-portal-wlr since it is wlroots based)

When I do the same on KDE Plasma on my laptop I don't have these issues. Maybe this is an issue with wlroots based desktop environments.

uxdiin commented 1 year ago

I am running into issues when trying to share my screen with sway.

I am running Arch Linux with deskreen 2.0.4. I am starting it with deskreen --enable-features=WebRTCPipeWireCapturer, connect with my tablet, select Entire Screen and select the screen I want to share. As soon as I select the screen it segfaults.

Here is the stdout:

deskreen --enable-features=WebRTCPipeWireCapturer
16:20:21.878 › /opt/deskreen/resources/app.asar/main.prod.js : Deskreen signaling server is online at port 3131
[88984:0223/162021.930942:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[88984:0223/162021.930991:ERROR:select_file_dialog_linux_portal.cc(242)] Failed to read portal version property
16:20:21.972 › APPIMAGE env is not defined, current application is not an AppImage
[89015:0223/162022.019918:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
[89015:0223/162025.320302:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[89015:0223/162027.384025:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[89015:0223/162154.818882:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
Segmentation fault (core dumped)

For the record I am able to share the entire screen with Teams for Linux and Firefox. Both use webrtc and xdg-desktop-portal (and for sway xdg-desktop-portal-wlr since it is wlroots based)

When I do the same on KDE Plasma on my laptop I don't have these issues. Maybe this is an issue with wlroots based desktop environments.

same here in Hyprland

haininhhoang94 commented 1 year ago

Same here with Hyprland too. Anyway to use wlroots instead of xdg_desktop_portal?

seffs commented 1 year ago

No such interface “org.freedesktop.portal.FileChooser”

Sounds like you have an incomplete installation of the XDG Portal. Check this and report back.

CamperSamu commented 1 year ago

No such interface “org.freedesktop.portal.FileChooser”

Sounds like you have an incomplete installation of the XDG Portal. Check this and report back.

Nope, XDPH doesn't implement FileChooser, instead you should install XDP-GTK next to XDPH.

AnuraagaNath commented 1 year ago

same issue on Ubuntu 22.04 LTS with dummy HDMI port too.

tobycm commented 11 months ago

Same issue on Ubuntu 23.10 with virtual GNOME display

saganawski commented 1 month ago

Same problem with Ubuntu 22.04 LTS with dummy HDMI port. Solution: Switch from wayland to x11. log out and when you log in there is an icon setting you can switch away from wayland