# Srollback in Console

## paulb787

I just learned that you can scroll back in the console with.shift page up and pg down.

I love it. I can only scroll up a little and was wondering.why? If anybody can help.

Thank u

----------

## wswartzendruber

So is this Konsole or GNOME Terminal...or a plain old TTY?

----------

## Aquous

He's talking about plain old TTY.

The amount you can scroll back by is determined by a certain kernel .config setting, however that has a maximum buffer size of, I believe, 256KiB. Which is about one full screen and a half. I don't know why this limitation exists, only that it's hard-coded into the kernel .config.

----------

## John R. Graham

A screen and a half? Dude, this is a text console. 256KiB is enough for over 100 pages of 80x25 text console.

- John

----------

## wswartzendruber

Isn't there a kernel configuration setting called "Backbuffer console in system RAM?"  It's under Graphics in the Drivers section.

----------

## Chiitoo

I do believe this might be the setting, quoting make menuconfig?  ^^

```
  │ CONFIG_VGACON_SOFT_SCROLLBACK_SIZE:                                                                   

  │                                                                                                                   

  │ Enter the amount of System RAM to allocate for the scrollback                                         

  │ buffer.  Each 64KB will give you approximately 16 80x25                                                  

  │ screenfuls of scrollback buffer                                                                        

  │                                                                                                                

  │ Symbol: VGACON_SOFT_SCROLLBACK_SIZE [=64]                         

  │ Type  : integer                                                                    

  │ Range : [1 1024]                                                            

  │ Prompt: Scrollback Buffer Size (in KB)                                                                          

  │   Defined at drivers/video/console/Kconfig:37                                                           

  │   Depends on: HAS_IOMEM [=y] && VT [=y] && VGACON_SOFT_SCROLLBACK [=y]          

  │   Location:                                           

  │     -> Device Drivers                             

  │       -> Graphics support                                       

  │         -> Console display driver support                        

  │           -> VGA text console (VGA_CONSOLE [=y])                        

  │             -> Enable Scrollback Buffer in System RAM (VGACON_SOFT_SCROLLBACK [=y]) 
```

Edit:

T'was all messed up oddly enough even though in preview it seemed to be fine.

----------

## BitJam

In /usr/src/linux/Documentation/fb/fbcon.txt it says:

```
2. fbcon=scrollback:<value>[k]

        The scrollback buffer is memory that is used to preserve display

        contents that has already scrolled past your view.  This is accessed

        by using the Shift-PageUp key combination.  The value 'value' is any

        integer. It defaults to 32KB.  The 'k' suffix is optional, and will

        multiply the 'value' by 1024.
```

You can adjust the size of the scrollback buffer at boot time.

----------

## Aquous

 *John R. Graham wrote:*   

> A screen and a half? Dude, this is a text console. 256KiB is enough for over 100 pages of 80x25 text console.

 Your text console may be 80x25, but mine is 1280/8x1024/16=160x64.   :Cool: 

Having said that, you are right... I forgot I was using fbcondecor, which apparently matters, because I really do only get a screen and a half with that buffer set to 256KiB.

----------

## wrc1944

Hmmm.  

I've used this kernel setting for years.  It helps some in tty, but I've only gotten about 30 pages or so more than the default 5-6 pages, IIRC.

Am I missing something?  This limited  tty scrollback has been a pet peave of mine for ten years, and I've never figured out how to make it any larger, as 1024 seems to be a hard coded limitation.   :Confused: 

```
# Console display driver support

#

CONFIG_VGA_CONSOLE=y

CONFIG_VGACON_SOFT_SCROLLBACK=y

CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=1024

CONFIG_DUMMY_CONSOLE=y

CONFIG_FRAMEBUFFER_CONSOLE=y

CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y

# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set 
```

----------

