Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to get xdirectfb working
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4, 5, 6  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
gsfgf
Veteran
Veteran


Joined: 08 May 2002
Posts: 1266

PostPosted: Thu Feb 06, 2003 10:33 pm    Post subject: How to get xdirectfb working Reply with quote

How to get xdirectfb working

I finally got xdirectfb working on my laptop and everything feels so much smoother.

1. Kernel Stuff
First you need to build in framebuffer support to the kernel.
Go to Console drivers > Framebuffer Support
enable
Code:

[*]   Support for frame buffer devices (EXPERIMENTAL)
[*]   VESA VGA graphics console

You can also select the framebuffer driver for your video card. I haven't tried it w/ the card specific module since ny NeoMagic card isn't an accelerator or anything special. I'll try later and update. However you may wat to try it w/ just vesa vga enabled so you have fewer things to go wrong.
Then rebuild the kernel.

1.1 GRUB confguration
edit menu.lst to add vga=791as a kernel option as in:
Code:

title=Gentoo 2.4.19
root (hd0,0)
kernel /boot/bzImage.2.4.19 root=/dev/hda3 vga=791


791 corresponds to 1024x768x16bit color in grub.
The otehr modes are as follows:
Code:

color  depth     | 640x480  800x600  1024x768 1280x1024
256        (8bit)|  769      771       773      775
32000     (15bit)|  784      787       790      793
65000     (16bit)|  785      788       791      794
16.7 Mil. (24bit)|  786      789       792      795


and in lilo
Code:

Colours   640x400 640x480 800x600 1024x768 1152x864 1280x1024 1600x1200
--------+--------------------------------------------------------------
 4 bits  |    ?       ?     0x302      ?        ?        ?         ?
 8 bits  |  0x300   0x301   0x303    0x305    0x161    0x307     0x31C
15 bits |    ?     0x310   0x313    0x316    0x162    0x319     0x31D
16 bits |    ?     0x311   0x314    0x317    0x163    0x31A     0x31E
24 bits |    ?     0x312   0x315    0x318      ?      0x31B     0x31F
32 bits |    ?       ?       ?        ?      0x164      ?



2. Emerging
At this point go ahead and add the fbcon USE var.
then
Code:

# ACCEPT_HEYWORDS="~x86" emerge xdirectfb

I'm not sure what otehr apps need to be rebuilt with the fbcon var. I rebuilt fluxbox but that may have not been necessary. All my other apps worked fine.

3. Config files
the xdirectfb server reads xinit like the normal x server. However it also has its own config file, /usr/X11R6/lib/X11/xinit/dfbserverrc.

Edit this file so it reads
Code:

#!/bin/bash

exec /usr/X11R6/bin/XDirectFB -enableRoot

You will start all other apps in xinit as usual.

If x starts in an undesired resolution edit /etc/fb.modes.

You now have a working x framebuffer server.

4. Other stuff
Howto that isn't good for much more then lilo video modes: http://en.tldp.org/HOWTO/Framebuffer-HOWTO.html
The thread that got me in buisness: https://forums.gentoo.org/viewtopic.php?t=13912&highlight=xdirectfb
And for grub video modes: http://sdb.suselinux.hu/en/sdb/html/wessels_easy_fbdev.html

If anyone has experiance w/ the framebuffer, check out this thread: https://forums.gentoo.org/viewtopic.php?t=31562&highlight=
This is where i ask questiosn that i have yet to resolve and will add to this thread as soon as they are resolved. Most of these pertain to using the framebuffer on a high-end system.
Back to top
View user's profile Send private message
VisualPhoenix
Tux's lil' helper
Tux's lil' helper


Joined: 26 Sep 2002
Posts: 135
Location: (CT v NJ)

PostPosted: Fri Feb 07, 2003 3:22 pm    Post subject: Reply with quote

Thank Aries it works!!
Back to top
View user's profile Send private message
CoronaLover
Retired Dev
Retired Dev


Joined: 20 Jun 2002
Posts: 163
Location: Rosh-ha'ayin, Israel

PostPosted: Fri Feb 07, 2003 5:27 pm    Post subject: Reply with quote

Also add "video=vesa:mtrr,ywrap" to menu.lst's kernel line.
This will speed up things a little.
Back to top
View user's profile Send private message
heijs
Apprentice
Apprentice


Joined: 12 Jun 2002
Posts: 174
Location: Groningen

PostPosted: Mon Feb 10, 2003 8:35 am    Post subject: Reply with quote

What does ywrap do exactly?
Back to top
View user's profile Send private message
CoronaLover
Retired Dev
Retired Dev


Joined: 20 Jun 2002
Posts: 163
Location: Rosh-ha'ayin, Israel

PostPosted: Mon Feb 10, 2003 9:32 am    Post subject: Reply with quote

Taken from /usr/src/linux/Documentation/fb/vesafb.txt :
Quote:
ypan enable display panning using the VESA protected mode
interface. The visible screen is just a window of the
video memory, console scrolling is done by changing the
start of the window.
pro: * scrolling (fullscreen) is fast, because there is
no need to copy around data.
* You'll get scrollback (the Shift-PgUp thing),
the video memory can be used as scrollback buffer
kontra: * scrolling only parts of the screen causes some
ugly flicker effects (boot logo flickers for
example).

ywrap Same as ypan, but assumes your gfx board can wrap-around
the video memory (i.e. starts reading from top if it
reaches the end of video memory). Faster than ypan.
Back to top
View user's profile Send private message
heijs
Apprentice
Apprentice


Joined: 12 Jun 2002
Posts: 174
Location: Groningen

PostPosted: Mon Feb 10, 2003 2:17 pm    Post subject: Reply with quote

OK, thanks for the info, but it wasn't applicable to me.
I've got the XDirectFB running now on a Matrox G400 card (using matrox fb).

It looks really great and feels quite fast :D
Back to top
View user's profile Send private message
heijs
Apprentice
Apprentice


Joined: 12 Jun 2002
Posts: 174
Location: Groningen

PostPosted: Mon Feb 10, 2003 2:19 pm    Post subject: Reply with quote

Here is a screenshot of Gnome 2.2 running on the matrox fb, with an opened phoenix!

http://rugth1.phys.rug.nl/~heijs/screenshot.png
Back to top
View user's profile Send private message
Kumba
Developer
Developer


Joined: 16 Jul 2002
Posts: 393
Location: Sigma 957

PostPosted: Mon Feb 10, 2003 7:08 pm    Post subject: Reply with quote

Curious, is XDirectFB faster than X-Windows? Any any idea if this will work on an UltraSPARC system running ATI Hardware offhand?

--Kumba
_________________
"The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
Back to top
View user's profile Send private message
yngwin
Retired Dev
Retired Dev


Joined: 19 Dec 2002
Posts: 4572
Location: Suzhou, China

PostPosted: Mon Feb 10, 2003 9:03 pm    Post subject: Reply with quote

I got it sorta working with matroxfb. Mozilla looks fine, but I get strange coloured dots in the corners, the cursor is vague and when I right-click I don't get the menu. I'm using freshly emerged XFree 4.2.99.4, XDirectFB and waimea. I'm switching back to normal X for now, but I'd like to get this working properly. I love the easy config, just comment out the unwanted resolutions in /etc/fb.modes... (The harder part is of course the kernel and grub configs, for those not used to that.)
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
watersb
Apprentice
Apprentice


Joined: 04 Sep 2002
Posts: 297
Location: take a left turn in Tesuque

PostPosted: Mon Feb 10, 2003 9:21 pm    Post subject: no power management with nVidia Reply with quote

I tried using the framebuffer (mostly for neato console stuff), but this woke up my nVidia card just enough to mess up power management on my laptop.

That is, the machine would not suspend if I used fb console.

The lack of power management for nVidia's closed-source X drivers is well-known, but I was not aware of this problem using the (text, not X) fb console in high-resolution modes.

At the moment, I just use the XFree "nv" driver and power management is fine (well, with the most recent Dell BIOS it's somewhat messy, but that's another story... anyhow, the laptop will go to sleep when I close it).

Anyone else have any luck with nVidia cards and fb?

Anyone else using nVidia cards with XDirectFB? How about power management?
Back to top
View user's profile Send private message
gsfgf
Veteran
Veteran


Joined: 08 May 2002
Posts: 1266

PostPosted: Mon Feb 10, 2003 11:42 pm    Post subject: Re: no power management with nVidia Reply with quote

watersb wrote:

Anyone else have any luck with nVidia cards and fb?

Anyone else using nVidia cards with XDirectFB? How about power management?


I can run Xdirectfb on my GF3. It runs fine, but unaccelerated. I'm still using X on that box b/c i use dual displays and need accelerated drivers.
Back to top
View user's profile Send private message
TheJabberwokk
Apprentice
Apprentice


Joined: 13 Aug 2002
Posts: 196
Location: Gloucester

PostPosted: Tue Feb 11, 2003 3:41 pm    Post subject: FB with ati radeon AIW Reply with quote

When I run X I get garbage:

I set on my grub settings to:
Code:
kernel /boot/vmlinuz root=/dev/hda3 idebus=69 hdd=ide-scsi pci=bios,biosirq vga=792 video=vesa:mtrr,ywrap


when I run fbset I get this:
Code:
acohen@jabberwokk acohen $ fbset

mode "1024x768-76"
    # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
    geometry 1024 768 1024 10922 24
    timings 12714 128 32 16 4 128 4
    rgba 8/16,8/8,8/0,0/0
endmode


is there anyway to get 32 bit color and what do I set my timings to?
Back to top
View user's profile Send private message
gsfgf
Veteran
Veteran


Joined: 08 May 2002
Posts: 1266

PostPosted: Tue Feb 11, 2003 5:29 pm    Post subject: Re: FB with ati radeon AIW Reply with quote

TheJabberwokk wrote:
is there anyway to get 32 bit color and what do I set my timings to?


in X, all you can have is 24 bit. It's the same as 23bit, but not quite or some such. As long as you have 24bit you're running max colors.
Back to top
View user's profile Send private message
Lockup
Guru
Guru


Joined: 25 Jul 2002
Posts: 430

PostPosted: Wed Feb 12, 2003 1:24 am    Post subject: Reply with quote

finally got off my arse and made xdfb work :)
few problems though:

-as im typing this, it takes about 10 seconds per char i type to appear in anything(moz, eterm, etc)

-eterm is very slow at displaying stuff, im not sure if 2 transparancies together might be the prob(eterm trans + xdfb trans...)

-the cursor is all blurry

-the cursor leaves a black trail behind it, as if i was selecting stuff in a term(i mean for the "style" of the black crap it leaves....vertical rectangles the size of an eterm char buffer)

questions:

-could i get hardware accel in xdfb if i use the nvidia/riva fb modules instead of the vesa?(using vesa at the mo)
(mostly for games such as q2 etc)

thats all for now, thanks for the info ;)
Back to top
View user's profile Send private message
Swishy
Guru
Guru


Joined: 06 Jun 2002
Posts: 491
Location: NZ

PostPosted: Thu Feb 13, 2003 9:54 am    Post subject: Re: no power management with nVidia Reply with quote

gsfgf wrote:
watersb wrote:

Anyone else have any luck with nVidia cards and fb?

Anyone else using nVidia cards with XDirectFB? How about power management?


I can run Xdirectfb on my GF3. It runs fine, but unaccelerated. I'm still using X on that box b/c i use dual displays and need accelerated drivers.


have you tried using rivafb and adding video=riva:foo instead of video=vesa:foo ???

Cheers
Dale.
_________________
Theres no substitute for C.I.
Back to top
View user's profile Send private message
mr_andy_main
n00b
n00b


Joined: 31 Dec 2002
Posts: 24

PostPosted: Thu Feb 13, 2003 1:06 pm    Post subject: Should I be doing something different? Reply with quote

what do I have to do to get Xdirectfb to start in place of X on boot. Should it be in the xdm script or something as xdm is in my default runlevel? I have passed the video=foo option to my kernel.

thanks, andy.
Back to top
View user's profile Send private message
puddpunk
l33t
l33t


Joined: 20 Jul 2002
Posts: 681
Location: New Zealand

PostPosted: Thu Feb 13, 2003 11:19 pm    Post subject: Reply with quote

Does anyone know if this works with KDE??
Back to top
View user's profile Send private message
gsfgf
Veteran
Veteran


Joined: 08 May 2002
Posts: 1266

PostPosted: Fri Feb 14, 2003 2:11 am    Post subject: Reply with quote

puddpunk wrote:
Does anyone know if this works with KDE??


I don't use KDE, but there is absolutely no reason why it shouldn't.
Back to top
View user's profile Send private message
CoronaLover
Retired Dev
Retired Dev


Joined: 20 Jun 2002
Posts: 163
Location: Rosh-ha'ayin, Israel

PostPosted: Fri Feb 14, 2003 3:12 pm    Post subject: Reply with quote

IIRC, KDE wont work but QT only apps work great.
Back to top
View user's profile Send private message
puddpunk
l33t
l33t


Joined: 20 Jul 2002
Posts: 681
Location: New Zealand

PostPosted: Fri Feb 14, 2003 9:59 pm    Post subject: Reply with quote

Well, I messed with this for a while, and this is what I came up with:

I started using fluxbox, very nice :) Then I tried loading up KDE. KSplash crashed immediately, but thats ok, it doesn't do jack schitt. Then KWin, and KMix crashed as well.

The problem with KWin was that I had an OpenGL enhanced screensaver selected, and the XDirectFB X server didn't have any GLX extentions on it (yes, that means you can't play games, even under say a rive accelerated FB until somebody comes out with some GLX extentions for XDirectFB). So I changed the screensaver, and KWin loaded fine. Everything looked fine, except most of the icons wouldn't load (I couldn't decided if the unloaded ones were PNG, SVG or some other type).

I couldn't fix KMix or KSplash, but the initial experiance with KDE & XDirectFB was very impressive. Smooth, Fast and very responsive. XFree is a bit of a slouch!
Back to top
View user's profile Send private message
Lockup
Guru
Guru


Joined: 25 Jul 2002
Posts: 430

PostPosted: Fri Feb 14, 2003 10:39 pm    Post subject: Reply with quote

what about my cursor problem though? *raises fist* :P
Back to top
View user's profile Send private message
hhaamu
Apprentice
Apprentice


Joined: 23 Aug 2002
Posts: 253
Location: Finland

PostPosted: Sun Feb 16, 2003 7:33 pm    Post subject: Reply with quote

I think I have it working, but it only gives me a 1600x1200 blue screen (no, not of death, but normal blue) with no window manager. How do I start one (which file do I put it in)?

EDIT: Never mind, I just had to wait a bit for my .xinitrc to execute
Back to top
View user's profile Send private message
Lockup
Guru
Guru


Joined: 25 Jul 2002
Posts: 430

PostPosted: Sun Feb 16, 2003 9:08 pm    Post subject: Reply with quote

hmm my mouse stopped being weird after i tested with rivafb instead of vesa.. now i have a strange prob though.... the background screen is just weirdly distorted(kinda like when TV cable goes out...), and enlightenment menus make the screen "reset" over and over again

hrm...
Back to top
View user's profile Send private message
rb338
n00b
n00b


Joined: 03 Oct 2002
Posts: 40
Location: Eindhoven, The Netherlands

PostPosted: Tue Feb 18, 2003 7:45 pm    Post subject: Reply with quote

I have XDirectFB running perfectly now, but is there any (easy?) way to get new modelines?

I'm currently using 1280x1024 @ 77 Hz, but I really want it at 85 Hz because 77 Hz is giving me headaches.

I got this one from fbset:

mode "1280x1024-77"
# D: 131.096 MHz, H: 80.328 kHz, V: 76.649 Hz
geometry 1280 1024 1280 1024 16
timings 7628 160 32 16 4 160 4
rgba 5/11,6/5,5/0,0/0
endmode

Which is 77 Hz :(
Back to top
View user's profile Send private message
rb338
n00b
n00b


Joined: 03 Oct 2002
Posts: 40
Location: Eindhoven, The Netherlands

PostPosted: Wed Feb 19, 2003 11:32 am    Post subject: Reply with quote

Found some things, I'm rather clueless at the moment.
I'm still trying to get 1280x1024 at 85Hz, with no luck.

My kernel bootline looks like this now:
kernel /bzImage root=/dev/hda10 video=vesa:1280x1024-16@85,mtrr,ywrap hdb=ide-scsi initrd=/initrd

As you see, I don't have a vga=foo line. I had it before though, but while I was searching for answers I read that the framebuffer doesn't use it and thus it isn't needed. If this is correct, I don't know.

What I do know is that the video=foo line appears to be completely ignored. My framebuffer is now on 640x480 4bit 60Hz.

I've tried both vesa and riva framebuffer drivers, no luck. I tried entering a default mode from fb.modes, no luck. I tried adding my own fb.modes entry by converting a (perfectly working) XFree86 modeline, no luck :(

What could be the problem here?

The modeline from XFree86 is:
Modeline "test" 157.5 1280 1344 1504 1728 1024 1025 1028 1072 +HSync +VSync

With 'modeline2fb -d 16' I get:

mode "test"
geometry 1280 1024 1280 38 16
timings 6349 224 64 44 1 160 3
hsync high
vsync high
endmode

I might be wrong, but I tried using this mode by using:
video=riva:test,mtrr,ywrap (also tried vesa instead of riva)

Help? :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum