Bug 244880 - multimedia/webcamd: Never creates device nodes if HAL is enabled
Summary: multimedia/webcamd: Never creates device nodes if HAL is enabled
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Hans Petter Selasky
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2020-03-18 05:29 UTC by Patrick McMunn
Modified: 2020-03-21 17:29 UTC (History)
1 user (show)

See Also:
koobs: maintainer-feedback? (hselasky)


Attachments
ktrace.out (175.99 KB, application/octet-stream)
2020-03-18 22:29 UTC, Patrick McMunn
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick McMunn 2020-03-18 05:29:36 UTC
I'm trying to get both a USB gamepad and the webcam in my laptop working with webcamd. I'm running Plasma 5 on FreeBSD 12.1-RELEASE.

I have hald_enable="YES" in my /etc/rc.conf.local file. The RC script supplied with webcamd detects whether HAL is enabled and, if it is, automatically adds the -H flag (which enabled HAL support) to the parameters passed to webcamd upon starting. This is probably fine if everything is working as expected, but that isn't the case.

webcamd was not creating /dev/input/js0 for my gamepad or /dev/video0 for my webcam when I started it via the RC script. However, when I started webcamd directly from the commandline, it did. So I tried passing the -H flag to webcamd, and it just kept emitting the message "Waiting for HAL connection." on the console.

For whatever reason, webcamd is never connecting to HAL and just gets stuck waiting for a connection to HAL thus never creating any device nodes. So the current workarounds I've found, if using webcamd via the RC script, is to disable HAL in /etc/rc.conf or to comment out the HAL autodetection section in webcamd's RC script.
Comment 1 Hans Petter Selasky freebsd_committer 2020-03-18 07:46:03 UTC
Can you do a ktrace on webcamd, to figure out why it doesn't connect to hal?

--HPS
Comment 2 Patrick McMunn 2020-03-18 22:28:55 UTC
I've never used ktrace before, so I had to read the man page. I hope I used it correctly. I started hal with "service hald start" then ran "ktrace -tcnisuw -i webcamd -N Logitech-Logitech-Dual-Action -M 0 -H" from the command line. But even though there are some /var/run/hald/dbus-xxxxxxxxxx files with the timestamp of when I started hal, I can't find in top or KDE's system monior any sign that hal is remaining resident after starting it. So maybe hal is starting and immediately exiting for some reason?
Comment 3 Patrick McMunn 2020-03-18 22:29:45 UTC
Created attachment 212515 [details]
ktrace.out
Comment 4 Patrick McMunn 2020-03-21 17:29:42 UTC
This appears that it may just be a hald issue and not a webcamd issue. Hal is indeed crashing, so I opened a bug for hald crashing on startup. It's bug 244958.