LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 02-14-2009, 12:43 AM   #1
brixtoncalling
Member
 
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403

Rep: Reputation: 67
Lockup with new Kernel on 12.1


Hello all,
I ran 12.1 on my desktop for some time. It was a learning experience and for the most part a good one. Now I've bought myself a laptop, a Lenovo 3000 N500 4233 (there are actually more numbers, but that's probably enough for now) and went back to 12.1.

I started by moving to the generic kernel. Worked fine. But then I tried compiling my own kernel -- based on the stock 2.6.24.5 but with some modifications -- and that's when the trouble started. Basically, it works normally for some period of time but then suddenly slows to a crawl and ultimately freezes.

My question isn't so much what is wrong with my kernel (or hardware?) but where do I start trying to track down the problem. I'm back with generic now, but I would like to hear what others do in such situations.

-B
 
Old 02-14-2009, 01:03 AM   #2
antitu
LQ Newbie
 
Registered: Apr 2007
Location: San Diego
Distribution: Slackware
Posts: 21

Rep: Reputation: 0
Howdy,

Anytime I compile a kernel and things lock up or just don't go right I start from the beginning.

I boot a stock kernel and scroll back through the boot messages taking note of all hardware detected. Especially SATA controllers, USB (UHCI, OHCI, EHCI, etc...) and everything else I can grab. Then go through the kernel config hitting every section and making sure the list matches. After that I go for features like audio, usb devices and power management.

After I get the kernel configured correctly I make a backup of the .config file so I don't have to go through that again.

Hopefully someone else has a more focused method of tracking down the problem. :-)

Good luck!

-Adam
 
Old 02-14-2009, 02:06 AM   #3
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
Go slowly when customiting your kernel compile options. Turn on or off just a couple of things at a time and write down the changes so you can keep track of them.
A couple of months ago, someone was on the subject of streamlining kernel configuration and posted a script which would do some of the work for you. I do't find it right now, but I did find this one which I saw around that time, so I'll include it here. If you run this while running from a generic kernel, it should produce a kernel config which will build all the stuff loaded as modules as hardcompiled features. You'll probably still need/want to tweak it some more.

Code:
#!/usr/bin/perl -w
#
# Copywrite 2005-2008 - Steven Rostedt
# Copyright 2008 Phil Endecott
# Licensed under the terms of the GNU GPL License version 2
#
# This script modifies your .config so that modules that are currently
# in use (i.e. as indicated in the output of lsmod) will be built in.
# Modules that are not in use will still be built as modules.
#
# This is based on streamline_config.pl by Steven Rostedt, which
# modifies your .config to not build unused modules at all.  The changes
# from Steven's code are indicated below.

my $config = ".config";
my $linuxpath = ".";

open(CIN,$config) || die "Can't open current config file: $config";
my @makefiles = `find $linuxpath -name Makefile`;

my %objects;
my $var;
my $cont = 0;

foreach my $makefile (@makefiles) {
	chomp $makefile;

	open(MIN,$makefile) || die "Can't open $makefile";
	while (<MIN>) {
		my $catch = 0;

		if ($cont && /(\S.*)$/) {
			$objs = $1;
			$catch = 1;
		}
		$cont = 0;

		if (/obj-\$\((CONFIG_[^)]*)\)\s*[+:]?=\s*(.*)/) {
			$var = $1;
			$objs = $2;
			$catch = 1;
		}
		if ($catch) {
			if ($objs =~ m,(.*)\\$,) {
				$objs = $1;
				$cont = 1;
			}

			foreach my $obj (split /\s+/,$objs) {
				$obj =~ s/-/_/g;
				if ($obj =~ /(.*)\.o$/) {
					$objects{$1} = $var;
				}
			}
		}
	}
	close(MIN);
}

my %modules;

open(LIN,"/sbin/lsmod|") || die "Cant lsmod";
while (<LIN>) {
	next if (/^Module/);  # Skip the first line.
	if (/^(\S+)/) {
		$modules{$1} = 1;
	}
}
close (LIN);

my %configs;
foreach my $module (keys(%modules)) {
	if (defined($objects{$module})) {
		$configs{$objects{$module}} = $module;
	} else {
		print STDERR "$module config not found!!\n";
	}
}

while(<CIN>) {
	if (/^(CONFIG.*)=m/) {
		if (defined($configs{$1})) {
			# print; (streamline_config)
			print "$1=y\n";
		} else {
			# print "# $1 is not set\n"; (streamline_config)
			print;
		}
	} else {
		print;
	}
}
close(CIN);
 
Old 02-15-2009, 08:48 AM   #4
brixtoncalling
Member
 
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403

Original Poster
Rep: Reputation: 67
OK thanks for the tips guys. I'll look into doing things more slowly and methodically than simply mass purging. And I'll give some of those scripts a try.

Another question -- could my kernel recompile be behind the fact that even now that I'm back with generic, Klaptop doesn't throttle my cpu automatically anymore? It used to bump it down per my settings whenever I unplugged and put it back to full when I plugged in again. (Or maybe time for a new thread?)
 
Old 02-15-2009, 10:30 AM   #5
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

Rep: Reputation: 96
If you did the compilation on the original 2.6.24.5 tree it must have written over the original files (in /lib/modules, say) therefore you may have broken something. In that case you may try reinstalling the original kernel packages to restore the things. If you want to modify 2.6.24.5 without interfering with the original, try using the "General setup ---> Local version - append to kernel release" option so that your version has a different name (like 2.6.24.5-custom).
 
Old 02-15-2009, 02:27 PM   #6
brixtoncalling
Member
 
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403

Original Poster
Rep: Reputation: 67
Quote:
Originally Posted by Ilgar View Post
If you did the compilation on the original 2.6.24.5 tree it must have written over the original files (in /lib/modules, say) therefore you may have broken something. In that case you may try reinstalling the original kernel packages to restore the things. If you want to modify 2.6.24.5 without interfering with the original, try using the "General setup ---> Local version - append to kernel release" option so that your version has a different name (like 2.6.24.5-custom).
I tried to be careful about that by putting a -custom on the end. But besides /lib/modules, does installing a newly compiled kernel clobber anything else? I actually reinstalled kernel-modules-2.6.24.5-smp just to be sure but I have this sinking feeling that I might have misstepped somewhere along the line ... Sağol!
 
Old 02-16-2009, 04:53 AM   #7
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

Rep: Reputation: 96
Quote:
Originally Posted by brixtoncalling View Post
But besides /lib/modules, does installing a newly compiled kernel clobber anything else?
It shouldn't. If you put the -custom then your new modules should be under /lib/modules/2.6.24.5-custom and not interfere with the stock kernel modules. This means the source of the Klaptop problem must be something else (but I have no idea what...).
 
Old 03-13-2009, 06:01 AM   #8
brixtoncalling
Member
 
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403

Original Poster
Rep: Reputation: 67
Does anyone have any experience of the Tickless System (dynamic ticks) option causing lockups? By trial and error it seems that it might be the culprit.
 
Old 03-13-2009, 07:36 AM   #9
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

Rep: Reputation: 96
It's working fine here. But then, I'm using 2.6.28. In the short time that I used the stock 2.6.24.5 I didn't have any issues (is dynamic ticks enabled in the stock kernel?).

As far as I remember these dynamic ticks were introduced around 2.6.23 (give or take 1), so I'd say 2.6.24 is one of the early kernels supporting it. If you're compiling a custom kernel you may have better luck if you use the latest ones. Maybe there was a bug and it's fixed now.
 
Old 03-13-2009, 02:23 PM   #10
brixtoncalling
Member
 
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403

Original Poster
Rep: Reputation: 67
It is not compiled in the stock 2.6.24.5 but when I made my own kernel I had lockups. I can't say for certain that it was dynamic ticks causing the problem, but since I removed them things appear to be fine.

I'm on a slow dial up right now so I haven't downloaded later kernel sources but I'll be on the road where the 'net is fast in a week so I'm going to grab some new stuff then.
 
Old 03-13-2009, 05:25 PM   #11
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 227Reputation: 227Reputation: 227
Yes we had several reports of lockups with the tickless kernel a while back.
 
Old 03-13-2009, 10:04 PM   #12
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

Rep: Reputation: 96
Quote:
Originally Posted by mRgOBLIN View Post
Yes we had several reports of lockups with the tickless kernel a while back.
... You say "a while back", so should we understand that the newer kernels solve this problem? PV was wise not to enable it in the stock kernel, as it had been just recently introduced; but I believe the bugs should've been sorted out by now.
 
Old 03-13-2009, 11:08 PM   #13
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 227Reputation: 227Reputation: 227
From memory there were issues with (some?) AMD cpus but it seemed to run fine on Intel chips. And no, as far as I'm aware no more experiments have been done with the newer kernels but it's certainly worth looking into.

I'll see if we can't get it added to the list of new options to try for the next kernel build.
 
  


Reply

Tags
lenovo, slackware


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Soft lockup, tdb lockup, etc @ Fedora6/IBM Isabelle86 Linux - Server 6 11-16-2009 03:16 PM
Keyboard lockup (freez) with new kernel (2.6.24) SOLVED neitho Linux - General 0 05-27-2008 12:01 PM
kernel panic - soft lockup detected jagdishpandey Linux - Kernel 10 07-16-2007 01:20 AM
wifi adapters causing kernel lockup dracolich Linux - Laptop and Netbook 2 07-05-2006 05:48 PM
KDE lockup after kernel upgrade c0rderr0y Slackware 5 07-17-2005 03:12 AM


All times are GMT -5. The time now is 01:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration