On FreeBSD 10.1, with the standard clang compiler, # /usr/local/sbin/vbetool dpms off exits on signal 4 (core dumped), instead of powering off the screen. If I use lang/gcc to compile sysutils/vbetool and its dependencies, everything works well. My material is an old Sony VAIO Laptop with an Intel Mobile GM965/GL960 video card. I would like to add there are some more recent releases of vbetool in another site: http://cgit.freedesktop.org/~airlied/vbetool/
(In reply to jdn06 from comment #0) > On FreeBSD 10.1, with the standard clang compiler, > > # /usr/local/sbin/vbetool dpms off > > exits on signal 4 (core dumped), instead of powering off the screen. I'll try my best to reproduce the problem but it is very hard without real hardware sometimes. > I would like to add there are some more recent releases of vbetool in another site: http://cgit.freedesktop.org/~airlied/vbetool/ It is a fork and I don't think we need this "newer" version because these changes are really Linux-specific. Actually, you don't want to use vbetool for turning off screen unless you have no choice. Please try other drivers + hot keys first, e.g., acpi_sony(4), acpi_video(4), etc.
A commit references this bug: Author: jkim Date: Tue Jun 30 17:42:23 UTC 2015 New revision: 390976 URL: https://svnweb.freebsd.org/changeset/ports/390976 Log: Fix a regression when built with Clang. PR: 201165 Changes: head/devel/libx86/Makefile head/devel/libx86/files/patch-thunk.c
A fix
The problem was not sysutils/vbetool but it in devel/libx86. Please update the port and try again. Thanks!
Sorry, but the problem is still the same on my computer, after rebuild of the three ports with the new devel/libx86. Is there a way for me to help you to find the problem? I don't think I can script a command with acpi and I use this laptop as a server. I want a script that powers off the screen during the boot, even if I am not here; sysutils/vbtool did the job very nicely till then.
(In reply to jdn06 from comment #5) > Sorry, but the problem is still the same on my computer, after rebuild of the > three ports with the new devel/libx86. Hmm... That's not good. > Is there a way for me to help you to find the problem? If you have the core file, please do "gdb -c vbetool.core /usr/local/bin/vbetool" and show me the output. > I don't think I can script a command with acpi and I use this laptop as a > server. I want a script that powers off the screen during the boot, even if I > am not here; sysutils/vbtool did the job very nicely till then. There is absolutely no need to "script" ACPI. You just have to add a right line in /etc/sysctl.conf. For example, "dev.acpi_sony.0.brightness_default=0" for acpi_sony(4). You just have to load the right driver and find right incantation from the manual page. ;-)
(In reply to Jung-uk Kim from comment #6) I meant "gdb -c vbetool.core /usr/local/sbin/vbetool". Sorry for the typo.
OK. Here is the result: # gdb -c vbetool.core /usr/local/sbin/vbetool GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... Core was generated by `vbetool'. Program terminated with signal 4, Illegal instruction. Reading symbols from /lib/libz.so.6...done. Loaded symbols for /lib/libz.so.6 Reading symbols from /usr/local/lib/libx86.so.1...done. Loaded symbols for /usr/local/lib/libx86.so.1 Reading symbols from /lib/libc.so.7...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x0000000800a429e6 in LRMI_init () from /usr/local/lib/libx86.so.1
(In reply to jdn06 from comment #8) Are you sure you have libx86-1.1_2? I think that's what I just fixed.
(In reply to Jung-uk Kim from comment #9) You are right, I am sorry. I don't know how it happened; it was still the old version, and now with the new one, sysutils/vbetool works again. Thank you very much!