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

Hello!

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

Code:
[root@other ~]# vbetool dpms off
mmap /dev/mem: Invalid argument
Failed to initialise LRMI (Linux Real-Mode Interface).

Code:
[root@other ~]# uname -a
FreeBSD other.home 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009     [email]root@almeida.cse.buffalo.edu[/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.
 
Solution

The problem has to do with the No Zero Mapping Security feature (http://security.freebsd.org/advisories/FreeBSD-EN-09:05.null.asc). 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
 
Back
Top