Segmentation fault in facial recognition package

I want to use Howdy to replace most passwords with facial recognition (when there’s enough light).

However, when running the command test, I get a, after a few other lines (full output at the bootom of this post), this:

[1]    8181 segmentation fault  sudo howdy --user $USER test

I am well aware that such a bug should be reported directly to the developper on GitHub, and I did. However, there are a few hints that the problem comes from my newly installed openSUSE Tumbleweed. In fact, on my previous laptop, which was also running Tumbleweed, Howdy worked well enough (I got it to work on Gnome Fedora as well). So I tried to replicate as best as I could what I did on that previous laptop, but it was no success.

Here’s what I noticed (and why I think my system is the problem):

  1. Python behaves differently: I can’t use pip, the system forbids it:
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try
    zypper install python311-xyz, where xyz is the package
    you are trying to install.

… and since I had installed opencv and a few other dependencies with pip3 on my previous system, I can’t know exactly the differences between both setups;

  1. I get opencv errors no matter how I install openCV (I tried zypper and building from source)…

  2. I have set explicitely $XDG_RUNTIME_DIR in both user and root’s .zshrc (I use ZSH) and .bashrc, so I have no idea why I get an error about that :confused:

  3. sudo howdy --user $USER add works (the light of my webcam turns on and my face is reported to be registered). Also, if I remove a few “run only as root” lines from the executable, the howdy test (without sudo) works: I have a live view of my face from the webcam. That’s what I expect from sudo howdy test — and what doesn’t happen.

Knowing all this, we can dismiss the idea that it’s a wrong camera device name in my config file or something similar; or that it’s a pam.d misconfiguration (since I launch the test manually and don’t wait for PAM to activate Howdy).

And since the command works without sudo but not with it, I think there’s something to dig in about permissions maybe?

As of yet, it’s been more than a week and I got no response from the developper; and I hope now you think like me that this is a SUSE issue rather than a howdy issue.

The full command and output:

▶ sudo howdy --user $USER test        
[sudo] password for root: 
[ WARN:0@0.117] OpenCV | GStreamer warning: Embedded video playback halted; module source reported: Could not read from resource.
[ WARN:0@0.117] OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0@0.117] OpenCV | GStreamer warning: GStreamer: pipeline have not been created

Opening a window with a test feed

Press ctrl+C in this terminal to quit
Click on the image to enable or disable slow mode

% at this point there's a brief flash of the webcam's DEL

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
[1]    8181 segmentation fault  sudo howdy --user $USER test

I have posted about this earlier But this thread is dead, and I didn’t provide the necessary information for you to help me there, so I choose to make a new post (I hope I was right?).

@ultome This was the one installed from some random $HOME user on OBS… always expect the unexpected when using un-vetted applications not in the default repositories…

Or did you compile from source?

@ultome So based on this post: https://forums.opensuse.org/t/steam-nvidia-gpu-cant-make-it-work-consistently/170777/63 and the output in https://forums.opensuse.org/t/steam-nvidia-gpu-cant-make-it-work-consistently/170777/68 from the dmafanasyev home repository. The https://build.opensuse.org/package/show/home:dmafanasyev/python-dlib is not building, openSUSE Tumblewwed uses python 3.11 now, it installed the 3.10 version…

I would suggest you delete those three packages and have a look at testing the version from Atri at https://build.opensuse.org/project/show/home:badshah400:howdy who is an active openSUSE maintainer and I trust their packaging…

I did that. Now I removed both repo and packages dmafanasyev; and I installed howdy, pam-python3 and python311-dlib from home:badshah400:howdy.

I still get the error:

▶ sudo howdy --user $USER test 
[ WARN:0@0.177] OpenCV | GStreamer warning: Embedded video playback halted; module source reported: Could not read from resource.
[ WARN:0@0.177] OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0@0.177] OpenCV | GStreamer warning: GStreamer: pipeline have not been created

Opening a window with a test feed

Press ctrl+C in this terminal to quit
Click on the image to enable or disable slow mode

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
[1]    12867 segmentation fault  sudo howdy --user $USER test

Exactly the same…

EDIT: wow, even though the test command fails, now Howdy works and I can use face recognition instead of passwords! I really have no idea where this segmentation fault comes from…
Thank you everyone, especially @malcolmlewis. I appreciate your help and the valuable time you spent helping me on this problem.