Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old December 28th, 2007   #1
ckth
First Cup of Ubuntu
 
ckth's Avatar
 
Join Date: Oct 2007
Location: Guwahati, India
Beans: 10
Ubuntu 7.10 Gutsy Gibbon
Gutsy Framebuffer HOWTO

This post could be related to an Ubuntu bug filed at: https://bugs.launchpad.net/ubuntu/+s...ls/+bug/129910
----------------------------


EDIT: User jonppe confirms that this HOWTO works on Ubuntu Hardy as well.
DISCLAIMER

The following guide is intended to help set up a framebuffer device on Ubuntu 7.10. It involves grappling with kernel modules and Grub settings, and while it is elementary, please attempt it only if you have a fair idea of what you're doing.
I cannot guarantee that everything will work out fine on your hardware. (Although virtually all graphics hardware support framebuffers, there are exceptions to the applicability of the framebuffer drivers.)
The Gutsy framebuffer issue is still being tackled as a bug (See Additional Information at the end), and I take no responsibility for support: follow the instructions at your own risk.

If you find any glaring flaws (or dangerous typos), please let me know so I can fix them before they cause any damage. To the best of my knowledge, these tweaks work (for me, and for several people at launchpad.)

HOWTO: set up the framebuffer in Gutsy Gibbon.

0. What is the framebuffer, and why do you need it?
It is a method of rendering the screen that bypasses the standard graphics card -> API -> Application Software route. The details are fuzzy[1], it would be great if someone could explain briefly.
More relevantly, framebuffer rendering can be carried out without an X session in the way, meaning that graphical applications can be run off the virtual consoles! Now, it's not that flashy, but it is functional- and you can play movies, images and slideshows, view PDFs, browse the net (with full graphical functionality, not just in text mode), and (obviously) listen to music, meaning that you can do most of the tasks usually consigned to X on the ttys. This is great for old machines, and for the times when your Xserver is down.
(In addition, you can mix music, download torrents, chat and do a lot more from the CLI- the framebuffer is like the icing on the cake.)

1. Gutsy does not have the kernel framebuffer module(s) enabled by default. This is not a bug: The reason for this is given in /etc/modprobe.d/blacklist-framebuffer:
Quote:
# Framebuffer drivers are generally buggy and poorly-supported, and cause
# suspend failures, kernel panics and general mayhem. For this reason we
# never load them automatically.
Check to see if it's already enabled in your machine. Oddly enough, some fresh Gutsy installs seem to have the framebuffers enabled by default, even though all fb drivers are blacklisted (disabled), while *all* upgrades from Feisty appear to have this problem. If the output of
Code:
fbset -i
is "/dev/fb0 not found" or some variant of this, your machine's framebuffer modules are not loaded.

If you get a description headed "Frame buffer device information", you can skip to 4.

2. Append fbcon[2] & vesafb[3][4] to the flie /etc/initramfs-tools/modules. (-if you're using Intel architecture. If you have a different graphics card, especially Nvidia, check [4]. ATI users might want to try appending radeonfb instead of vesafb, although the latter is supposed to work with all graphics cards.)

This tells the kernel to load these modules into memory (after updating the kernel, see below).

If you wish to automate the process, use the code here (It's safer to do it manually):
Code:
echo "fbcon" | sudo tee -a /etc/initramfs-tools/modules
echo "vesafb" | sudo tee -a /etc/initramfs-tools/modules
"Un-blacklist" the vesafb module. You need to comment out the "vesafb" entry in the file /etc/modprobe.d/blacklist-framebuffer.
To automate the process (Again, it's safer to do it manually):
Code:
sudo sed "s/vesafb/#&/" -i /etc/modprobe.d/blacklist-framebuffer
3. Update the kernel(s) on your machine:
Code:
sudo update-initramfs -u -k all
4. Assuming you've not set a vga mode in your Grub boot options yet, you need to include vga=xxx, (where xxx is a number corresponding to your framebuffer resolution and colour depth) in your Grub menu.lst.

To see what resolutions and colour depths are supported by your graphics card / monitor combination, type in
Code:
sudo hwinfo --framebuffer
and choose from the resulting list. (You may need to install the package 'hwinfo' with aptitude/apt-get first.)
Pick a resolution, and look here to find the corresponding hex code. It is essential that the code be entered in hexadecimal and not decimal, as Gutsy seems finicky about decimal declarations[5].

5. Find the defoptions line in /boot/grub/menu.lst, and append vga=0x317 (with your code replacing 0x317) to the end of the line.
In my case, the line reads
# defoptions=splash vga=0x317

The following line automates the process, use it only if you understand what it does:
Code:
sudo sed "s/^# *defoptions.*$/& vga=0x317/" -i /boot/grub/menu.lst
(Otherwise open up a text editor and do it manually)

Alternatively, the vga option can be specified at the Grub menu during boot. Press e, then add vga=0x317 at the end of all other boot options and press enter. This is safer for diagnostics, as it is one time only.

6. Finally, update Grub, and you're all set.
Code:
sudo update-grub
7. Reboot the pc, Turn off the resource hungry X, switch to the virtual consoles and revel in the high res glory.


References & Caveats
[1] A better definition of a framebuffer device is here: http://tldp.org/HOWTO/Framebuffer-HOWTO-3.html

[2] "fbcon" stands for FrameBuffer CONsole; meaning that a high res fully featured terminal is rendered by the framebuffer device. If your framebuffer is working, the "virtual console" you see as tty1 is a framebuffer console.
More information here:
http://www.mjmwired.net/kernel/Docum...n/fb/fbcon.txt
(Advanced) http://racl.oltrelinux.com/tutorial/fbcon.html

[3] "vesafb" is a generic framebuffer driver for Intel architecture, but works on several graphics chipsets. (Much like Xvesa works on several graphics chipsets.) It is what can be called "A Safe Bet".
http://tldp.org/HOWTO/Framebuffer-HOWTO-5.html

[4] While there is an entry in /etc/modprobe.d/blacklist-framebuffer named nvidiafb, reports suggest that it is not required; vesafb suffices for *most* cards. In the event that vesafb does not work for you, you can add in nvidiafb in the modules file and comment it in the blacklist-framebuffer, and carry out the same sequence of operations as for vesafb.
https://bugs.launchpad.net/ubuntu/+s...0/comments/108

[5] Finicky decimal declarations: https://bugs.launchpad.net/ubuntu/+s...0/comments/161


Additional Information:
If you are familiar with the "modprobe" command, you could load the modules yourself from the console, along the likes of "sudo modprobe vesafb". I'm not (familiar), so hopefully someone else will elaborate on this.

The framebuffer (or the lack, thereof) issue is being considered as a critical bug in Gutsy Gibbon. (https://bugs.launchpad.net/ubuntu/+s...ls/+bug/129910)

This issue has been discussed before in the forums here:
http://ubuntuforums.org/showthread.php?t=454392&page=3, which is where part of the solution was gleaned from.

If you wish to know how framebuffer apps may be used to see videos or view images (among other things), check out: http://ubuntuforums.org/showthread.php?t=260946

There is some general information on framebuffers to be found in the context of Gutsy Gibbon here.

Lastly, To undo the changes made, you could either backup all text files you edit, or since they're just one line (one word?) edits, you could revert to the older versions easily. Just remember to sudo update-initramfs and sudo update-grub after restoring the originals.

Happy framebuffering!

Last edited by ckth; August 11th, 2008 at 02:40 PM.. Reason: Update
ckth is offline   Reply With Quote
Old April 19th, 2008   #2
silentb
5 Cups of Ubuntu
 
Join Date: May 2006
Location: Germany
Beans: 37
Kubuntu 6.06
Send a message via ICQ to silentb
Re: Gutsy Framebuffer HOWTO

Thanks for this HOWTO!!!

I have a Geforce4 and I am not able to use nvidiafb und Nvidia's official xorg driver together (in Hardy - I don't know about Gutsy). While nvidiafb works without problems, Nvidia's driver simply stops working So I went back to vesafb. It's less speedy, but it's ok.

Another issue: My console apps are unable to use my mouse. Though, that's another topic probably.

Last edited by silentb; April 19th, 2008 at 06:31 PM..
silentb is offline   Reply With Quote
Old June 3rd, 2008   #3
rayburn
5 Cups of Ubuntu
 
Join Date: Mar 2006
Beans: 19
Re: Gutsy Framebuffer HOWTO

Thank you so much for this howto, I have searched in vain via Google for just this information! I used it in a server installation of Debian, and it worked perfectly, thanks again.
rayburn is offline   Reply With Quote
Old August 6th, 2008   #4
jonppe
First Cup of Ubuntu
 
Join Date: Jul 2008
Beans: 3
Talking Re: Gutsy Framebuffer HOWTO

Thanks a lot. It took me ~4 hours of despair to find this page.

I can confirm these instructions work also on Hardy.
I had to do some minor differences:

1. vesafb didn't work on my ati mobility radeon HD2400; radeonfb works fine.
2. command: 'sudo hwinfo --framebuffer' actually shows also hex values for video modes and their different from those of the vesafb modes.
jonppe is offline   Reply With Quote
Old August 11th, 2008   #5
ckth
First Cup of Ubuntu
 
ckth's Avatar
 
Join Date: Oct 2007
Location: Guwahati, India
Beans: 10
Ubuntu 7.10 Gutsy Gibbon
Re: Gutsy Framebuffer HOWTO

@silentb, rayburn: You're welcome!
You'll need to install gpm (a console mouse server) to enable mouse support. (A simple apt-get install gpm will do.)

@jonppe: Thanks for testing it on Hardy, I'm updating the HOWTO to include support for Hardy.
ckth is offline   Reply With Quote
Old September 22nd, 2008   #6
sirlatrom
First Cup of Ubuntu
 
Join Date: Oct 2006
Location: Frederiksberg
My beans are hidden!
Ubuntu Jaunty Jackalope (testing)
Send a message via ICQ to sirlatrom Send a message via AIM to sirlatrom Send a message via MSN to sirlatrom Send a message via Yahoo to sirlatrom Send a message via Skype™ to sirlatrom
Re: Gutsy Framebuffer HOWTO

Quote:
Originally Posted by rayburn View Post
Thank you so much for this howto, I have searched in vain via Google for just this information! I used it in a server installation of Debian, and it worked perfectly, thanks again.
You'd want to install the gpm package then, that's a console mouse.
sirlatrom is offline   Reply With Quote
Old December 15th, 2008   #7
Mr.max
First Cup of Ubuntu
 
Join Date: Dec 2008
Beans: 1
Re: Gutsy Framebuffer HOWTO

Tks for this howto. It helps to run SDL application using framebuffer.
Mr.max is offline   Reply With Quote
Old January 4th, 2009   #8
krzysz00
Just Give Me the Beans!
 
Join Date: Jul 2007
Beans: 74
Ubuntu 9.04 Jaunty Jackalope
Re: Gutsy Framebuffer HOWTO

How do I increase the font size?
__________________
Readfile file reader.
krzysz00 is offline   Reply With Quote
Old September 24th, 2009   #9
rvdavid
5 Cups of Ubuntu
 
rvdavid's Avatar
 
Join Date: May 2007
Beans: 18
Ubuntu Studio Karmic Koala (testing)
Re: Gutsy Framebuffer HOWTO

Quote:
Originally Posted by krzysz00 View Post
How do I increase the font size?
I know that this is an old post, but I thought I'd add to this since I've been looking into enabling the framebuffer for my install:

I'm currently using Ubuntu Karmic A6.

Anyway, to change the font size, To select my own font size I simply run a dpkg-reconfigure - this fires the consle-setup configuration prompts and I can select the font and font-sizes I want to use.

Code:
$sudo dpkg-reconfigure console-log
HTH.
__________________
rvdavid
My Blog
rvdavid is offline   Reply With Quote
Old October 10th, 2009   #10
mo0nykit
5 Cups of Ubuntu
 
Join Date: Sep 2009
Location: Cebu, Philippines
Beans: 43
Ubuntu 9.04 Jaunty Jackalope
Re: Gutsy Framebuffer HOWTO

Hi! May I suggest we update the title, because it also works for me in Jaunty. This is what I did:
  • I installed my own custom kernel (This is not required). But the fact that installing a new kernel (and its corresponding initrd) might cause the framebuffer console fbcon and vesafb to be NOT loaded during boot, after the Nvidia proprietary drivers have been installed.
  • While running under my new kernel, I installed the Nvidia proprietary drivers using the script I downloaded from their official site:
Code:
# <switch and login to a virtual console with Ctrl-Alt-F1>

# Stop the X server
sudo /etc/init.d/gdm stop

# Install the Nvidia proprietary drivers (the filename is just an example)
sudo sh ./NVIDIA-Linux-x86-185.18.36-pkg1.run

# Inside the installation program, it will ask if it should
# download a precompiled kernel interface. Say NO.
# Let it compile a new one. This will be successful if you have
# installed the corresponding linux-headers for the kernel that you
# are running.

# Also allow the program to automatically update the xorg.conf file
# so that you can use the Nvidia proprietary drivers in the X Server

# Start the X server
sudo /etc/init.d/gdm start
  • My problem started at this point. If I go back to the virtual console, everything is garbled.
  • Go back to the X Server (Ctrl-Alt-F7) and do the following
Code:
# Edit the /etc/initramfs-tools/modules file and add the following 
# lines in any order
vesafb
fbcon

# Edit /etc/usplash so that your splash screen will look good. This
# should correspond to the vga setting you will set in menu.lst
xres=1024
yres=768

# The two modifications above will only take effect upon updating
# the current initrd
sudo update-initramfs -u

# Edit /boot/grub/menu.lst and add the following boot option to the
# kernel you are using. This code is the decimal form for 1024x768.
vga=792

# In order to know all the other framebuffer modes that your video
# card supports (they are presented in hexadecimal)
sudo hwinfo --framebuffer
  • That's it. You should now be able to use your virtual console on the next reboot.
mo0nykit is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:45 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry