1

The problem

When I screenshare an entire screen using Discord or Firefox, the shared screen becomes completely unresponsive to my mouse. Stopping the screenshare doesn't fix the problem. Window-sharing works fine.

  • My mouse can't click anything on the shared screen, nor scroll. There are no hovering effects (for example: in Spotify, hovering over buttons should make them bigger and green, links should be underlined, that doesn't happen on the frozen screen)
  • The keyboard still works. Video still works, everything still moves fine.
  • Using keyboard shortcuts, I can still change desktops on the frozen screen.
  • Moving a window from the 'frozen' screen to a different one (using keyboard shortcuts) makes that window clickable again. Moving it back undoes it, indicating that it is definitely the screen and not the window that stops responding to clicks.
  • Clicking away dunst notifications works. My rofi start menu opens fine and is interactive.
  • Screen recording works fine with SimpleScreenRecorder and OBS.
  • Taking screenshots on the frozen screen works using spectacle: I can click and drag a rectangle on the frozen screen to take a cropped screenshot (if I open spectacle on another monitor of course, otherwise I wouldn't be able to click the Take a new screenshot button)
  • This has been happening for many months, maybe a year.
  • My bspwm settings are set so that if I hover over a window, that window becomes focused. On the frozen screen, only the last focused window becomes focused. I can't focus between two windows using the mouse, but bspwm does notice that my mouse is on that screen.

Screensharing in Chromium

In Chromium, you can see a tab for screens, and a tab for applications:

The screens tab

The applications tab

If I share a screen from the application tab (for instance eDP-1-1 = my laptop screen), it triggers the problem. If I share a screen from the 'Your entire screen' tab, it doesn't.

Screensharing in Firefox & Discord

They don't actually show you screens when choosing a screen to share, it shows you applications:

The screensharing picker in Firefox

The xxx-1-1 names you see are the names of the video outputs. Sharing one of those triggers the problem. People watching don't see anything. On discord it crashes. If I click on 'Entire screen', it shares all my monitors as if they were one screen.

In discord, it works the same way, but the screensharing immediately crashes. The unresponsive mouse problem still triggers on the shared screen.

Logs

Running Firefox in a terminal and screensharing outputs the following output when I start sharing:

[GFX1-]: Failed GL context creation for WebRender: 0
[GFX1-]: FEATURE_FAILTURE_WEBRENDER_INITIALIZE_UNSPECIFIED
[GFX1-]: Failed to connect WebRenderBridgeChild.
[GFX1-]: Compositors might be mixed (5,1)

Using xprop on a window on the frozen screen gives the following output:

WM_STATE(WM_STATE):
        window state: Normal
        icon window: 0x0
WM_NAME(STRING) = "eDP-1-1"
WM_CLASS(STRING) = "root", "Bspwm"

If I use xprop on a non-frozen empty desktop, I get the same message (which is expected). xprop seems to think the selected window on the frozen screen is the root bspwm class.

Screensharing with Discord crashes and outputs the following line in terminal when I start sharing:

[WebContents] crashed... reloading
  • There is nothing in dmesg.
  • There is nothing in journalctl.
  • There is nothing in /var/log/Xorg.0.log.

What I've tried already

  • Closing ALL windows on all screens fixes the frozen screen (so does logging out/rebooting).
  • Killing and restarting polybar makes polybar clickable again on the frozen screen. All other windows on the frozen screen will still be unresponsive.
  • I tried screensharing with compton disabled
  • I tried screensharing without Nvidia's DRM KMS
  • I tried running Firefox in safe mode
  • I tried disabling hardware acceleration in both Firefox and Discord
  • I tried only connecting one monitor instead of 3
  • I tried using i3 instead of bspwm. i3 only shows the windows and 'Entire screen', which would show all screens if more than one screen is connected. I can't pick a single screen.
  • I tried using awesomewm, same result as i3.

My system

zjeffer@Arch-zjeffer 
-------------------- 
OS: Arch Linux x86_64 
Host: 80WK Lenovo Y520-15IKBN 
Kernel: 5.11.1-arch1-1 
Uptime: 12 hours, 2 mins 
Packages: 1606 (pacman) 
Shell: zsh 5.8 
Resolution: 1920x1080, 1920x1080, 1920x1080 
WM: bspwm 
Theme: Nordic-Polar [GTK2/3] 
Icons: Papirus-Light-nordic-blue-folders [GTK2/3] 
Terminal: gnome-terminal 
CPU: Intel i7-7700HQ (8) @ 2.800GHz 
GPU: NVIDIA GeForce GTX 1050 Mobile 
GPU: Intel HD Graphics 630 
Memory: 2662MiB / 7845MiB
  • bpswm
  • compton, this fork
  • nvidia 460.39-11, with Nvidia's DRM KMS
  • xorg-server 1.20.10-3
  • lightdm 1:1.30.0-4

Some questions

I have some questions that might help me troubleshoot this issue:

  1. What software/technology do Firefox and Discord use to share screens? Do Chromium and Microsoft Teams use different software?

  2. What software/technology does bspwm use to share screens? i3 doesn't even provide the option to share a particular screen, so they must use different technologies.

  3. What else can I provide (logs, system info, ...)?

0

From this Reddit post, we found that the bspwm's focus_follows_pointer option causes the screens to appear as windows in sharing menus when it is set to true.

Those screens should not even appear in the first place. According to this comment by /u/ortango_, sharing them isn't even supposed to work:

Firefox does not support sharing per monitor. those things you think are monitors are not; they only have the monitor's names.

they get mapped for focus_follows_pointer so that the mouse can be track between windows - which has the side effect of webrtc thinking they are normal windows (but they are not normal windows or monitors),

So the problem lies with bspwm, I made an issue here. The reason it works in Chromium is because it uses a newer implementation of libwebrtc. Microsoft Teams probably did the same.

Here are the relevant feature requests I found in Mozilla's bugtracker:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.