The graphics in the console Ubuntu
In the version of Ubuntu 7.10 and above - framebuffer is turned off by default. To enable it we will conduct described below.
As a text editor, I use the nano, but you can use any other editor.
1. Open the file /etc/modprobe.d/blacklist-framebuffer
:
sudo nano /etc/modprobe.d/blacklist-framebuffer
comment out the line:
#blacklist vesafb
and save the file.
2. Open the file /etc/initramfs-tools/modules
:
sudo nano /etc/initramfs-tools/modules
add the line:
fbcon
vesafb
and save the file.
3. Rebuild the initramfs image
sudo update-initramfs -u
4. Edit GRUB2
Edit the file /etc/default/grub
At the end of the line GRUB_CMDLINE_LINUX_DEFAULT
add the parameter vga=0x31b
. Where 0x31b
- the code required resolution, which you can find in one of the two options listed below.
GRUB_CMDLINE_LINUX_DEFAULT="splash quiet"
I changed to
GRUB_CMDLINE_LINUX_DEFAULT="splash quiet vga=0x31b"
And if you want that framebuffer worked in recovery mode, then change
GRUB_CMDLINE_LINUX=""
on
GRUB_CMDLINE_LINUX="vga= 0x31b"
You have to GRUB_CMDLINE_LINUX=""
, in quotation marks may be other options. In such a case, simply append to the existing at the end.
5. Apply changes to Grub:
sudo update-grub
The table of codes permit:
640x480 | 800x600 | 1024x768 | 1280x1024 | |
---|---|---|---|---|
256 | 0x301 | 0x303 | 0x305 | 0x307 |
32 тыс | 0x310 | 0x313 | 0x316 | 0x319 |
64 тыс | 0x311 | 0x314 | 0x317 | 0x31a |
16 млн | 0x312 | 0x315 | 0x318 | 0x31b |
If you need a different resolution, then use the program hwinfo
:
1. Install the program hwinfo
sudo apt-get install hwinfo
2. Run it with a key --framebuffer
sudo hwinfo --framebuffer
in the list that appears, select the Mode for your permission to add it to the vga=...
, as described above, in the fourth paragraph.
It remains to reboot the computer and you can run in the console the mplayer
or links2
(a console browser).
Later I’ll write about that, and with what parameters need to run these programs.
P.S. For ATI, all the same, but in paragraphs 1 and 2 use radeonfb
instead of vesafb
.
If this article has helped you then please leave a comment
Thanks for reading!
Arthur is a designer and full stack software engineer. He is the founder of Space X-Chimp and the blog My Cyber Universe. His personal website can be found at arthurgareginyan.com.