# [SOLVED] Disable kernel panic backtraces?

## cami

I'm experiencing kind of an odd problem while setting up a new gentoo system. When booting the new system, the kernel panics. The oops contains a lot of useful information, alas, too much for the screen. All I can see is the end of a backtrace, but not the most important information: what is actually going wrong. I've already cleared the usual suspects (in particular filesystem, root partition). Unfortunately the oops is too early for any of the messages to end up in some file I could check. I think something is going wrong with device detection, but I don't know what. Using a running system with exactly the same kernel (just booted from a different partition) everything mounts fine and clean.

Any ideas how to find out what went wrong? Can I disable the backtrace printing in kernel config maybe, so I can see the panic and the error preceding it?Last edited by cami on Mon Jun 20, 2016 10:44 am; edited 1 time in total

----------

## kikko

 *cami wrote:*   

> All I can see is the end of a backtrace, but not the most important information: what is actually going wrong.

 

Hi cami

have you already tried to scroll up the kernel buffer in the console (using Shift+PagUp), in order to see the error?

You can increase the buffer size passing some parameters at boot time (https://wiki.archlinux.org/index.php/Scrollback_buffer)

----------

## guido.hatzsis

Or if you compile the kernel with pstore you can save the crash in the efi nvram. Use a working uefi boot kernel to retrieve. This helped me debug graphics driver crashes with a blank display.

----------

## cami

Hmm, I'm having trouble getting the framebuffer console up.

I enabled

* framebuffer device support

* nvidiafb

* framebuffer console support

directly compiled into the kernel and added

video=nvidiafb:mode=1440x900@60

to the kernel command line, but no effect. Is there a way to get a scrollback buffer without a framebuffer console? Can you spot an important kernel option I missed?

----------

## cami

Finally managed to get a framebuffer*, but I still cannot scroll. I get the pingus logos and a higher resolution, but Shift+PgUp just does nothing. Something special I need to consider regarding the keyboard, maybe? I'm using an USB keyboard plugged into the PS/2 keyboard port via adapter. The keyboard works in BIOS menus, linux text console (without framebuffer) and X. Kernel has AT keyboard and USB HID support compiled-in.

Also still happy if anyone knows a way to just disable printing those backtraces.

*) with the old VESA fb driver and vga= kernel command line, and with chainloading grub2 from grub 1. 

TBH this is insane, none of the "modern" ways of grub2 work, and this way doesnt work when booting grub 2 directly. WTH? Starting to develop a strong antipathy vs. grub 2.

----------

## NeddySeagoon

cami,

Its unlikely you want nvidiafb.  You won't hit real issues until later in the install.

When you try to use Xorg, you will only be able to use the framebuffer driver which is very slow.

The nvidiafb kernel driver will grab the hardware and neither nouveau nor nvidia-drivers will load.

Provided nouveau supports your hardware, you get a free console framebuffer too.

nvidia-drivers claims it won't work with any framebuffer console but provided the framebuffer does not try to change hardware settings, you may be in luck.

After a panic, Shift+PgUp does not work. The system in halted.

You need either a serial console or a network console.  Both need another machine to be the console.

A serial console needs to be real serial on the system being debugged.

----------

## cami

Hi NeddySeagoon,

thank you for the warning. I'll disable the framebuffer console completely anyway once I've found the cause of the panic. Ironically, the debug information (stack trace) is hiding the actually useful information. Also I'm currently using vesafb (not uvesafb) as it was the only one I could get to run.

I think I'll try netconsole, that seems perfect for the task. Thank you very much for that pointer! I'm glad that someone made a nice netcat for android.

----------

## NeddySeagoon

cami,

vesafb used to work for me under nvidia-drivers but nVidia dropped support for my chipset a few years ago so I switched to nouveau.

I never needed the 3D performance anyway :)

Hmm.  If you switch to nouveau in the kernel, you get a framebuffer console for free.

You may get more screen lines from nouveau than vesafb but I don't know that.

There is another 'hack'.  In the kernel, turn on framebuffer rotation. Then your display will be driven an if it were in portrait mode instead of the default landscape.

That gets you more on screen lines too.

You may actually want to rotate your display for comfort :)

Anyway, these are just temporary debug options.

----------

## cami

Very cool idea! Netconsole did the trick for me, fortunately. I even made my init script use netcat, so I could capture its output, in the same manner, too.

----------

