sysutils/vbetool doesn't work with FreeBSD 8.0-RELEASE and STABLE


New Member

Messages: 6


Tried to establish sysutils/vbetool on FreeBSD 8 (STABLE, then 8.0-RELEASE on virtual machine) and got an error:

[root@other ~]# vbetool dpms off
mmap /dev/mem: Invalid argument
Failed to initialise LRMI (Linux Real-Mode Interface).
[root@other ~]# uname -a
FreeBSD other.home 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009     [email][/email]:/usr/obj/usr/src/sys/GENERIC  i386
May be, I need to set up some sysctl's to avoid such behaviour, or may be it's an error?

More information could be provided by request.

Also, on 7.3 vbetool works perfectly.

Thanks for the attention.


New Member

Reaction score: 1
Messages: 1


The problem has to do with the No Zero Mapping Security feature ( This was turned on by default in FreeBSD 8.0+

To turn it off:
[cmd=]sysctl security.bsd.map_at_zero=1[/cmd]

To turn it back on:
[cmd=]sysctl security.bsd.map_at_zero=0[/cmd]

I am using vbetool to turn off my laptop monitor. So I just made and alias to turn off the security feature, turn off the monitor, then turn the security feature back on. And like wise to turn the monitor back on.

Turn off monitor:
sysctl security.bsd.map_at_zero=1 ; /usr/local/sbin/vbetool dpms off ; sysctl security.bsd.map_at_zero=0

Turn on monitor:
sysctl security.bsd.map_at_zero=1 ; /usr/local/sbin/vbetool dpms on ; sysctl security.bsd.map_at_zero=0