Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Feb 2011 02:22:46 +0300
From:      Anonymous <swell.k@gmail.com>
To:        David Demelier <demelier.david@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: VESA and SDL in tty terminal
Message-ID:  <86hbca9mwp.fsf@gmail.com>
References:  <4D50F6F8.6070100@gmail.com> <86k4h8arby.fsf@gmail.com> <4D54E869.5050508@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
David Demelier <demelier.david@gmail.com> writes:

> On 10/02/2011 15:37, Anonymous wrote:
>> David Demelier<demelier.david@gmail.com>  writes:
>>
>>> Hello,
>>>
>>> The SDL's pkg-message says we can use video driver in tty terminal.
>>>
>>>   To do this you have to load the vesa kernel module or enable it in your
>>>   kernel, and set environment variable "SDL_VIDEODRIVER=vgl".
>>>
>>> I tried it with mplayer :
>>>
>>> $ SDL_VIDEODRIVER=vgl; export SDL_VIDEODRIVER
>>> $ mplayer -vo sdl<the file here>
>> [...]
>>> [VO_SDL] Set_fullmode: SDL_SetVideoMode failed: Unable to switch to
>>> requested mode.
>>
>> IIRC, vgl(3) mode setting unlike vidcontrol(8) doesn't work as regular user.
>> Try running mplayer under root
[...]
> Hi it works fine except after leaving mplayer or any SDL application
> my tty seems broken. I can't switch to a tty anymore my screen stays
> black and I must reboot/shutdown (no panic)

I'd try changing ttyvN using chvt[1], e.g.

  $ sudo mplayer ...; sleep 2 && sudo chvt 1

And as mode-setting is somewhat buggy I'd suggest to start with the
least problematic mode, i.e.

      mode#     flags   type    size       font      window      linear buffer
   24 (0x018) 0x00000001 T 80x25           8x16  0xb8000 32k 32k 0x00000000 32k

and scaling every video to the desired resolution using vf_scale

  [vo.sdl]
  #fs = false # implied
  #vm = false # implied
  # 1600x1200 (native) is broken, downscale
  vf-add = scale=1270:-2
  vf-add = scale=-2:1020::::::1

[1] http://lists.debian.org/debian-bsd/2009/11/msg00006.html
    the one I use - http://pastebin.com/f7ycYyxe

> Are you encountering the same issue? There is no way to use vgl as
> regular user or we could open a PR for it?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86hbca9mwp.fsf>