After installing Zoneminder, some people (including me) reported that they had a problem with monitor. A black screen, or even no picture / video at all. From logs, it’s usually said: “Can’t get shared memory id…” or “Shared memory invalid…”, something like that. Especially when we’re using a webcam.
After googling, i found some solutions for this. First, increase the shared memory, and second, edit file.

1. Increase shared memory maximum

Open the file “/etc/sysctl.conf”, and paste this 2 line at the bottom of the file.

# Increase the maximum shared memory
kernel.shmmax = 167772160

save, and restart your machine.
If still no luck, continue to the next step:

2. Edit

We need to edit zoneminder source to point the video driver.
Open file ” /usr/bin/” (the location on some machine, might be different)
and add this code, right before the “my @daemons =….” (about line 64).

$ENV{LD_PRELOAD} = ‘/usr/lib/libv4l/’;


*UPDATE!* added by ldp

Also work:
$ENV{LD_PRELOAD} = ‘/usr/lib/libv4l/’;

check your /usr/lib/libv4l or /usr/lib64/libv4l directory for other files to preload

save, and restart your zoneminder.

it works like charm…