Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
When X stops, frame buffer stops too [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
ramin.honary
n00b
n00b


Joined: 29 Jun 2008
Posts: 24

PostPosted: Wed Oct 22, 2008 6:28 pm    Post subject: When X stops, frame buffer stops too [SOLVED] Reply with quote

I am using Linux 2.6.24 gentoo r3 on a 15-inch AlBook (aluminum PowerBook G4, powerpc, ppc, what have you).

When my system boots up, I have it start with "agetty" and log in using the terminal emulator that runs on the frame buffer. Whenever I feel like it, I can launch into Xorg using "startx" and my favorite window manager. It runs flawlessly, absolutely no issues with video within the X environment.

However, when the X server shuts down, the frame buffer vomits -- I see what looks like a fireball exploding in slow motion, or perhaps the aurora. Whatever you call it, it sure cannot be good for my screen. After this, I can no longer see anything on my screen, except for whatever faint pattern was burned into it by the end-of-X event.

I can still use the keyboard to input to the TTY. In fact, I am still in the bash shell and I can issue commands: exit, re-login, mount, anything. But I can't see any text on the screen as I do it (I have to type carefully). I can even issue the "startx" command again, and X takes control of the graphics hardware, and the screen comes to life, and I can see everything, and X runs flawlessly again... until the next X shut down.

I suspect that perhaps my "xorg.conf" file isn't defined properly, and Xorg falls back on the frame buffer device for output. But this raises a few questions:
    * (Obviously) how do I configure xorg.conf for my machine. Surely someone has done it before.
    * Why does X not return control of the frame buffer to it's parent process? Will it do so with proper configuration; how so?
    * Is there any way to force "agetty" to take back control of the frame buffer?
    * If its not "agetty" that's controlling the frame buffer before I start X, what is? Is it the kernel, or a userland process? Is there a trap I can set to take back control of the frame buffer?
If anyone wants my "xorg.conf" file, please ask. In any case, I would be most grateful if anyone can answer my questions.


Last edited by ramin.honary on Sun Oct 26, 2008 12:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Wed Oct 22, 2008 6:32 pm    Post subject: Reply with quote

Moved from Multimedia to Gentoo on PPC.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
ramin.honary
n00b
n00b


Joined: 29 Jun 2008
Posts: 24

PostPosted: Fri Oct 24, 2008 12:43 am    Post subject: Reply with quote

I finally found some very helpful information from Timothy Stotts' website. As it turns out, I had frame buffer support compiled as a kernel module, and according to Stotts, it must be built into the kernel. Someone may want to mention that in the Gentoo PPC installation handbook. I am re-compiling right now, hopefully it will help. He also provided an "xorg.conf" file which seems to work, but it doesn't seem to have solved my problem. I'll report back here when I have updated my re-compiled linux kernel.

But I still don't know a few things, like what terminal emulator does "agetty" use, and why does this terminal not re-take control of the frame buffer after the Xserver shuts down.

I will still be waiting for replies from all you good people here at Gentoo discussion forums.
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Fri Oct 24, 2008 2:21 pm    Post subject: Reply with quote

http://www.gentoo.org/doc/en/handbook/handbook-ppc.xml?part=1&chap=7#doc_chap3
See code listing 3.1: # make pmac32_defconfig
If you do that the framebuffer driver will be built into the kernel.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
ramin.honary
n00b
n00b


Joined: 29 Jun 2008
Posts: 24

PostPosted: Sun Oct 26, 2008 12:03 pm    Post subject: Reply with quote

nixnut wrote:
http://www.gentoo.org/doc/en/handbook/handbook-ppc.xml?part=1&chap=7#doc_chap3
See code listing 3.1: # make pmac32_defconfig
If you do that the framebuffer driver will be built into the kernel.


Actually, I thought I had already done that. Then I checked out the "/usr/src/linux/.config" file and found out that "CONFIG_FB=m" set the configuration to compile it as a module! I don't know how that happened, I must have set the frame-buffer thing to <M> in the menu-config program without thinking about it.

Anyway, I recompiled the kernel with the frame buffer driver as part of the kernel, and now it works just fine. I can start and stop X from the console, and when it stops it gives the console back to me without doing anything crazy to the screen. One more problem down!
Back to top
View user's profile Send private message
ramin.honary
n00b
n00b


Joined: 29 Jun 2008
Posts: 24

PostPosted: Sun Oct 26, 2008 1:40 pm    Post subject: Reply with quote

I just wanted to post here the answer to some of the questions I posed in the first post of this thread.

First of all, I found a lot of interesting information on the framebuffer driver at this site: http://wiki.linuxquestions.org/wiki/Framebuffer

As it turns out, any graphics device that maintains a frame buffer can be linked up to the linux kernel's framebuffer driver. The driver itself is typically assigned the device node "/dev/fb".

The terminal emulator that runs on the frame buffer driver (the program that puts all of that text on the screen as linux is booting up and running init) is a console program called "fbcon". So fbcon is the terminal emulator, agetty handles user login with its IO going through fbcon and launches bash, bash runs ncurses which communicates directly with the console device, so when you login and run bash, ncurses is talking to fbcon as well. If you want window support, let X take control of the frame buffer, or maybe it talks to the graphics device directly and bypasses the linux framebuffer driver entirely? I don't know, but I would like to know.

If I am wrong about any of this, someone please say something.

Things to look for in manual pages and on the net: fbdev, fbcon, fbset
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
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