Sigillo's framebuffer
5 September 2005
Status
The new nvidiafb still (as of 2.6.12) doesn't work right on sigillo;
I need to bugreport it to Antonin.
The rivafb works fine -- but it's not compatible with the proprietary
nvidia kernel module. You can play movies (but touching the keyboard
will freeze the computer solid) and watch slideshows -- great for plane
rides. See recipe in /root/commands.
I finally (Sep 05) discovered how people get a penguin on boot -- you
need to activate FB_VESA (Device drivers | Graphics support | Support
for frame buffer devices) in the kernel; cf. Documentation/fb/vesafb.txt
-- I've used Linux for nearly four years, wanting a boot penguin,
knowing it was possible on Sigillo (since I get it with Knoppix) and
that I likely need the vesa framebuffer, but never actually activating
this part of the kernel. I built it in, along with Device drivers |
Graphics | Console display | Framebuffer console -- and it works! I now
have a beautiful little penguin on boot, though it gets turned off by
loading the keyboard that maps the vpr key (in bootmisc.sh).
Afterwards, I get a framebuffer console, which works fine both with
xorg's nv and the nvidia driver -- in the latter, glxgears run at
1300fps, which is what it was doing before. It will likely also work
with xorg's fbdev driver without problems -- the reason I wasn't using
that is that the rivafb and nvidiafb modules don't unload. Otoh the nv
driver is likely better. Anyway, the framebuffer console is not as nice
as the text console, and apparently also not quite as fast, so I won't
be using it on a regular basis. I haven't tried suspending it.
Now, can I watch movies directly in this vesa framebuffer? No,
that doesn't work, but fbi handles slideshows fine.
Goal
I've been curious about the framebuffer and its capabilities. Does it
allow me to view graphics from the CLI? Could I run a lightweight GUI
using the framebuffer -- as in directfb -- and get faster responses?
Documentation and software
Commands
- To use the framebuffer, do this on bootup:
- rmmod nvidia
- modprobe fbcon
- modprobe rivafb
- fbset fullscreen
- mplayer -vo directfb <moviename>
- fbi /windows/WINDOWS/Web/Wallpaper/*.jpg -t 5 -autozoom -edit
- w3m can use fb for web page image display
- MPlayer keyboard shortcuts (usful in framebuffer -- mouse will freeze everything!)
- Basic keys: (complete list in the man page, also check input.conf)
- <- or -> seek backward/forward 10 seconds
- up or down seek backward/forward 1 minute
- pgup or pgdown seek backward/forward 10 minutes
- < or > step backward/forward in playlist
- p or SPACE pause movie (press any key to continue)
- q or ESC stop playing and quit program
- + or - adjust audio delay by +/- 0.1 second
- o
cycle OSD mode: none / seekbar / seekbar + timer
- * or / increase or decrease PCM volume
- z or x adjust subtitle delay by +/- 0.1 second
- r or t adjust subtitle position up/down, also see -vf expand
- Snapshot of the frame buffer content: cp /dev/fb0 myfile
- fbset: set frame buffer resolution
- fbset -i
- fbset "640x480-60"
- man fb.modes
- modeline2fb (for creating entries in /etc/fb.modes)
Gentoo's
instructions
- Kernel
- Disable the rivafb module
- Enable the vesa module (and no
other gfx card modules)
- Lilo
- vga=ask video=vesa:ywrap,mtrr
- Boot
menu
- A menu should come up with all the
strange 640x480 modes
listed
- Enter 0317 at the prompt to give you a
1024x768x16bit console resolution (even though it isn't in the
menu)
- Also try 031A
- to give you a 1280x1024x32k
using the vga=794
- The logo should come up at the
top!
- Lilo
- vga=791 video=vesa:ywrap,mtrr
- vga=794 video=vesa:ywarp,mtrr (1280x1024)
- vga=0x307,
0x319, 0x31a or 0x31b (1280x1024)
- vga=0x346
(=838) (1600x1200)
You can also use
rivafb --
- if you don't load fbcon, you'll be able to unload rivafb afterwards
- you can also run X with the nv driver (but not with the nvidia driver)
- append = "video=riva:1024x768-16@60"
- You may be able to up to 1280x1024x256
- RivaFB
support must be compiled into the kernel for this to work
- Still didn't
work for me -- I didn't try all settings of course
The frame buffer devices should show up.
Installation history
2004-03-20
It turns out you can run X-windows with the fbdev driver!!!! You can likely also run it in dual monitors, using xinerama -- cf instructions. Dual head graphics cards are likely not supported.
2004-11-11
I wrote to Antonino Daplas <adaplas@pol.net> that the main remaining annoyance is that you can't remove the rivafb module:
You can actually, as long as you don't enable the framebuffer console. This sequence should work:
modprobe rivafb
mplayer -vo directfb
rmmod rivafb
Of course you will only have a vga console.
He also points out that the nv driver is compatible with rivafb, so you can boot into windows after using riva.
2004-11-09
2004-11-08
"If
you have sample XFree86 modelines, you can use the utility modeline2fb
to convert them to entries compatible with /etc/fb.modes."
It's part of the fbset package. Here's my modeline -- not sure it's entirely correct:
ModeLine "1280x854" 85.26 1280 1296 1552 1792 854 854 861 892 -hsync -vsync
To create the correct modes, issue
modeline2fb /etc/X11/XF86Config
That generated this:
mode "1280x854"
geometry 1280 854 1280 26201 8
timings 11728 240 16 31 0 256 7
hsync low
vsync low
endmode
I
tried setting the -d 16 and -d 24 flag for more color depth
(modeline2fb -d 24 /etc/X11/XF86Config-4), but when I used those modes
I got the error message there wasn't enough video memory. The
result of the 8-bit mode:
#fbset -x
Mode "1280x854"
# D: 85.266 MHz, H: 47.581 kHz, V: 53.342 Hz
DotClock 85.267
HTimings 1280 1296 1552 1792
VTimings 854 854 861 892
Flags "-HSync" "-VSync" # Warning: XFree86 doesn't support accel
EndMode
However, today I couldn't get fbxine to work -- it worked yesterday,
though only with scrambled colors. Today it didn't work at all.
2004-11-07 update
I followed these instructions from Antonino A. Daplas <adaplas@pol.net> to modify the rivafb.c file:
1. cd /usr/src/linux && pico drivers/video/riva/fbdev.c
2. search for the function "static int __devinit rivafb_probe".
3. Somewhere near the end you should see these lines:
fb_destroy_modedb(info->monspecs.modedb);
info->monspecs.modedb_len = 0;
info->monspecs.modedb = NULL;
4. Remove the line "info->monspecs.modedb_len = 0"
5. Next, search for the function "static int rivafb_check_var"
6. Look for these lines:
if (!mode_valid && !list_empty(&info->modelist))
return -EINVAL;
7. Change it so it becomes like this:
if (!mode_valid && info->monspecs.modedb_len)
return -EINVAL;
8. Recompile and reboot. The end effect is rivafb will accept all modelines coming from fbset as gospel truth.
root@sigillo:/usr/src/linux# rm drivers/video/riva/*.o
root@sigillo:/usr/src/linux# make SUBDIRS=drivers/video/riva
LD drivers/video/riva/built-in.o
CC [M] drivers/video/riva/fbdev.o
CC [M] drivers/video/riva/riva_hw.o
CC [M] drivers/video/riva/nv_driver.o
CC [M] drivers/video/riva/rivafb-i2c.o
LD [M] drivers/video/riva/rivafb.o
Building modules, stage 2.
MODPOST
CC drivers/video/riva/rivafb.mod.o
LD [M] drivers/video/riva/rivafb.ko
root@sigillo:/usr/src/linux# cp drivers/video/riva/rivafb.ko /lib/modules/2.6.9/kernel/drivers/video/riva/
This worked -- I can now issue:
fbset "1024x768-60"
and get the new size. Some oddities with the mouse -- it doesn't go
over the whole area, but seems to stick to 640x480. Now I need to
define the real monitor size in /etc/fb.modes. These can be derived
from the modeline in X11, I found this one, for a radeon card:
mode "1280x854-60"
# D: 79.815 MHz, H: 51.963 kHz, V: 60.003 Hz
geometry 1280 854 1280 854 8
timings 12529 128 16 8 1 112 3
rgba 8/0,8/0,8/0,0/0
endmode
root@sigillo:~# fbset "1280x854-60"
rivafb: setting virtual Y resolution to 26214
rivafb: Detected CRTC controller 1 being used
rivafb: Detected CRTC controller 1 being used
root@sigillo:~# fbset -x
Mode "1280x854"
# D: 79.815 MHz, H: 51.963 kHz, V: 60.003 Hz
DotClock 79.816
HTimings 1280 1296 1408 1536
VTimings 854 855 858 866
Flags "-HSync" "-VSync" # Warning: XFree86 doesn't support accel
EndMode
Slideshows are great -- and the quality better thanfor the radeon:
fbi /windows/WINDOWS/Web/Wallpaper/*.jpg -t 5 -autozoom -edit
Press H for help, V to remove the status line, R to rotate, etc.
And then I discovered fbxine -- it will play anything, but the colors are all wrong. Sound is perfect.
2004-11-04 update
On the 2.6.9 kernel, rivafb is working,
but only in 640x480, and only when the nvidia kernel module is not
loaded.
It's probably been working on 2.6 for a while, and quite possibly on 2.4 too.
Here are the results before installing the proprietary nVidia driver.
I inserted after boot with the flatpanel=1 parameter that came up by
default:
Installing module rivafb.
If the device isn't there, or isn't configured
correctly, this could cause your system to pause for up to a minute.
ACPI: PCI interrupt 0000:01:00.0[A] -> GSI 11 (level, low) -> IRQ 11
rivafb: nVidia device/chipset 10DE0176
rivafb: nVidia Corporation NV17 [GeForce4 420 Go 32M]
rivafb: flatpanel support enabled
rivafb: Detected CRTC controller 1 being used
rivafb: RIVA MTRR set to ON
rivafb: could not retrieve EDID from DDC/I2C
rivafb: setting virtual Y resolution to 52428
rivafb: Detected CRTC controller 1 being used
rivafb: Detected CRTC controller 1 being used
Console: switching to colour frame buffer device 80x30
rivafb: PCI nVidia NV17 framebuffer ver 0.9.5b (32MB @ 0xEC000000)
Installation succeeded.
Please press ENTER when you are ready to continue.
I can only see it on the built-in screen -- the attached screen is
black. The size is perhaps 640x480. Note the version number: 0.9.5b.
root@sigillo:~# cat /proc/fb
0 NV17
The i2c modules are loaded! They must be required for the framebuffer:
Module Size Used by rivafb 49924 1 i2c_algo_bit 8968 1 rivafb vgastate 9472 1 rivafb cfbimgblt 2944 1 rivafb i2c_core 19088 2 rivafb,i2c_algo_bit
Yay!!
Settings are in /etc/fb.modes.
fbset with no parameters shows this:
root@sigillo:~# fbset mode "640x480-60"
# D: 25.176 MHz, H: 31.469 kHz, V: 59.942 Hz
geometry 640 480 640 32767 8
timings 39721 40 24 32 11 96 2
accel true
rgba 8/0,8/0,8/0,0/0
endmode
The results are excellent, but of course the screen is needlessly small.
If I try issue fbset "640x480-60" I get this:
rivafb: setting virtual Y resolution to 52428
rivafb: Detected CRTC controller 1 being used
That's the default. Other settings don't work -- that is to say, all the
"640x480" settings work, and the sync rate number at the end makes no
difference.
Once the modules are loaded, I cannot unload them. I then issued
rmmod -f rivafb i2c_algo_bit vgastate cfbimgblt i2c_core
and the command simply didn't execute, just hung there -- everything was
still working.
Now, after installing the proprietary nVidia driver, version 1.0.6111, inserting the riva module still works fine:
Module Size Used by rivafb 49924 0 i2c_algo_bit 8968 1 rivafb vgastate 9472 1 rivafb cfbimgblt 2944 1 rivafb i2c_core 19088 2 rivafb,i2c_algo_bit nvidia 4814900 0
However, it has no effect. Since it's not used, it removes cleanly:
# rmmod rivafb i2c_algo_bit vgastate cfbimgblt i2c_core
After removing the nvidia kernel module, rivafb loads fine. I tried to play a video:
root@sigillo:/ssa/video# mplayer -vo fbdev welcome.avi
Didn't work. Size is wrong.
vesafb
I issued modprobe vesafb:
vesafb: probe of vesafb0 failed with error -6
Still, lsmod shows it itserted:
Module Size Used by vesafb 4896 0 cfbcopyarea 3840 1 vesafb cfbimgblt 2944 1 vesafb cfbfillrect 3584 1 vesafb
Removing it produces this mess:
# rmmod vesafb cfbcopyarea cfbimgblt cfbfillrect
Device 'vesafb0' does not have a release() function, it is broken and must be fixed.
Badness in device_release at drivers/base/core.c:85
[<c01c7580>] kobject_cleanup+0x98/0x9a
[<c01c7582>] kobject_release+0x0/0xa
[<c01c78ce>] kref_put+0x39/0x93
[<c01c75aa>] kobject_put+0x1e/0x22
[<c01c75aa>] kobject_put+0x1e/0x22
[<c01c7582>] kobject_release+0x0/0xa
[<e0927293>] vesafb_exit+0xf/0x1f [vesafb]
[<c012dc92>] sys_delete_module+0x153/0x183
[<c01449eb>] do_munmap+0x142/0x17f
[<c010400d>] sysenter_past_esp+0x52/0x71
2.6.5 kernel update (fall 2003?)
In the 2.6.5 kernel I have
rivafb enabled and get this in dmesg:
rivafb: nVidia device/chipset 10DE0176
rivafb: On a laptop. Assuming Digital Flat Panel
rivafb: Detected CRTC controller 1 being used
rivafb: RIVA MTRR set to ON
rivafb: PCI nVidia NV20 framebuffer ver 0.9.5b (nVidiaGeForce4-4, 32MB
@ 0xEC000000)
Console: switching to colour frame buffer device 80x30
The switch during boot, however, is not pretty -- an illegible blob of
lights in the middle, where I can just about make out a duplicated
image of the Debian boot screen. These modules are loaded:
fbcon
26692 0
font
8192 1 fbcon
rivafb
46276 1
vgastate
9472 1 rivafb
cfbimgblt
2944 1 rivafb
Can I leave fbcon out of it? And font? Or are they required to run
rivafb?
|