kern/117374: vidcontrol videomode: Operation not supported by device

clemens fischer ino-news at spotteswoode.dnsalias.org
Sun Oct 21 07:30:02 PDT 2007


>Number:         117374
>Category:       kern
>Synopsis:       vidcontrol videomode: Operation not supported by device
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 21 14:30:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     clemens fischer <ino-news at spotteswoode.dnsalias.org>
>Release:        FreeBSD 7.0-BETA1 amd64
>Organization:
>Environment:
System: FreeBSD spotteswoode.dnsalias.org 7.0-BETA1
FreeBSD 7.0-BETA1 #3: Sun Oct 21 01:52:43 CEST 2007
root at spotteswoode.dnsalias.org:/usr/obj/usr/src/sys/spott_fbsd7_amd64
amd64

>Description:

in /etc/rc.conf.local, i have:

  allscreens_flags="-f 8x8 iso15-8x8 VGA_90x50 green"

this mode is available when adding ``options VGA_WIDTH90'' into the
kernel configuration.

the effect of this setting stopped working after going from
RELENG_6/i386 to 7-CURRENT/amd64.  the error message is:

0  # vidcontrol -P </dev/ttyv1
vidcontrol: cannot set videomode: Operation not supported by device
vidcontrol: cannot set videomode: Operation not supported by device
usage: vidcontrol [-CdHLPpx] [-b color] [-c appearance] [-f [size] file]
                  [-g geometry] [-h size] [-i adapter | mode] [-l screen_map]
                  [-M char] [-m on | off] [-r foreground background]
                  [-S on | off] [-s number] [-t N | off] [mode]
                  [foreground [background]] [show]

the other features i use in the kernel configuration, ie. setting colors
for syscons(4) do work.

you might have a look at /usr/src/usr.sbin/vidcontrol/vidcontrol.c
around lines 600 ff. in routine "video_mode", where this error message
is issued:

  if (ioctl(0, mode, NULL) < 0) {
          warn("cannot set videomode");
          return EXIT_FAILURE;
  }

other information:

  1  # vidcontrol -i adapter </dev/ttyv0
  fb0:
      vga0, type:VGA (5), flags:0x7007f
      initial mode:24, current mode:24, BIOS mode:3
      frame buffer window:0xffffffff800b8000, buffer size:0x8000
      window size:0x8000, origin:0x0
      display start address (0, 0), scan line width:80
      reserved:0x0

  0  # vidcontrol -i mode </dev/ttyv0
      mode#     flags   type    size       font      window      linear buffer
  ------------------------------------------------------------------------------
   24 (0x018) 0x00000001 T 80x25           8x16  0xb8000 32k 32k 0x00000000 32k

this list is much shorter than it used to be: earlier it listed a dozen
or so available video modes. i am not sure what the reason for this
could be, but i'm using a recent motherboard from gigabyte: "M61P-S3",
Serial Number: Mon Jan 01 00:02:38 2007 with its onboard graphic, the
chipset beeing "nVIDIA GeForce 6100/nForce 430".  the dmesg(8) related
to vga says:

  vgapci0: <VGA-compatible display> mem
  0xf2000000-0xf2ffffff,0xe0000000-0xefffffff,0xf5000000-0xf5ffffff irq 23
  at device 13.0 on pci0
  ...
  sc0: <System console> at flags 0x100 on isa0
  sc0: VGA <9 virtual consoles, flags=0x300>
  vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0


pciconf -lcv:
  vgapci0 at pci0:0:13:0:    class=0x030000 card=0xd0001458 chip=0x03d010de rev=0xa2 hdr=0x00
      vendor     = 'Nvidia Corp'
      class      = display
      subclass   = VGA
      cap 01[48] = powerspec 2  supports D0 D3  current D0
      cap 05[50] = MSI supports 1 message, 64 bit

i have the feeling that it might have to do with a driver not
recognizing the chip.

here's the result of a ktrace(1):

  ...
  8437 vidcontrol CALL  ioctl(0,VT_GETACTIVE,0x506800)
  8437 vidcontrol RET   ioctl 0
  8437 vidcontrol CALL  ioctl(0,CONS_GETINFO,0x506804)
  8437 vidcontrol RET   ioctl 0
  8437 vidcontrol CALL  ioctl(0,GIO_SCRNMAP,0x50681c)
  8437 vidcontrol RET   ioctl 0
  8437 vidcontrol CALL  ioctl(0,CONS_GET,0x50691c)
  8437 vidcontrol RET   ioctl 0
  8437 vidcontrol CALL  ioctl(0,CONS_MODEINFO,0x506920)
  8437 vidcontrol RET   ioctl 0
  8437 vidcontrol CALL  ioctl(0,CONS_GETINFO,0x5067c0)
  8437 vidcontrol RET   ioctl 0
  8437 vidcontrol CALL  ioctl(0,CONS_GETINFO,0x7fffffffd840)
  8437 vidcontrol RET   ioctl 0
  ...
  8437 vidcontrol CALL  ioctl(0,PIO_FONT8x8,0x800903800)
  8437 vidcontrol RET   ioctl 0
  8437 vidcontrol CALL  close(0x3)
  8437 vidcontrol RET   close 0
  8437 vidcontrol CALL  ioctl(0,CONS_GET,0x7fffffffd6bc)
  8437 vidcontrol RET   ioctl 0
  8437 vidcontrol CALL  ioctl(0,SW_VGA_C90x50,0)
  8437 vidcontrol RET   ioctl -1 errno 19 Operation not supported by device
  ...

i tried to find the related pieces of software:

  0  # g -r VGA_C90x50 /sys/
  /sys/dev/fb/vga.c:    { M_VGA_C90x50, V_INFO_COLOR, 90, 50, 8,  8, 4, 1,
  /sys/dev/fb/vga.c:        { M_VGA_C90x50, M_VGA_C80x25 },
  /sys/dev/fb/vga.c:    case M_VGA_C90x50: case M_VGA_M90x50:
  /sys/dev/syscons/scvidctl.c:    case SW_VGA_C90x50: case SW_VGA_M90x50:
  /sys/sys/consio.h:#define SW_VGA_C90x50 _IO('S', M_VGA_C90x50)
  /sys/sys/fbio.h:#define M_VGA_C90x50    46      /* vga 8x8 font on color */

but none of these files look anything suspicious.

i tried other video settings, but none of them work.  i was tempted to
use VESA modes, but amd64 doesn't have VESA support.

>How-To-Repeat:

the behaviour is 100% reproducible.

>Fix:

i have no workaround or fix. the bug is annoying when installing a new
release, like going from RELENG_6 to RELENG_7 using installation CDs
for a new architecture (amd64), without anything on the machine. in
these cases i usually install ports/sysutils/screen to start working.
especially things like mergemaster(8) are difficult with only 80
columns. once X11 is up, i don't care all that much, though.

regards, clemens
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list