Debug kernel problem

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
ChasW
Level 1
Level 1
Posts: 6
Joined: Fri Jul 15, 2016 5:32 am

Debug kernel problem

Post by ChasW »

I am currently running Mint 19.3 Cinnamon. After many years of flawless operation, I have been puzzled by system freezes. I have found that the cause of the problem lie with kernels from 5.0 onwards. Reverting to 4.15.0-74-generic or earlier solves the freezing problem. Any 5.x kernels bring back the problem.

Although this solves the problem for now, I am curious as to what has changed in kernels 5.x, but don't know how to set about debugging this to identify the precise cause of the problem. My hardware is elderly (apart from a new SSD), but otherwise works well, and I shouldn't need to change it.

So, to iterate, how do I set about debugging kernel problems? I should be grateful for any help.

If it helps, here is a result of running inxi -Fxz:-

Code: Select all

System:
  Host: Preston-Linux Kernel: 4.15.0-74-generic x86_64 bits: 64 
  compiler: gcc v: 7.4.0 Desktop: Cinnamon 4.4.8 
  Distro: Linux Mint 19.3 Tricia base: Ubuntu 18.04 bionic 
Machine:
  Type: Desktop Mobo: Gigabyte model: GA-880GM-UD2H v: x.x serial: <filter> 
  BIOS: Award v: F4 date: 03/24/2010 
CPU:
  Topology: Quad Core model: AMD Phenom II X4 955 bits: 64 type: MCP 
  arch: K10 rev: 3 L2 cache: 2048 KiB 
  flags: lm nx pae sse sse2 sse3 sse4a svm bogomips: 25711 
  Speed: 800 MHz min/max: 800/3200 MHz Core speeds (MHz): 1: 800 2: 800 
  3: 800 4: 800 
Graphics:
  Device-1: AMD RS880 [Radeon HD 4250] vendor: Gigabyte driver: radeon 
  v: kernel bus ID: 01:05.0 
  Device-2: AMD Cedar [Radeon HD 5000/6000/7350/8350 Series] 
  vendor: Gigabyte driver: radeon v: kernel bus ID: 02:00.0 
  Display: x11 server: X.Org 1.19.6 driver: ati,radeon 
  unloaded: fbdev,modesetting,vesa 
  resolution: 1920x1080~60Hz, 1280x1024~60Hz 
  OpenGL: renderer: AMD CEDAR (DRM 2.50.0 / 4.15.0-74-generic LLVM 8.0.0) 
  v: 3.3 Mesa 19.0.8 direct render: Yes 
Audio:
  Device-1: AMD SBx00 Azalia vendor: Gigabyte driver: snd_hda_intel 
  v: kernel bus ID: 00:14.2 
  Device-2: AMD RS880 HDMI Audio [Radeon HD 4200 Series] vendor: Gigabyte 
  driver: snd_hda_intel v: kernel bus ID: 01:05.1 
  Device-3: AMD Cedar HDMI Audio [Radeon HD 5400/6300/7300 Series] 
  vendor: Gigabyte driver: snd_hda_intel v: kernel bus ID: 02:00.1 
  Sound Server: ALSA v: k4.15.0-74-generic 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Gigabyte driver: r8169 v: 2.3LK-NAPI port: ce00 bus ID: 03:00.0 
  IF: enp3s0 state: down mac: <filter> 
  Device-2: Realtek RTL8169 PCI Gigabit Ethernet driver: r8169 v: 2.3LK-NAPI 
  port: be00 bus ID: 04:07.0 
  IF: enp4s7 state: up speed: 100 Mbps duplex: full mac: <filter> 
Drives:
  Local Storage: total: 223.57 GiB used: 51.54 GiB (23.1%) 
  ID-1: /dev/sda vendor: Kingston model: SA400S37240G size: 223.57 GiB 
Partition:
  ID-1: / size: 106.45 GiB used: 51.44 GiB (48.3%) fs: ext4 dev: /dev/sda2 
  ID-2: swap-1 size: 6.77 GiB used: 106.0 MiB (1.5%) fs: swap dev: /dev/sda3 
Sensors:
  System Temperatures: cpu: 34.0 C mobo: N/A gpu: radeon temp: 53 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 222 Uptime: 32m Memory: 3.36 GiB used: 2.45 GiB (72.8%) 
  Init: systemd runlevel: 5 Compilers: gcc: 7.4.0 Shell: bash v: 4.4.20 
  inxi: 3.0.32

Kadaitcha Man
Level 4
Level 4
Posts: 445
Joined: Mon Aug 27, 2012 10:17 pm

Re: Debug kernel problem

Post by Kadaitcha Man »

ChasW wrote:
Tue Jan 14, 2020 5:52 am
So, to iterate, how do I set about debugging kernel problems? I should be grateful for any help.

Code: Select all

  BIOS: Award v: F4 date: 03/24/2010 
That likely doesn't help. You can't debug the kernel without installing the kernel debug symbols and a debugger, such as gdb. What you can do is troubleshoot using kernel boot parameters.

https://www.kernel.org/doc/Documentatio ... meters.txt

The other thing you can do is inspect the output of dmesg and other logs in /var/log. You can ask for assistance with errors here.
It's kad-eye-cha, not kada-itcha.

Hoser Rob
Level 15
Level 15
Posts: 5958
Joined: Sat Dec 15, 2012 8:57 am

Re: Debug kernel problem

Post by Hoser Rob »

There have been many problems with Linux kernels >=5 with old hardware. The problem is that a lot of support for old hardware has been dropped in newer kernel releases. Even if you can find the fault (and that's a wee bit more complex than it may seem), you'll have to try and convince the kernel project devs to fix it. Good luck with that, and it's not a Mint or Ubuntu support issue as such.

The 4.15 series kernels are long term support and get all the security updates. Users of old machines would be better off to just use those.

gm10
Level 20
Level 20
Posts: 10999
Joined: Thu Jun 21, 2018 5:11 pm

Re: Debug kernel problem

Post by gm10 »

ChasW wrote:
Tue Jan 14, 2020 5:52 am
Although this solves the problem for now, I am curious as to what has changed in kernels 5.x, but don't know how to set about debugging this to identify the precise cause of the problem. My hardware is elderly (apart from a new SSD), but otherwise works well, and I shouldn't need to change it.

So, to iterate, how do I set about debugging kernel problems? I should be grateful for any help.
https://www.kernel.org/doc/html/latest/ ... nting.html, and maybe more importantly: https://www.kernel.org/doc/html/latest/ ... isect.html

But try the latest development kernel first to make sure the issue hasn't already been fixed. For example, I'd get file-system related freezing in 5.3 and 5.4, but that's been fixed in 5.5.
Tune up your LM 19+: ppa:gm10/linuxmint-tools

Post Reply

Return to “Newbie Questions”