Background blur/effects not working on NixOS

In my company, they use Teams (unfortunately). For some reason, blur or background effects don’t work for me in meetings. I’ve tried enabling hardware acceleration, and because, according to this MS article, this feature is not compatible with Linux, I tried with OBS, but it doesn’t detect the virtual camera. The strange thing is that my colleagues with other Linux distros can use this feature. I get the following error in the console: v2/:1 Unhandled error/rejection {"isTrusted":true} , which means nothing and crashes my camera.

this is my nixos repo if it helps GitHub - NereaCassian/nixos: Starting my adventure in NixOs

1 Like

Oddly enough, just today I read of another comment about blur background issues. Perhaps yours is also related to Wayland and EGL with Team’s Election app?

Weird design decission but at least google meet camera backgrounds work properly under wayland with egl and nvidia 580. Current stable fails to attach EGL so camera backgrounds turn into a whiteout image.

Google Preparing To Ship Chrome With "--ozone-platform-hint=auto" For Wayland - Phoronix Forums

I use Teams every day (unfortunately).

I don’t normally use the background blur, but it does work for me, in both Firefox and Chrome, both running on Wayland natively. Firefox didn’t until sometime mid last year or so, when the support for that browser seems to have improved in Teams, such that I no longer need to use Chrome at all.

I normally use a video or still background via OBS, and initially set that up because of the missing support (as well as to get the same camera setup across N different conferencing platforms).

I assume you’re using chrome, because of the virtual camera issue. Chrome has a ‘feature’ where it will ignore the virtual camera if any real ones are detected, for some reason. The following helps to hide the real ones from chrome:

  # hide real cams from chromium because uggh.  From: https://www.scs.stanford.edu/~dm/blog/hide-webcam.html
  boot.extraModprobeConfig = "options v4l2loopback nr_devices=2 exclusive_caps=1,1,1,1,1,1,1,1 video_nr=0,1 card_label=v4l2lo0,v4l2lo1";
  services.udev.extraRules = ''
    SUBSYSTEM!="video4linux", GOTO="hide_cam_end"
    ATTR{name}=="v4l2lo[0-9]", GOTO="hide_cam_end"

    ACTION=="add", RUN+="${pkgs.coreutils}/bin/mkdir -p /dev/obs-only"
    ACTION=="add", RUN+="${pkgs.coreutils}/bin/mv -f $env{DEVNAME} /dev/obs-only/"
    ACTION=="add", ATTR{index}=="0", RUN+="${pkgs.coreutils}/bin/ln -fs $name /dev/obs-only/$env{ID_SERIAL}"

    ACTION=="remove", RUN+="${pkgs.coreutils}/bin/rm -f /dev/obs-only/$name"
    ACTION=="remove", RUN+="${pkgs.coreutils}/bin/rm -f /dev/obs-only/$env{ID_SERIAL}"

    LABEL="hide_cam_end"
  '';

Then you make OBS look at the inputs in the obs-only directory.

I really only keep that around now for Signal desktop, which as an electron app has the same issue.

2 Likes