ckth
December 28th, 2007, 03:25 PM
This post could be related to an Ubuntu bug filed at: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/129910 . ---------------------------- . .
EDIT: User jonppe (http://ubuntuforums.org/showpost.php?p=5534454&postcount=4) 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 (http://ubuntuforums.org/showthread.php?t=260946)- 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:
# 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
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):
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):
sudo sed "s/vesafb/#&/" -i /etc/modprobe.d/blacklist-framebuffer
3. Update the kernel(s) on your machine:
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
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 (http://tldp.org/HOWTO/Framebuffer-HOWTO-5.html#ss5.3) 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:
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.
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/Documentation/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/+source/initramfs-tools/+bug/129910/comments/108
[5] Finicky decimal declarations: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/129910/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/+source/initramfs-tools/+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 (http://kmandla.wordpress.com/2007/10/20/howto-set-up-gutsy-for-speed/).
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!
EDIT: User jonppe (http://ubuntuforums.org/showpost.php?p=5534454&postcount=4) 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 (http://ubuntuforums.org/showthread.php?t=260946)- 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:
# 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
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):
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):
sudo sed "s/vesafb/#&/" -i /etc/modprobe.d/blacklist-framebuffer
3. Update the kernel(s) on your machine:
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
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 (http://tldp.org/HOWTO/Framebuffer-HOWTO-5.html#ss5.3) 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:
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.
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/Documentation/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/+source/initramfs-tools/+bug/129910/comments/108
[5] Finicky decimal declarations: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/129910/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/+source/initramfs-tools/+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 (http://kmandla.wordpress.com/2007/10/20/howto-set-up-gutsy-for-speed/).
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!