I suspect its the same on 13.0 but I am using 13.0-RC1 currently. The vidcontrol(1) man page states the following: | The following command will capture the contents of the first | virtual terminal video buffer, and redirect the output to | the shot.scr file: | | vidcontrol -p < /dev/ttyv0 > shot.scr | | | The following command will dump contents of the fourth | virtual terminal video buffer to the standard output in the | human readable format: | | vidcontrol -P < /dev/ttyv3 But it does not work: # vidcontrol -p < /dev/ttyv0 vidcontrol: dumping screen: Inappropriate ioctl for device # vidcontrol -P < /dev/ttyv0 vidcontrol: dumping screen: Inappropriate ioctl for device I have i915kms.ko loaded from the drm-kmod package. Regards.
This might need sc(4) to work.
(In reply to Marek Zarychta from comment #1) Maybe. The man page does not state that. | DESCRIPTION | The vidcontrol utility is used to set various | options for the syscons(4) or vt(4) console driver Also description for -p and -P option does not state that sc(4) instead of vt(4) is needed.
Yes, with sc(4) it still works on 13.1-STABLE #5 stable/13-n250020-5f3d952f6e6: Tue Mar 15 18:51:46 CET 2022 Unfortunately, sc(4) can be only enabled when you are not booting with EFI. >Maybe. The man page does not state that. Yep. Recently I see a lot of commits "Fix a typo in...", but probably no one is willing to look deeper and document incompatibilities of vt(4).
Isn't the vt(4) 'the future' for terminal on FreeBSD? Maybe vidcontrol(1) should just be fixed to work on vt(4)?
(In reply to Marek Zarychta from comment #3) > Unfortunately, sc(4) can be only enabled when you are not booting with EFI. Well. That may be true on your hardware. But all our servers, and all my personal hardware has the following in loader.conf(5) kern.vty=sc All of them boot via UEFI and all of them use the kpi/drmn graphics modules. So just for the record; sc(syscons) does not prevent you from booting through UEFI. :-) HTH l8r, Chris
(In reply to Chris Hutchinson from comment #5) Are you 100% sure all your hardwares are legacy (non-UEFI) booted? On UEFI, efifb (only usable via vt) is forced and sc is not emulated (by firmware) at all. So nothing can detect legacy (character based) frame buffer on UEFI-booted environment. (For UEFI-capable hardwares with legacy boot ennbled, CSM of UEFI firmware would take care of it, just stop hiding physical text frame buffer or emulate actually-nonexistent hardware, which would be dependent on hardware). It's a limitation of UEFI, not of FreeBSD. So kern.vty=sc on UEFI-booted environment would be ignored and forced vt. On vidcontrol side, discussions would be needed which to capture, graphical frame buffer or vt-internal text buffer. Someone would want images displayed to be captured, that means, texts are also captured as image, not as characters. But OTOH, others would want only texts to be captured as characters. This is like the behaviour with mice driven by moused.
-p / -P uses the CONS_SCRSHOT ioctl, which is not currently supported by vt
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=1f4442f71fa33a8ef6d3da808e32872fb23a5700 commit 1f4442f71fa33a8ef6d3da808e32872fb23a5700 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2022-04-06 23:39:19 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2022-04-06 23:39:19 +0000 vidcontrol: be explicit that -p and -P are sc(4) only PR: 263099 MFC after: 1 week Sponsored by: The FreeBSD Foundation usr.sbin/vidcontrol/vidcontrol.1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
(In reply to Slawomir Wojciech Wojtczak from comment #2) | DESCRIPTION | The vidcontrol utility is used to set various | options for the syscons(4) or vt(4) console driver immediately after that: Only a small subset of options is supported by vt(4). Unsupported options lead to error messages, typically including the text "Inappropriate ioctl for device".
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=c71ae91f1976746b380a8aada8676d7ae084fdc5 commit c71ae91f1976746b380a8aada8676d7ae084fdc5 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2022-04-07 00:19:54 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2022-04-07 00:26:43 +0000 vidcontrol: disable p, P, and H when vt(4) is in use These options use the CONS_SCRSHOT ioctl to capture the contents of the current console, which is not yet supported by vt(4). Disable the options when vt(4) is in use rather than emitting a possibly confusing error message. This change should be reverted if CONS_SCRSHOT is implemented for vt(4). PR: 263099 MFC after: 1 week Sponsored by: The FreeBSD Foundation usr.sbin/vidcontrol/vidcontrol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
I was about to suggest exactly that - just add info in the man page that -p and -P options work for syscons(4) only. Closing as it will be added to the man page. Thank You and have a great day. Regards.
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=ef024be3755c6e09e0caf5f1df989e9a09f54063 commit ef024be3755c6e09e0caf5f1df989e9a09f54063 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2022-04-06 23:39:19 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2022-04-11 12:15:22 +0000 vidcontrol: disable p, P, and H when vt(4) is in use These options use the CONS_SCRSHOT ioctl to capture the contents of the current console, which is not yet supported by vt(4). Disable the options when vt(4) is in use rather than emitting a possibly confusing error message. This change should be reverted if CONS_SCRSHOT is implemented for vt(4). PR: 263099 MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit c71ae91f1976746b380a8aada8676d7ae084fdc5) (cherry picked from commit 1f4442f71fa33a8ef6d3da808e32872fb23a5700) usr.sbin/vidcontrol/vidcontrol.1 | 6 +++++- usr.sbin/vidcontrol/vidcontrol.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-)
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=1bb77846adee4a44c38a7b5777749357b1b9ff20 commit 1bb77846adee4a44c38a7b5777749357b1b9ff20 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2022-04-06 23:39:19 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2022-04-20 00:31:29 +0000 vidcontrol: disable p, P, and H when vt(4) is in use These options use the CONS_SCRSHOT ioctl to capture the contents of the current console, which is not yet supported by vt(4). Disable the options when vt(4) is in use rather than emitting a possibly confusing error message. This change should be reverted if CONS_SCRSHOT is implemented for vt(4). PR: 263099 MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit c71ae91f1976746b380a8aada8676d7ae084fdc5) (cherry picked from commit 1f4442f71fa33a8ef6d3da808e32872fb23a5700) (cherry picked from commit 4aa249b5f367c3fe0aec287bbf156131ec75ebd3) usr.sbin/vidcontrol/vidcontrol.1 | 6 +++++- usr.sbin/vidcontrol/vidcontrol.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-)