Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recent update breaks Howdy - Garuda (Arch) Linux #932

Open
Hamster1962 opened this issue Jun 24, 2024 · 16 comments
Open

Recent update breaks Howdy - Garuda (Arch) Linux #932

Hamster1962 opened this issue Jun 24, 2024 · 16 comments

Comments

@Hamster1962
Copy link

Hamster1962 commented Jun 24, 2024

Hi A recent large update causes Howdy to fail. One of these updates,
Screenshot_20240624_045916
I've tried reinstalling Howdy, dlib, python etc, no luck

The Error

image

I've searched for similar issues already, and my issue has not been reported yet.

Garuda (Arch) fully up to date

image

Restoring a previous snapshop fixes the issue until the next time the update is run

@emersoncastilho
Copy link

emersoncastilho commented Jun 24, 2024

Same error here, Ubuntu 22.04 LTS.
I've tried also cloning the git repo and building from source, but I've got the exact same error (maybe related to dlib?)

Edit: I've tried other .deb from howdy ppa and the error is the same.

emerson@emerson-a60muv:~/howdy$ sudo howdy add
Adding face model for the user emerson
Enter a label for this new model [Initial model] (max 24 characters): 

Please look straight into the camera
Traceback (most recent call last):
  File "/usr/local/bin/howdy", line 95, in <module>
    import cli.add
  File "/usr/lib/security/howdy/cli/add.py", line 155, in <module>
    face_locations = face_detector(gsframe, 1)
RuntimeError: Unsupported image type, must be 8bit gray or RGB image.
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_lib_security_howdy_cli.py.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/local/bin/howdy", line 95, in <module>
    import cli.add
  File "/usr/lib/security/howdy/cli/add.py", line 155, in <module>
    face_locations = face_detector(gsframe, 1)
RuntimeError: Unsupported image type, must be 8bit gray or RGB image.

@fabmorais
Copy link

fabmorais commented Jun 27, 2024

@Hamster1962

try to reinstall ffmpeg .

I did it on vanilla Arch Linux and the issue got fixed!

@skjongithub
Copy link

Same error here today on a Garuda linux using KDE Plasma + Wayland + howdy-beta-git from AUR archive

[sudo] password for skj:
Attempting facial authentication
Traceback (most recent call last):
File "/usr/lib/howdy/compare.py", line 302, in <module>
face_locations = face_detector(gsframe, 1)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Unsupported image type, must be 8bit gray or RGB image.

Reinstall ffmpeg package does not resolve this error.

@this-username-has-been-taken
Copy link

this-username-has-been-taken commented Jun 27, 2024

It looks like that it is the same problem as described in: #928
TL; DR: There is no solution available yet, just a workaround (thanks to simonporter007): you should downgrade numpy to v.1.26.4. Howdy (actually dlib) does not support numpy 2.0.
For Arch Linux please refer to the manual: https://wiki.archlinux.org/title/downgrading_packages
I' suggest using the downgrade script: https://aur.archlinux.org/packages/downgrade
It worked just fine for me and fixed the issue.

@Hamster1962
Copy link
Author

It might be something to do with ffmpeg but i don't know the answer.
The clue is on the bottom line. (ImportError: libavdevice.so.60: cannot open shared object file: No such file or directory)
Which is concerned with ffmpeg........

@talpinum
Copy link

talpinum commented Jun 28, 2024

@this-username-has-been-taken
Did it work right away for you? I tried downgrading but now it has import issues

Nvm I'm dumb, I downgraded to 1.26.4-1 when there was 1.26.4-2 available, it now works fine

@this-username-has-been-taken

@Hamster1962 , sorry it didn't work for you. One more suggestion, based on https://stackoverflow.com/questions/12901706/ffmpeg-error-in-linux and https://web.archive.org/web/20141223015653/http://linuxserverguide.wordpress.com:80/2010/10/15/ffmpeg-error-while-loading-shared-libraries-libavdevice-so-52-cannot-open-shared-object-file/

  1. Find libavdevice.so.60 file: sudo find / -name libavdevice.so.60
  2. Put found path into /etc/ld.so.conf file
  3. Run sudo ldconfig

@talpinum , yes - everything went back to normal just after the downgrade to 1.26.4-2. I am grad it worked for you too!

@Hamster1962
Copy link
Author

That's interesting, I don't have the file libavdevice.so.60
Anywhere.

@Hamster1962
Copy link
Author

Hamster1962 commented Jun 28, 2024

Well folks, I think we have an answer. I didn't have a copy of 'libavdevice.so.60'
I had earlier 58 & 59 and later 61 but no 60. This version is available in FFmpeg 6.1.1 "Heaviside" from the website

https://www.ffmpeg.org/download.html#releases. Download and install version 6.1.1.

That mostly fixed it, but the error:-

RuntimeError: Unsupported image type, must be 8bit gray or RGB image.

Now appears. So, down-grade 'numpy' from version 2.0.0 to version 1.26.4 as above and it's fixed, certainly for me.
Going forward, ignore updates to ffmpeg and numpy in pacman.conf until someone works out what happened.

Thanks everyone, every little bit of information helped to understand the problem.

@this-username-has-been-taken
Copy link

this-username-has-been-taken commented Jun 28, 2024

@Hamster1962 , I have ffmpeg ver. 2:7.0.1-1 installed and do not have 'libavdevice.so.60' file in the system too, just 58 and 61:

/usr/lib/libavdevice.so.61
/usr/lib/libavdevice.so.61.1.100
/usr/lib/libavdevice.so.58
/usr/lib/libavdevice.so.58.13.100

I only got the error about unsupported image type.
Anyway, glad that you found the solution.

@this-username-has-been-taken
Copy link

this-username-has-been-taken commented Jun 29, 2024

@Hamster1962 , did you by chance installed Howdy Beta? If so, look for /lib/security/pam_howdy.so instead of /lib/security/howdy/pam.py.
For example, my configuration:

%PAM-1.0

auth sufficient pam_unix.so try_first_pass likeauth nullok
auth sufficient pam_howdy.so

<Here go other, default lines>

I.e. I have added two lines just after %PAM-1.0. They allow password authentication as well as Howdy authentication and work as follows:

  1. Linux shows a password prompt.
  2. You can either enter a password or leave it blank and press Enter/OK.
  3. If you left password field blank, Howdy will be launched.
  4. If Howdy recognizes you it will authenticate you. If not - the loop will be started again from step 1.

Also, just a reminder. Check if your IR emitter is blinking and the image is also blinking (howdy test) when Howdy is in operation. If not - it doesn't work properly. Use this to fix it: https://github.com/EmixamPP/linux-enable-ir-emitter

@Hamster1962
Copy link
Author

Looks like we were both right. There is no /lib/security/howdy folder with Ver 3.0.0 Beta

The lock screen issue was fixed by changing the file permissions with

sudo chmod -R 755 /etc/howdy/

Once again, thanks for all your help.

@ghhccghk
Copy link

ghhccghk commented Jun 29, 2024

I had the same problem, but I solved it by updating python-dlib-git from the AUR, where the code was already merged!

image

@this-username-has-been-taken

I use python-dlib pre-compiled package from the arch4edu repo.
python-dlib-git from AUR returns error in my case for some reason...

@schmensch
Copy link

btw, older versions of numpy for Arch Linux can be downloaded can be downloaded from their official archive servers: https://archive.archlinux.org/packages/p/python-numpy/

@Hamster1962
Copy link
Author

Hamster1962 commented Jul 8, 2024

Hi I'm so sorry to raise this again. Arch Linux updates give the following error -

error: failed to prepare transaction (could not satisfy dependencies)
:: installing libplacebo (7.349.0-1) breaks dependency 'libplacebo.so=338-64' required by ffmpeg6.1

Attempts to individually update either of these packages by force or over-write etc break howdy -
Screenshot_20240708_163046
A re-install of Howdy does not help
Howdy appears very fragile right now.
Can someone have a look please.

Of course, ignoring these three package updates in 'pacman.conf' is a temporary solution but a permanent solution would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants