diddlesnaps / fakecam

Virtual Backgrounds for your video conferences and streaming presentations
Other
47 stars 10 forks source link

Beta 3.0.0: CUDA driver version is insufficient #20

Open Selaron opened 3 years ago

Selaron commented 3 years ago

Hello,

while the current stable version works for me, the beta (3.0.0) stops saying "CUDA driver version is insufficient". I don't have a nvida card.

I launch the app on debian bullseye using "snap run fakecam" as simply typing "fakecam" results in "command not found".

Both versions, stable and beta never give me a GUI. (I'm using xfce4 on lightdm).

How can I get a UI and turn off usage of CUDA?

WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
No background specified. will blur your background instead.
Starting capture using device: /dev/video0
Resolution: 640:480
Process Process-1:
Traceback (most recent call last):
  File "/snap/fakecam/111/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/snap/fakecam/111/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/snap/fakecam/111/lib/python3.6/site-packages/fakecam/capture.py", line 153, in start
    frame = get_frame(cap, scaler, ones, dilation, background=background_scaled, use_hologram=use_hologram, height=height, width=width)
  File "/snap/fakecam/111/lib/python3.6/site-packages/fakecam/capture.py", line 81, in get_frame
    mask = get_mask(frame, scaler, dilation, height=height, width=width)
  File "/snap/fakecam/111/lib/python3.6/site-packages/fakecam/capture.py", line 33, in get_mask
    results = cvNet.forward()[0][0]
cv2.error: OpenCV(4.5.1) /root/parts/opencv/src/modules/dnn/src/cuda4dnn/csl/memory.hpp:54: error: (-217:Gpu API call) CUDA driver version is insufficient for CUDA runtime version in function 'ManagedPtr'
Selaron commented 3 years ago

I can now type the command "fakecam.gui" and launch the gui. The reason for snap-apps not being on path in debian is this bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931776

And worked around using this: echo . /etc/profile.d/apps-bin-path.sh >> ~/.bashrc

But still when hitting the buttn "start fakecam" the output does not start but above exception appears on terminal. Maybe We'd need a switch on UI that enables/disables CUDA usage.

lucyllewy commented 3 years ago

I've added some extra checking, and have dropped cuda for now (it makes the snap too big for the store to reliably accept it). Could you try refreshing to the beta channel and give it another go? To get the beta channel run:

sudo snap refresh --beta fakecam
johandenhollander commented 2 years ago

After modprobing again the latest beta seems to work. Not using as much cpu as before. From 500% to 200%. However the gui does not work for me. Perhaps I should do a reboot for that? On Ubuntu 21.10

johandenhollander commented 2 years ago

Running fakecam.gui gives me:

Python path configuration: PYTHONHOME = (not set) PYTHONPATH = '/snap/fakecam/112/usr/lib/python3.8/dist-packages:/snap/fakecam/112/usr/lib/python3/dist-packages:/snap/fakecam/112/usr/lib/python3.8/dist-packages:/snap/fakecam/112/usr/lib/python3/dist-packages:/snap/fakecam/112/gnome-platform/usr/lib/python3.8:/snap/fakecam/112/gnome-platform/usr/lib/python3/dist-packages' program name = 'python3' isolated = 0 environment = 1 user site = 1 import site = 1 sys._base_executable = '/snap/fakecam/112/bin/python3' sys.base_prefix = '/usr' sys.base_exec_prefix = '/usr' sys.executable = '/snap/fakecam/112/bin/python3' sys.prefix = '/usr' sys.exec_prefix = '/usr' sys.path = [ '/snap/fakecam/112/usr/lib/python3.8/dist-packages', '/snap/fakecam/112/usr/lib/python3/dist-packages', '/snap/fakecam/112/usr/lib/python3.8/dist-packages', '/snap/fakecam/112/usr/lib/python3/dist-packages', '/snap/fakecam/112/gnome-platform/usr/lib/python3.8', '/snap/fakecam/112/gnome-platform/usr/lib/python3/dist-packages', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', ] Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f44cad77740 (most recent call first):

johandenhollander commented 2 years ago

I have no problems running the latest Edge version via gui.