LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-29-2009, 02:44 PM   #1
pkhetan
LQ Newbie
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 5

Rep: Reputation: 0
how to change a kernel parameter ?


Hi,

If i get this answer from the technical support of a laptop manufacturer :

Please append the kernel parameters "acpi_os_name=Linux acpi_osi=" when boot up

What you understand from that?
Where to find this parameter? & am i supposing to modify that parameter only while i'm booting?

Many thanks for your eventual help.
 
Old 07-29-2009, 02:46 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
I think they mean you're supposed to put those arguments at the end of the kernel line of your bootloader (lilo.conf or grub's menu.lst).
 
Old 07-29-2009, 03:06 PM   #3
pkhetan
LQ Newbie
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pljvaldez View Post
I think they mean you're supposed to put those arguments at the end of the kernel line of your bootloader (lilo.conf or grub's menu.lst).
My bootloader is grub. Do you know where i could find the grub kernel file ?

thanks
 
Old 07-29-2009, 03:28 PM   #4
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
I believe the grub menu.lst file is usually located in /etc.

However, can you tell us why the laptop mfgr told you to append those parameters to the boot line? Like, what problem or situation are/were you having that prompted you to contact the manufacturer?

Based on some information in one of the kernel ChangeLogs a few months or so back (cannot remember which version), if I am not mistaken, these particular parameters are no longer particularly useful for proper or successful booting of Linux (if even they ever were useful to begin with). The Linux kernel will generally determine for itself what hardware the machine has available by querying and parsing the various BIOS tables, and configure or otherwise identify the hardware accordingly. Also, many computer BIOSes of various makes and models of machine do not contain an OSI path named 'Linux' anyways, so the parameter will probably accomplish nothing. As of the kernel ChangeLog to which I refer, the kernel also no longer spews out useful or interesting information about the OSI paths/methods used unless verbose ACPI-specific debugging is turned on in the kernel and activated via the boot line.

Anyhow, whether I am right or wrong about the parameters is less important than exactly what led you to this point, and whether or not this is the right/best way to solve your problem/issue.

Best of success,

Sasha
 
Old 07-29-2009, 03:49 PM   #5
pkhetan
LQ Newbie
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you Sasha,

The problem is that the battery is discharging too fast and the mfgr thinks that the problem comes from Linux ACPI support.

I can't find any menu.lst file under /etc. I have a grub.d directory with only a 20_memtest86+ file in it. Can you provide me with the exact file name so i can look for it?

Thanks again
 
Old 07-29-2009, 04:05 PM   #6
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Humm, I would love to, but I don't actually use grub :O heh, I use LILO. You may try the man page for GRUB (type 'man grub' in a console) or do a bit of Googling, or do a search on your system using your file-manager or other means.

Also, so that others can more easily help you in the future, please supply your distro name (which Linux this is) either with your post, or even better, add it to your LQ profile.

Finally, I cannot speak to whether or not the Linux ACPI support is draining the battery; it's possible I guess, but I don't believe that trying to adjust the OSI path/name/method parameters is the way to go on this. I'll be back in a moment....

OK, I'm back.. If you look into your kernel source folder, in the Documentation folder, locate the file called 'kernel-parameters.txt' and have a browse through there for the rest of the ACPI-related kernel parameters; I'd wager a burrito that there are other, better, parameters to use, specifically to address ACPI.

If you're interested, I can have a look after supper and see if there's anything in the file that looks more appropriate. Meanwhile, probably/hopefully some other members will come along and give you some further information, particularly re: GRUB file location, and their opinions & suggestions about the manufacturers diagnosis of your battery problem.

Cheers,

Sasha

Last edited by GrapefruiTgirl; 07-29-2009 at 04:11 PM.
 
Old 07-29-2009, 04:29 PM   #7
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
You should look in /boot/grub/menu.lst.
 
Old 07-29-2009, 04:34 PM   #8
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
The menu.lst file is probably
/boot/grub/menu.lst

That should include one or more lines beginning with
kernel

The parameter(s) would be added to the right one of those lines.

It doesn't feel right to me that this parameter would be appropriate for this situation, but I don't know enough about ACPI to make an informed comment.
 
Old 07-29-2009, 04:36 PM   #9
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Jessie Amd64
Posts: 1,477

Rep: Reputation: Disabled
Without knowing what distro you are using it's hard to say for definite.
On Debian systems the file is located at /boot/grub/menu.lst.

Here's an example from mine:

Code:
title		Debian GNU/Linux, kernel 2.6.30-1-amd64
root		(hd0,1)
kernel		/vmlinuz-2.6.30-1-amd64 root=UUID=bb475204-8e3b-4911-bc3d-dc0c9f490618 ro iommu=noaperture 
initrd		/initrd.img-2.6.30-1-amd64
Notice the the iommu=noaperture in the kernel line.
That gives you an idea of where to put the appropriate parameter.

Edit:
Damn! i type too slow!.

Last edited by the trooper; 07-29-2009 at 04:45 PM.
 
Old 07-29-2009, 05:23 PM   #10
pkhetan
LQ Newbie
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you all, you are very helpful here in this forum

For Sasha : i can't find a file named "kernel-parameters.txt", my disto is Ubuntu 9.04, but i cat the below file

pkhetan@M860TU:/usr/src/linux-headers-2.6.28-13/Documentation/acpi$ cat initramfs-add-dsdt.sh
#!/bin/bash
# Adds a DSDT file to the initrd (if it's an initramfs)
# first argument is the name of archive
# second argument is the name of the file to add
# The file will be copied as /DSDT.aml

# 20060126: fix "Premature end of file" with some old cpio (Roland Robic)
# 20060205: this time it should really work

# check the arguments
if [ $# -ne 2 ]; then
program_name=$(basename $0)
echo "\
$program_name: too few arguments
Usage: $program_name initrd-name.img DSDT-to-add.aml
Adds a DSDT file to an initrd (in initramfs format)

initrd-name.img: filename of the initrd in initramfs format
DSDT-to-add.aml: filename of the DSDT file to add
" 1>&2
exit 1
fi

# we should check it's an initramfs

tempcpio=$(mktemp -d)
# cleanup on exit, hangup, interrupt, quit, termination
trap 'rm -rf $tempcpio' 0 1 2 3 15

# extract the archive
gunzip -c "$1" > "$tempcpio"/initramfs.cpio || exit 1

# copy the DSDT file at the root of the directory so that we can call it "/DSDT.aml"
cp -f "$2" "$tempcpio"/DSDT.aml

# add the file
cd "$tempcpio"
(echo DSDT.aml | cpio --quiet -H newc -o -A -O "$tempcpio"/initramfs.cpio) || exit 1
cd "$OLDPWD"

# re-compress the archive
gzip -c "$tempcpio"/initramfs.cpio > "$1"


and in case that this is not the right file I ls the Documentation folder :

pkhetan@M860TU:/usr/src/linux-headers-2.6.28-13/Documentation$ ls
accounting acpi aoe auxdisplay cdrom connector DocBook filesystems ia64 lguest Makefile networking pcmcia s390 spi video4linux vm watchdog


Thanks
 
Old 07-29-2009, 05:54 PM   #11
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Here is the acpi section of the file /usr/src/source/linux-2.6.30.2/Documentation/kernel-parameters.txt which comes with the kernel source. I can't say why or where your version of this would be, though it ideally ought to be in the same place (other than the difference in the kernel version itself). Your path in your last post indicates you are looking in a headers folder, rather than in the kernel source itself. I'm not even certain that the kernel source is included by default with Ubuntu, but if it isn't, there are lots of ways to get it, likely the best being via your package manager.

I realize that this is probably a lot of info to try to digest (all the options below), but with a bit of help from other users who have a bit more experience than I with laptops, and perhaps with similar experience to you regarding the battery consumption, hopefully we can come up with a parameter that works for you.

Sasha

Code:

	acpi=		[HW,ACPI,X86]
			Advanced Configuration and Power Interface
			Format: { force | off | ht | strict | noirq | rsdt }
			force -- enable ACPI if default was off
			off -- disable ACPI if default was on
			noirq -- do not use ACPI for IRQ routing
			ht -- run only enough ACPI to enable Hyper Threading
			strict -- Be less tolerant of platforms that are not
				strictly ACPI specification compliant.
			rsdt -- prefer RSDT over (default) XSDT

			See also Documentation/power/pm.txt, pci=noacpi

	acpi_apic_instance=	[ACPI, IOAPIC]
			Format: <int>
			2: use 2nd APIC table, if available
			1,0: use 1st APIC table
			default: 0

	acpi_backlight=	[HW,ACPI]
			acpi_backlight=vendor
			acpi_backlight=video
			If set to vendor, prefer vendor specific driver
			(e.g. thinkpad_acpi, sony_acpi, etc.) instead
			of the ACPI video.ko driver.

	acpi.debug_layer=	[HW,ACPI,ACPI_DEBUG]
	acpi.debug_level=	[HW,ACPI,ACPI_DEBUG]
			Format: <int>
			CONFIG_ACPI_DEBUG must be enabled to produce any ACPI
			debug output.  Bits in debug_layer correspond to a
			_COMPONENT in an ACPI source file, e.g.,
			    #define _COMPONENT ACPI_PCI_COMPONENT
			Bits in debug_level correspond to a level in
			ACPI_DEBUG_PRINT statements, e.g.,
			    ACPI_DEBUG_PRINT((ACPI_DB_INFO, ...
			The debug_level mask defaults to "info".  See
			Documentation/acpi/debug.txt for more information about
			debug layers and levels.

			Enable processor driver info messages:
			    acpi.debug_layer=0x20000000
			Enable PCI/PCI interrupt routing info messages:
			    acpi.debug_layer=0x400000
			Enable AML "Debug" output, i.e., stores to the Debug
			object while interpreting AML:
			    acpi.debug_layer=0xffffffff acpi.debug_level=0x2
			Enable all messages related to ACPI hardware:
			    acpi.debug_layer=0x2 acpi.debug_level=0xffffffff

			Some values produce so much output that the system is
			unusable.  The "log_buf_len" parameter may be useful
			if you need to capture more output.

	acpi_display_output=	[HW,ACPI]
			acpi_display_output=vendor
			acpi_display_output=video
			See above.

	acpi_irq_balance [HW,ACPI]
			ACPI will balance active IRQs
			default in APIC mode

	acpi_irq_nobalance [HW,ACPI]
			ACPI will not move active IRQs (default)
			default in PIC mode

	acpi_irq_isa=	[HW,ACPI] If irq_balance, mark listed IRQs used by ISA
			Format: <irq>,<irq>...

	acpi_irq_pci=	[HW,ACPI] If irq_balance, clear listed IRQs for
			use by PCI
			Format: <irq>,<irq>...

	acpi_no_auto_ssdt	[HW,ACPI] Disable automatic loading of SSDT

	acpi_os_name=	[HW,ACPI] Tell ACPI BIOS the name of the OS
			Format: To spoof as Windows 98: ="Microsoft Windows"

	acpi_osi=	[HW,ACPI] Modify list of supported OS interface strings
			acpi_osi="string1"	# add string1 -- only one string
			acpi_osi="!string2"	# remove built-in string2
			acpi_osi=		# disable all strings

	acpi_pm_good	[X86]
			Override the pmtimer bug detection: force the kernel
			to assume that this machine's pmtimer latches its value
			and always returns good values.

 	acpi.power_nocheck=	[HW,ACPI]
 			Format: 1/0 enable/disable the check of power state.
 			On some bogus BIOS the _PSC object/_STA object of
 			power resource can't return the correct device power
 			state. In such case it is unneccessary to check its
 			power state again in power transition.
 			1 : disable the power state check

	acpi_sci=	[HW,ACPI] ACPI System Control Interrupt trigger mode
			Format: { level | edge | high | low }

	acpi_serialize	[HW,ACPI] force serialization of AML methods

	acpi_skip_timer_override [HW,ACPI]
			Recognize and ignore IRQ0/pin2 Interrupt Override.
			For broken nForce2 BIOS resulting in XT-PIC timer.

	acpi_sleep=	[HW,ACPI] Sleep options
			Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig,
				  old_ordering, s4_nonvs }
			See Documentation/power/video.txt for information on
			s3_bios and s3_mode.
			s3_beep is for debugging; it makes the PC's speaker beep
			as soon as the kernel's real-mode entry point is called.
			s4_nohwsig prevents ACPI hardware signature from being
			used during resume from hibernation.
			old_ordering causes the ACPI 1.0 ordering of the _PTS
			control method, with respect to putting devices into
			low power states, to be enforced (the ACPI 2.0 ordering
			of _PTS is used by default).
			s4_nonvs prevents the kernel from saving/restoring the
			ACPI NVS memory during hibernation.

	acpi_use_timer_override [HW,ACPI]
			Use timer override. For some broken Nvidia NF5 boards
			that require a timer override, but don't have HPET

	acpi_enforce_resources=	[ACPI]
			{ strict | lax | no }
			Check for resource conflicts between native drivers
			and ACPI OperationRegions (SystemIO and SystemMemory
			only). IO ports and memory declared in ACPI might be
			used by the ACPI subsystem in arbitrary AML code and
			can interfere with legacy drivers.
			strict (default): access to resources claimed by ACPI
			is denied; legacy drivers trying to access reserved
			resources will fail to bind to device using them.
			lax: access to resources claimed by ACPI is allowed;
			legacy drivers trying to access reserved resources
			will bind successfully but a warning message is logged.
			no: ACPI OperationRegions are not marked as reserved,
			no further checks are performed.
 
Old 07-29-2009, 05:58 PM   #12
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Also, it's possible that one of the desktop GUI tools, or a command-line tool, designed for laptop power management, can help you in this situation. Again, another user(s) with laptop experience in this area would have to step in here to give you advice, as I have mostly desktop experience and thus don't use power management much.

Sasha
 
Old 07-31-2009, 11:59 AM   #13
pkhetan
LQ Newbie
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 5

Original Poster
Rep: Reputation: 0
Hi,
Finally i found the kernel-parameters.txt, and below is the ACPI section. If someone can help me please. my 4400mAh battery stands only for 1 hour even if i don't touch the laptop and the display is idle.


acpi= [HW,ACPI,X86-64,i386]
Advanced Configuration and Power Interface
Format: { force | off | ht | strict | noirq }
force -- enable ACPI if default was off
off -- disable ACPI if default was on
noirq -- do not use ACPI for IRQ routing
ht -- run only enough ACPI to enable Hyper Threading
strict -- Be less tolerant of platforms that are not
strictly ACPI specification compliant.

See also Documentation/power/pm.txt, pci=noacpi

acpi_apic_instance= [ACPI, IOAPIC]
Format: <int>
2: use 2nd APIC table, if available
1,0: use 1st APIC table
default: 0

acpi_sleep= [HW,ACPI] Sleep options
Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig, old_ordering }
See Documentation/power/video.txt for s3_bios and s3_mode.
s3_beep is for debugging; it makes the PC's speaker beep
as soon as the kernel's real-mode entry point is called.
s4_nohwsig prevents ACPI hardware signature from being
used during resume from hibernation.
old_ordering causes the ACPI 1.0 ordering of the _PTS
control method, wrt putting devices into low power
states, to be enforced (the ACPI 2.0 ordering of _PTS is
used by default).

acpi_sci= [HW,ACPI] ACPI System Control Interrupt trigger mode
Format: { level | edge | high | low }

acpi_irq_balance [HW,ACPI]
ACPI will balance active IRQs
default in APIC mode

acpi_irq_nobalance [HW,ACPI]
ACPI will not move active IRQs (default)
default in PIC mode

acpi_irq_pci= [HW,ACPI] If irq_balance, clear listed IRQs for
use by PCI
Format: <irq>,<irq>...

acpi_irq_isa= [HW,ACPI] If irq_balance, mark listed IRQs used by ISA
Format: <irq>,<irq>...

acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT

acpi_no_initrd_override [KNL,ACPI]
Disable loading custom ACPI tables from the initramfs

acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS
Format: To spoof as Windows 98: ="Microsoft Windows"

acpi_osi= [HW,ACPI] Modify list of supported OS interface strings
acpi_osi="string1" # add string1 -- only one string
acpi_osi="!string2" # remove built-in string2
acpi_osi= # disable all strings

acpi_serialize [HW,ACPI] force serialization of AML methods

acpi_skip_timer_override [HW,ACPI]
Recognize and ignore IRQ0/pin2 Interrupt Override.
For broken nForce2 BIOS resulting in XT-PIC timer.
acpi_use_timer_override [HW,ACPI}
Use timer override. For some broken Nvidia NF5 boards
that require a timer override, but don't have
HPET

acpi_backlight= [HW,ACPI]
acpi_backlight=vendor
acpi_backlight=video
If set to vendor, prefer vendor specific driver
(e.g. thinkpad_acpi, sony_acpi, etc.) instead
of the ACPI video.ko driver.

acpi_display_output= [HW,ACPI]
acpi_display_output=vendor
acpi_display_output=video
See above.

acpi.debug_layer= [HW,ACPI,ACPI_DEBUG]
acpi.debug_level= [HW,ACPI,ACPI_DEBUG]
Format: <int>
CONFIG_ACPI_DEBUG must be enabled to produce any ACPI
debug output. Bits in debug_layer correspond to a
_COMPONENT in an ACPI source file, e.g.,
#define _COMPONENT ACPI_PCI_COMPONENT
Bits in debug_level correspond to a level in
ACPI_DEBUG_PRINT statements, e.g.,
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ...
The debug_level mask defaults to "info". See
Documentation/acpi/debug.txt for more information about
debug layers and levels.

Enable processor driver info messages:
acpi.debug_layer=0x20000000
Enable PCI/PCI interrupt routing info messages:
acpi.debug_layer=0x400000
Enable AML "Debug" output, i.e., stores to the Debug
object while interpreting AML:
acpi.debug_layer=0xffffffff acpi.debug_level=0x2
Enable all messages related to ACPI hardware:
acpi.debug_layer=0x2 acpi.debug_level=0xffffffff

Some values produce so much output that the system is
unusable. The "log_buf_len" parameter may be useful
if you need to capture more output.

acpi.power_nocheck= [HW,ACPI]
Format: 1/0 enable/disable the check of power state.
On some bogus BIOS the _PSC object/_STA object of
power resource can't return the correct device power
state. In such case it is unneccessary to check its
power state again in power transition.
1 : disable the power state check

acpi_pm_good [X86-32,X86-64]
Override the pmtimer bug detection: force the kernel
to assume that this machine's pmtimer latches its value
and always returns good values.
 
  


Reply


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
Change directory with parameter in ksh script sharathkv Programming 3 08-13-2008 08:42 AM
Change postional parameter mamtasahai1 Linux - General 2 06-10-2008 08:28 PM
Linux change TCP kernel Parameter for TCP DELAY ACK TICKS linux_mando Linux - Networking 5 08-22-2006 09:20 AM
How to change library parameter? blachan Linux - Newbie 0 07-12-2004 07:16 AM
Change parameter of /etc/sysconfig/network with a script philipina Linux - Hardware 1 03-11-2004 01:59 PM


All times are GMT -5. The time now is 02:23 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration