[SOLVED] framebuffer uvesafb display mode/resolution

Kernels & Hardware, configuring network, installing services

[SOLVED] framebuffer uvesafb display mode/resolution

Postby garygolden » 2011-01-10 18:05

Hello all,

I'm trying to get a framebuffer console with acceptable scrolling speed on Dell XPS M1530.
It has GeForce 8600M GT card with maximum resolution supported by bios 1920x1200
Code: Select all
# cat /sys/class/graphics/fb0/modes | sort
U:1024x768p-60
U:1280x1024p-59
U:1280x800p-60
U:1600x1200p-60
U:1920x1200p-60
U:320x200p-59
U:320x240p-60
U:320x400p-59
U:640x400p-59
U:640x480p-60
U:640x480p-60
U:768x480p-60
U:800x600p-59
V:1024x768i-43
V:1024x768p-60
V:1024x768p-70
V:1024x768p-75
V:1024x768p-85
V:1280x1024p-60
V:1280x1024p-75
V:1280x1024p-85
V:1600x1200p-60
V:1600x1200p-65
V:1600x1200p-70
V:1600x1200p-75
V:1600x1200p-85
V:640x400p-85
V:640x480p-60
V:640x480p-72
V:640x480p-75
V:640x480p-85
V:800x600p-56
V:800x600p-60
V:800x600p-72
V:800x600p-75
V:800x600p-85


First, I tried default efifb driver which is compiled into debian kernel. It is definately most stable, but it shows terrible scrolling speed.

Next I compiled uvesafb, installed v86d and included both into initramfs.
I had to compile my own kernel because otherwise efifb would be loaded first and other fb drivers would be ignored.
It works pretty good, but with one annoyance: it ignores grub2 gfxpayload resolution and any options I try to pass via video= kernel param.
Here is what I do:
Code: Select all
# grub.cfg
set gfxpayload='1920x1200x32'
linux /path/to/vmlinuz
initrd /path/to/initrd


As far as I know grub should then enable framebuffer and set resolution to 1920x1200, fbcon then should load fb driver (uvesafb in this case) with the same resolution.
And indeed uvesafb is loaded
Code: Select all
[    1.312173] uvesafb: NVIDIA Corporation, G84 Board - hawk0   , Chip Rev   , OEM: NVIDIA, VBE v3.0
[    1.327316] uvesafb: protected mode interface info at c000:ba10
[    1.327321] uvesafb: pmi: set display start = c00cba73, set palette = c00cbace
[    1.327325] uvesafb: pmi: ports = 3b4 3b5 3ba 3c0 3c1 3c4 3c5 3c6 3c7 3c8 3c9 3cc 3ce 3cf 3d0 3d1 3d2 3d3 3d4 3d5 3da
[    1.394307] uvesafb: VBIOS/hardware doesn't support DDC transfers
[    1.394311] uvesafb: no monitor limits have been set, default refresh rate will be used
[    1.394397] uvesafb: scrolling: ypan using protected mode interface, yres_virtual=11468
[    1.432043] firewire_core: created device fw0: GUID 354fc000156c6c70, S400
[    1.605909] Console: switching to colour frame buffer device 80x30
[    1.606505] uvesafb: framebuffer at 0xfb000000, mapped to 0xf8300000, using 14336k, total 14336k
[    1.606507] fb0: VESA VGA frame buffer device


but with resolution set to 640x480
If I later run:
Code: Select all
fbset 1920x1200-75

it work just fine

I tried to use kernel video parameter
Code: Select all
linux /path/to/kernel video=uvesafb:1920x1200-60,ywrap

but it changes nothing, seems that it just be ignored.

Please, suggest. I want uvesafb set resolution 1920x1200 just after it loaded.

Btw:
I tried proprietary nvidiafb driver, which eventually failed to recognize the card :mrgreen:
Code: Select all
unknown NV_ARCH

That's not a problem, just a hint.
Last edited by garygolden on 2011-01-10 20:42, edited 2 times in total.
garygolden
 
Posts: 14
Joined: 2011-01-10 16:58

Re: uvesfb, grub2 and video=

Postby BioTube » 2011-01-10 19:38

nvidiafb isn't proprietary(in fact, I'm pretty sure it's incompatible with nVidia's driver); it's merely one of a number of deprecated framebuffer drivers replaced by generic ones and KMS(ie, nouveau).
Image
Ludwig von Mises wrote:The elite should be supreme by virtue of persuasion, not by the assistance of firing squads.
User avatar
BioTube
 
Posts: 7551
Joined: 2007-06-01 04:34

Re: uvesfb, grub2 and video=

Postby garygolden » 2011-01-10 19:43

I also created modprobe conf file, but it has no effect as well
Code: Select all
# cat /etc/modprobe.d/uvesafb.conf
options uvesafb mode_option=1920x1200-60 scroll=ywrap
garygolden
 
Posts: 14
Joined: 2011-01-10 16:58

Re: uvesfb, grub2 and video=

Postby garygolden » 2011-01-10 19:48

BioTube wrote:nvidiafb isn't proprietary(in fact, I'm pretty sure it's incompatible with nVidia's driver); it's merely one of a number of deprecated framebuffer drivers replaced by generic ones and KMS(ie, nouveau).


So, what's on your mind?
I tried nouveau driver in this way:
Code: Select all
echo nouveau >> /etc/initramfs-tools/modules
update-initramfs -u -k all
reboot


As result I got just blank screen.
I.e. grub enables framebuffer, but it seems that there is no fb driver in kernel so it just blank.

I'm stuck.
garygolden
 
Posts: 14
Joined: 2011-01-10 16:58

Re: uvesfb, grub2 and video=

Postby BioTube » 2011-01-10 20:05

KMS drivers require the fbcon module to actually display anything.
Image
Ludwig von Mises wrote:The elite should be supreme by virtue of persuasion, not by the assistance of firing squads.
User avatar
BioTube
 
Posts: 7551
Joined: 2007-06-01 04:34

Re: uvesfb, grub2 and video=

Postby garygolden » 2011-01-10 20:35

I did it!
To view which modes your hardware supports do this (make sure uvesafb module is loaded)
Code: Select all
cat /sys/class/graphics/fb0/modes


I have NO idea what the first letter means (U or V) but if I choose a mode which starts with V it works!
Code: Select all
linux /path/to/linux video=uvesafb:1600x1200-85,ywrap

Even ywrap scrolling works now. I'm so happy.

I would be very thankful if someone could explain meaning of U and V in that file.

So, to get your virtual console framebuffered with uvesafb:

1. Decompile efifb from kernel, otherwise uvesafb won't be able allocate framebuffer.
Code: Select all
Device Drivers --->
    Graphics support --->
        Support for frame buffer devices --->
            <M>   Userspace VESA VGA graphics support
            [ ]      EFI-based Framebuffer Support


2. Install userspace helper
Code: Select all
aptitude install v86d


3. Choose your preferred vbe mode:
Code: Select all
modprobe uvesafb
cat /sys/class/graphics/fb0/modes | grep V

In my case is 1600x1200-85

4.
Code: Select all
echo "options uvesafb mode_option=1600x1200-85 scroll=ywrap" > /etc/modprobe.d/uvesafb.conf


5. initramfs
Code: Select all
echo uvesafb >> /etc/initramfs-tools/modules
update-initramfs -uv -k all | grep uvesa


6. enable framebuffer in grub2
Code: Select all
echo 'GRUB_GFXPAYLOAD_LINUX="1600x1200x32"' >> /etc/default/grub
update-grub


7.
Code: Select all
reboot


See also
http://www.kernel.org/doc/Documentation/fb/uvesafb.txt
http://www.kernel.org/doc/Documentation/fb/fbcon.txt
Last edited by garygolden on 2011-01-12 14:40, edited 2 times in total.
garygolden
 
Posts: 14
Joined: 2011-01-10 16:58

Re: uvesfb, grub2 and video=

Postby garygolden » 2011-01-10 20:36

BioTube wrote:KMS drivers require the fbcon module to actually display anything.


Of course it requires it :)
garygolden
 
Posts: 14
Joined: 2011-01-10 16:58

Re: [SOLVED] framebuffer uvesafb display mode/resolution

Postby MrFrood » 2011-01-10 21:46

Given that this thread is marked solved I guess that this post is a bit late, that said for those that are interested in trying uvesafb with Debian there is a nice little how-to over at http://blog.samat.org/p/High-resolution-text-console-with-uvesafb-and-Debian. This how-to worked for me a while back when I set up uvesafb on my Debian box.
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.

http://happy.sdf-eul.org/
User avatar
MrFrood
 
Posts: 480
Joined: 2008-04-22 12:08
Location: London UK

Re: [SOLVED] framebuffer uvesafb display mode/resolution

Postby garygolden » 2011-01-11 00:31

Yep, that howto describes exactly the same actions I did in my case.

I'd like to add to Samat's howto that vga is not really a kernel parameter, it's interpreted by bootloader to determine which video mode use.
In grub2 gfxpayload variable does basically the same, but with important difference that it doesn't enable old vesafb.
garygolden
 
Posts: 14
Joined: 2011-01-10 16:58

Re: [SOLVED] framebuffer uvesafb display mode/resolution

Postby tamasrepus » 2011-01-12 07:21

garygolden wrote:I'd like to add to Samat's howto that vga is not really a kernel parameter, it's interpreted by bootloader to determine which video mode use.
In grub2 gfxpayload variable does basically the same, but with important difference that it doesn't enable old vesafb.


Thanks for the clarification! I've added a correction to my post.
User avatar
tamasrepus
 
Posts: 1
Joined: 2011-01-12 07:13


Return to System configuration

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable