rss
twitter
  •  

fixing monitor problem on zoneminder

| Posted in anything |

6

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 zmdc.pl 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 zmdc.pl

We need to edit zoneminder source to point the video driver.
Open file ” /usr/bin/zmdc.pl” (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/v4l1compat.so’;

.

*UPDATE!* added by ldp

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

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

save, and restart your zoneminder.

WALLA!!!
it works like charm…

VN:F [1.9.13_1145]
Rating: 7.6/10 (10 votes cast)
VN:F [1.9.13_1145]
Rating: +5 (from 5 votes)
fixing monitor problem on zoneminder, 7.6 out of 10 based on 10 ratings

Comments (6)

It Wokrs, finaly it works, Tanks to You

VA:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)
VA:F [1.9.13_1145]
Rating: 0 (from 0 votes)

WORKS!
Running Ubuntu 10.04 server.
ZoneMinder v1.24.2
0ac8:301b Z-Star Microelectronics Corp. ZC0301 Webcam
driver zc3xx
may work on other gspca webcams

Cut and Paste to zmdc.pl failed :

Unrecognized character \xE2 in column 20 at /usr/bin/zmdc.pl line 65.

Changed : $ENV{LD_PRELOAD} = ‘/usr/lib/libv4l/v4l1compat.so‘;
To : $ENV{LD_PRELOAD} = ‘/usr/lib/libv4l/v4l1compat.so’;

Could be difference in fonts? but the ‘ is not the same as ‘

Also $ENV{LD_PRELOAD} = ‘/usr/lib/libv4l/v4l2convert.so’;
Works

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

VA:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)
VA:F [1.9.13_1145]
Rating: 0 (from 0 votes)

yes, that should be a single quote ‘,
but my text editor changed to: ’

you have to fix the single quote before paste to zmdc.pl

thanks.

VN:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

[...] then finally I stumbled on this site and in an instant my problems were solved! I could not believe that 1 line of code fixed all my [...]

It’s work fine on ubuntu 11.04 and sonixj chipset of webcam. Thanks for you solution. Regards.

VA:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)
VA:F [1.9.13_1145]
Rating: +2 (from 2 votes)

Hello: i’, trining to fix this problem, your fix didn’d work for me.
should be like this?

my @daemons = (
$ENV{LD_PRELOAD} = ‘/usr/lib/libv4l/v4l1compat.so’;
‘zmc’,
‘zma’,
‘zmf’,
‘zmfilter.pl’,
‘zmaudit.pl’,
‘zmtrigger.pl’,
‘zmx10.pl’,
‘zmwatch.pl’,
‘zmupdate.pl’,
‘zmtrack.pl’

VA:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)
VA:F [1.9.13_1145]
Rating: +1 (from 1 vote)

Post a comment