Debian – How to increase the scrollback buffer size for tty

debiangrub2tty

I have a fresh debian jessie server installed in a virtual machine and I want to be able to scroll back with Shift+PageUp and see the full long output of commands like "apt search browser". At the moment I can only see about 5 pages worth of scrolling.

I tryied the following to increase the scrollback buffer size:

UPDATE: I found out that I have no framebuffer enabled (there is not /dev/fb0 available) … now I try to figure out how to enable it

Best Answer

As it turns out I did not have any framebuffer active on my machine (there was no device under /dev/fb0), so I tryied to mount a driver for a framebuffer.

I got a working framebuffer installing the v86d emulator (which is required by uvesafb framebuffer driver) then enabling the uvesafb driver with modprobe uvesafb.

At this point when I had a framebuffer at /dev/fb0 I noticed that the scrollback range increased.

In order to have changes permanent at boot time I did the following:

  • created a new configuration file under /etc/modules-load.d/uvesafb.conf containing the string uvesafb. This module will be loaded at boot time from now on.

  • edited the grub configuration file located at /etc/default/grub and added fbcon=scrollback:1024k to the GRUB_CMDLINE_LINUX_DEFAULT option then a update-grub. Later I noticed that a 1024KB scrollback buffer was not enough for my needs and I increased it to 4096KB.

Related Question