LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 02-17-2010, 03:14 PM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
howto match custom kernel config to my laptop and friends


How do I discover which kernel config parameters are important for my laptop hardware and frequently used applications?

I'm not looking for something that is 100(...)% optimized for my hardware. I would prefer to have modules for everything that I don't use at all or often. I would prefer to avoid modules (built-in) for things that I use all the time but then any updates might mean a kernel rebuild.

I'm currently running the generic PAE edition of the repository kernel. I think that I'm running the 32-bit flavor at that.
Code:
user@host:path$ uname -a
Linux mumbles 2.6.31-19-generic-pae #56-Ubuntu SMP Thu Jan 28 02:29:51 UTC 2010 i686 GNU/Linux
I know the following from sysinfo
Code:
GenuineIntel, Intel(R) Core(TM)2 Duo CPU     L7500  @ 1.60GHz
Number of CPUs: 2
CPU clock currently at 800.000 MHz with 4096 KB cache
Numbering: family(6) model(15) stepping(11)
Bogomips: 3192.09
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm ida tpr_shadow vnmi flexpriority
The box is an EmperorLinux Raven Tablet (ThinkPad X61-tablet) and I'd like to take advantage of all that the processor and the box offers.
 
Old 02-18-2010, 12:00 AM   #2
jiobo
Member
 
Registered: Nov 2008
Posts: 180

Rep: Reputation: 36
Code:
lspci
lshw
lsusb
dmesg
need harddrive support, pci device support, usb device support, filesystem support, and other support for applications and hardware.

Code:
make menuoldconfig
Read the README file from the kernel sources.
 
Old 02-18-2010, 08:13 AM   #3
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
lsmod will give a list of modules that are loaded
 
Old 02-18-2010, 08:17 AM   #4
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Starting with kernel 2.6.32 you can use make localmodconfig to automagically configure the kernel for your hardware. See this thread:
http://www.linuxquestions.org/questi...nstall-774613/
If you elect to use this option when compiling a new kernel, be sure to plug in at least one usb device. I have read that when using localmodconfig if you are not running the modules for usb devices then usb support will not be configured into your kernel. You should still run "make menuconfig" after running "make localmodconfig" to be sure that everything you need in your new kernel is enabled the way you want it (i.e., either built in or as modules).

Last edited by tommcd; 02-18-2010 at 08:18 AM.
 
Old 02-18-2010, 08:24 AM   #5
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
I have used tommcd's recomendation with satisfactory results. I also found that it was a good idea to keep the current kernel just in case. I found I'd left out some important modules 2 weeks later.
 
Old 02-18-2010, 10:21 AM   #6
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
... not quite ready for "the big leagues"

thanks to all for the advice! I'm not quite ready for the big leagues for a couple of reasons. Open your hymn books to page http://blog.avirtualhome.com/2009/11...-ubuntu-karmic for those who want to sing along.

First, I run Ubuntu Karmic whose current kernel is v2.6.31-19.56. My attempts to fetch and build a default v2.6.32.* have not been a success in part due to troubles with git and friends. Even though http://www.kernel.org reports this kernel is available, when I try, I get (sic) errors. Yes, I'm a noob where git is concerned.
Code:
user@host:path$ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-karmic.git
...
user@host:path$ git checkout Ubuntu-2.6.32.8
error: pathspec 'Ubuntu-2.6.32.8' did not match any file(s) known to git.
Second, I can create a fresh virgin config file, but have no clue how to make sure it has all of the parts that I really need and builds modules for stuff that might come up. If I've got to pour over all of the various command output listed here, that will take longer than I can spend time with right now.

Maybe the generic-pae kernel is not so bad after all.

~~~ 0;-Dan
 
Old 02-19-2010, 07:38 AM   #7
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Quote:
Originally Posted by SaintDanBert View Post
thanks to all for the advice! I'm not quite ready for the big leagues for a couple of reasons.
If you want an easier way of compiling a kernel in Ubuntu, you can try using kernel check. See this article from Ubuntu-Geek, the guy who started the Ubuntu forums:
http://www.ubuntugeek.com/automatica...in-ubuntu.html
You can also get pre-compiled Ubuntu kernels as ready to install .deb packages from the Ubuntu ppa repos:
http://kernel.ubuntu.com/~kernel-ppa/mainline/
If you install one of those kernels be sure to run:
Code:
sudo update-grub
so your new kernel is added to your grub menu so you can boot it.

Note: According to your blog:
Quote:
I wrote this how to because my laptop has 4GB of internal memory and with the default kernel that ships with Ubuntu Karmic the entire 4GB is not addressed. ... I am compiling the i386 version, if you want to compile for amd64 you need replace i386 for amd64 throughout this article.
If you have 4GB of memory and want to use it all you should try the 64bit Ubuntu. The 64bit Ubuntu will be able to use that much memory, plus a lot more if you ever add memory.

Last edited by tommcd; 02-19-2010 at 07:41 AM.
 
Old 09-11-2010, 02:30 PM   #8
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by tommcd View Post
Note: According to your blog:

If you have 4GB of memory and want to use it all you should try the 64bit Ubuntu. The 64bit Ubuntu will be able to use that much memory, plus a lot more if you ever add memory.
According to Canonical paid support folks, very few non-virtualized, workstation instances benefit from the 64-bit edition. Servers, especially virtualized, are a different story.

If you have more than 3 GB ("maxram > 3.0" vs. "maxram >= 4.0") ram,
load the PAE (linux-generic-pae, linux-image-generic-pae, linux-image-NNN-generic-pae, linux-headers-NNN-generic-pae) packages to the 32-bit edition. This provides access to larger RAM capacity while running 32-bit.

Personally, I'm running PAE and have had little documented trouble with it. That said, there is some consideration that my SLEEP and HIBERNATE and WAKE troubles are related to non-32-bit processing.

Cheers,
~~~ 0;-\ Dan
 
  


Reply



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
Finding config options for modues found by lsmod to build custom kernel jiobo Linux - Kernel 0 01-02-2009 12:08 AM
custom kernel (2.6.23) refuses to boot on dell E1505 laptop qanopus Linux - General 1 02-02-2008 10:34 AM
Creating custom headers to match a custom kernel utanja Debian 2 06-08-2007 03:15 PM
custom install cd base-config custom mithereal Debian 6 09-11-2005 03:48 PM
Mandrake 10 custom kernel howto? red_over_blue Mandriva 4 07-20-2004 02:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 12:25 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
Open Source Consulting | Domain Registration