10
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support Installation & Upgrades [SOLVED] How to set NOMODESET and other kernel boot options in grub2 Thread: How to set NOMODESET and other kernel boot options in grub2 Login with SSO Help Activity Page Please read before SSO login Quic k Links Forum Community Ubuntu Community Other Support Soc ial Media Useful Links Advanc ed Searc h Results 1 to 10 of 104 Page 1 of 11 1 2 3 ... Last 84 people like this. Sign Up to see w hat your friends like. Like Thread Tools Display November 4th, 2010 Join Date: Oct 2007 Beans: Hidden! How to set NOMODESET and other kernel boot options in grub2 On some hardware configurations, you need to set some kernel parameters for ubuntu to boot or work properly. A common one is nomodeset, which is needed for some graphic cards that otherwise boot in to a black screen or corrupted splash, acpi_osi= to fix lcd backlight and other problems, and noapic and nolapic to work around various ACPI BIOS issues. In this how to I will explain briefly what this is and how to do it. This how to applies to ubuntu 10.04 and 10.10. It may not apply to wubi, I dont know how to do it in wubi. (update, see post #8 for the differences with wubi) What are these options? nomodeset The newest kernels have moved the video mode setting into the kernel. So all the programming of the hardware specific clock rates and registers on the video card happen in the kernel rather than in the X driver when the X server starts.. This makes it possible to have high resolution nice looking splash (boot) screens and flicker free transitions from boot splash to login screen. Unfortunately, on some cards this doesnt work properly and you end up with a black screen. Adding the nomodeset parameter instructs the kernel to not load video drivers and use BIOS modes instead until X is loaded. Note that this option is sometimes needed for nVidia cards when using the default "nouveau" drivers. Installing proprietary nvidia drivers usually makes this option no longer necessary, so it may not be needed to make this option permanent, just for one boot until you installed the nvidia drivers. acpi_osi= This option frequently solves problems with LCD backlight, fan control problems and misreporting of thermal events. What I understand it does (but corrections are welcome), is prevent the kernel from reporting to the bios that its any windows version the bios asks for. By #1 Linux noob forever P4man Forum

Desligar Ubuntu [RESOLVIDO]

Embed Size (px)

DESCRIPTION

tutorial

Citation preview

Page 1: Desligar Ubuntu [RESOLVIDO]

Forum The Ubuntu Forum Community Ubuntu Official Flavours Support

Installation & Upgrades

[SOLVED] How to set NOMODESET and other kernel boot options in grub2

Thread: How to set NOMODESET and other kernel boot options in grub2

Login with SSO Help

Activity Page Please read before SSO login

Quic k Links Forum Community Ubuntu Community Other Support Soc ial Media

Useful Links

Advanc ed Searc h

Results 1 to 10 of 104

Page 1 of 11 1 2 3 ... Last

84 people like this. Sign Up to see w hatyour friends like.

Like

Thread Tools Display

November 4th, 2010

Join Date:Oct 2007

Beans:Hidden!

How to set NOMODESET and other kernel boot options in grub2

On some hardware configurations, you need to set some kernel parameters for ubuntu to boot orwork properly. A common one is nomodeset, which is needed for some graphic cards thatotherwise boot in to a black screen or corrupted splash, acpi_osi= to fix lcd backlight and otherproblems, and noapic and nolapic to work around various ACPI BIOS issues. In this how to I willexplain briefly what this is and how to do it.

This how to applies to ubuntu 10.04 and 10.10. It may not apply to wubi, I dont know how to do it inwubi.(update, see post #8 for the differences with wubi)

What are these options?

nomodesetThe newest kernels have moved the video mode setting into the kernel. So all the programmingof the hardware specific clock rates and registers on the video card happen in the kernel ratherthan in the X driver when the X server starts.. This makes it possible to have high resolution nicelooking splash (boot) screens and flicker free transitions from boot splash to login screen.Unfortunately, on some cards this doesnt work properly and you end up with a black screen.Adding the nomodeset parameter instructs the kernel to not load video drivers and use BIOSmodes instead until X is loaded.

Note that this option is sometimes needed for nVidia cards when using the default "nouveau"drivers. Installing proprietary nvidia drivers usually makes this option no longer necessary, so itmay not be needed to make this option permanent, just for one boot until you installed the nvidiadrivers.

acpi_osi=This option frequently solves problems with LCD backlight, fan control problems andmisreporting of thermal events. What I understand it does (but corrections are welcome), isprevent the kernel from reporting to the bios that its any windows version the bios asks for. By

#1

Linux noob forever

P4man

Forum

Page 2: Desligar Ubuntu [RESOLVIDO]

default, the kernel pretends to be all windows versions, that way we are certain the bios executesall the code needed to initialize the hardware. Unfortunately, some bioses contain fixes to fixproblems with specific windows versions (notably vista) that arent needed or dont work for otherOS's. Setting

Code:

acpi_osi=

(nothing behind the = sign) as boot option makes the kernel not respond to osi queries.

If the bios has provisions for Linux, you can also try

Code:

acpi_osi="Linux"

Or you can try

Code:

acpi_osi="Windows 2006"

To make the kernel pretend its vista and make the bios execute routines on machines that requirethem.

acpi=offThis disables ACPI completely. Note: this may not work with all computers and will disable a lot of useful (or even needed)features. In some cases it may even disable some crucial features, like.. fans. Be careful with thisoption, it might cause your machine to overheat if the fans no longer turn. Think of this as a lastresort. Also note some machines require acpi=ht instead.

Noapic and nolapicnoapic and nolapic kernel options instruct the kernel to not use certain programmable interruptcontrollers. To understand what that means exactly requires a deep knowledge of PC hardware, Iwill not go in to that here, Ill limit myself to saying on some bioses, especially for older systems,there are problems in the implementation of this and it may be necessary to disable either orboth to cure a wide range of obscure problems, often but not always related to keyboard andmouse and power management (standby/resume issues).

vmalloc=xxxM In some cases kernel drivers can not be loaded due to a lack of virtual addressing space on 32 bitsystems. Logs will show errors like

Code:

allocation failed: out of vmalloc space - use vmalloc=<size> to increase size.

Details can be found here:http://www.mythtv.org/wiki/Common_Pr...lloc_too_small

This has been reported by extremejosh who's machine failed to load the restricted nvidia driverson a geforce 7350 and appears more or less common if you have several tv tuners. Increasing thesize of vmalloc to 196 or even more may help in such cases.

How to enable kernel options on the livecd (before install)

If you boot ubuntu from a livecd (or USB stick), right after the bios splash screen you will get apurple screen with a keyboard logo at the bottom:

Page 3: Desligar Ubuntu [RESOLVIDO]

Press any key at that moment to access a menu. Select your language with the arrow keys, pressenter and you will see this menu:

If you press the F6 key, a menu at the bottom will open allowing you to set kernel options with thespace bar or enter key. You can close the menu with escape key and resume booting by selectingthe option “try ubuntu without installing” (please note that session does allow you to installubuntu once you found the kernel options cured your problem).

If you need to add kernel options not provided by the F6 menu, you can just type them in at theend of the boot options line.

Important: if you select a kernel boot option from the F6 menu and proceed to boot and laterinstall ubuntu, those boot options will NOT be applied to your installation. If you needednomodeset to get the livecd to boot, you will almost certainly need it again once you reboot in toyour fresh install. See below how to set those options on an installed ubuntu. And perhaps clickthe “affects me too” on this bug report where I request these settings be applied (semi)automatically.

How to temporarily set kernel boot options on an installed OS (notwubi)

To set kernel boot options, you must edit your grub configuration. You can do this temporarily fora single boot by entering the grub menu. If you do not get to see the grub boot menu after thebios automatically, you may have to press SHIFT key after the bios logo to get in to grub:

Select the default ubuntu kernel (usually the top one), and rather than pressing enter, press E toedit.

Press DOWN ARROW until you get to the line that starts with

Code:

Page 4: Desligar Ubuntu [RESOLVIDO]

linux /boot

and press END keys to position your cursor at the end of the that line usually ending with “quietsplash”.

Now you can type in additional kernel options like nomodeset (please dont make the same typingerror I made for this screenshot ):

press control+X to boot the modified grub entry.

Important: setting boot options this way only applies to a single boot. If you reboot the machine,those settings will be lost, unless you make them permanent (see below)

How to permanently set kernel boot options on an installed OS (notwubi)

To permanently change the default kernel boot options, press ALT+F2 or open a terminal fromsystem > accessories > terminal. Type in the following command:

Code:

gksudo gedit /etc/default/grub

a text editor will open with the grub configuration file. Near the top of that file you will seesomething very similar to this:

Code:

GRUB_DEFAULT=0#GRUB_HIDDEN_TIMEOUT=0GRUB_HIDDEN_TIMEOUT_QUIET=trueGRUB_TIMEOUT=10GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo DebianGRUB_CMDLINE_LINUX_DEFAULT="quiet splash"GRUB_CMDLINE_LINUX=""

add your custom boot options to the GRUB_CMDLINE_LINUX_DEFAULT line, so for instance:

Code:

Page 5: Desligar Ubuntu [RESOLVIDO]

GRUB_DEFAULT=0#GRUB_HIDDEN_TIMEOUT=0GRUB_HIDDEN_TIMEOUT_QUIET=trueGRUB_TIMEOUT=10GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo DebianGRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"GRUB_CMDLINE_LINUX=""

Save the file and exit gedit. If you have to add kernel options that contain quotation marks, addthem as such:

Code:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset acpi_osi=\"Linux\""

Now in the terminal, run the following command to update your grub configuration with the newdefault settings:

Code:

sudo update-grub

Thats all.

To do: wubi part.

Last edited by P4man; February 9th, 2011 at 01:40 PM.

Adv Reply Reply With Quote

November 4th, 2010

Join Date:Jan 2009

Location:Flanders

Beans:Hidden!

Re: How to set NOMODESET and other kernel boot options in grub2

great tutorial,

I will put it in my signature. Maybe you can tell something about the "acpi=off" option too.

registered Linux user #500968Killer tux video

setting boot options

#2

I Ubuntu, Therefore, I Am

sanderd17

Adv Reply Reply With Quote

November 4th, 2010 #3

Page 6: Desligar Ubuntu [RESOLVIDO]

Join Date:Oct 2007

Beans:Hidden!

Re: How to set NOMODESET and other kernel boot options in grub2

acpi=off really is a "nuclear bomb" solution IMHO. APCI is an essential part of any somewhatmodern PC and turning it off can cause bigger issues than it solves (disable fans etc). If you need it,the above tutorial can help in setting the option, but Im reluctant to advertise the option.acpi_osi= is one option I may add later though.

Linux noob forever

P4man

Adv Reply Reply With Quote

November 4th, 2010

Join Date:Jan 2009

Location:Flanders

Beans:Hidden!

Re: How to set NOMODESET and other kernel boot options in grub2

I needed to use the acpi=off option with ubuntu versions 9.xx and recently, I've seen someone elsewho needed to use it with 10.10. Can acpi_osi=... solve the same problems? And what are thedifferences between the two?

registered Linux user #500968Killer tux video

setting boot options

#4

I Ubuntu, Therefore, I Am

sanderd17

Adv Reply Reply With Quote

November 4th, 2010

Join Date:Oct 2007

Beans:Hidden!

Re: How to set NOMODESET and other kernel boot options in grub2

acpi_osi= doesnt disable turn off all acpi functions. It just makes the kernel not pretend itswindows to the acpi bios and that can avoid problems with bioses where windows errata are fixedin bios for a specific windows OS (by default linux will pretend to be any windows version). Moredetails here:

ftp://ftp.suse.com/pub/people/trenn/...or_vendors.pdf

#5

Linux noob forever

P4man

Page 7: Desligar Ubuntu [RESOLVIDO]

adding acpi_osi= commonly fixes problems with LCD backlight, due to a bug in vista that vendors"fixed" in the bios.

Adv Reply Reply With Quote

November 7th, 2010

Join Date:Jun 2008

Location:Switzerland

Beans:8

Distro:Ubuntu

Re: How to set NOMODESET and other kernel boot options in grub2

Really a valuable how-to. It's only thanks to it, that my new and rather expensive PanasonicToughbook became usable for me.Meanwhile I made the boot option "acpi_osi=" permanent in the proper place /etc/default/grub,as explained above. My gratitude to P4man !

#6

First Cup of Ubuntuquercus54

Adv Reply Reply With Quote

November 8th, 2010

Join Date:Oct 2007

Beans:Hidden!

Re: How to set NOMODESET and other kernel boot options in grub2

Can anyone with wubi experience point me in the right direction how to do this in wubi? Wubi usesgrub4dos right? Or windows bootloader chainloading grub4dos ?

How to set kernel boot options to solve black screen (nomodeset), LCD backlight and other biosrelated issues

#7

Linux noob forever

P4man

Adv Reply Reply With Quote

November 8th, 2010

Join Date:Nov 2009

Location:North Vancouver

#8

QVVV bm apcaz yrucavn

bcbc

Page 8: Desligar Ubuntu [RESOLVIDO]

Beans:Hidden!

Distro:Edubuntu 14.04 Trusty Tahr

Re: How to set NOMODESET and other kernel boot options in grub2

Wubi overrides are identical to what is in post #1 - once it is installed.

To override on the initial install is different and to complicate things, since Ubuntu 11.10 there aretwo distinct methods to install with Wubi. NOTE: this initial Wubi-specific override is effective onlyfor a single boot. After that you need to either make it permanent or continue to override asshown in post #1.

Method 1 (traditional way, if you downloaded the ISO or ran installed from a CD): after thewindows part is completed you reboot to do the actual install (ubiquity is setup to auto-install tothe defined virtual disk based on settings provided to wubi.exe in windows).

The first time you select Ubuntu from the windows boot manager, you'll see

Code:

Completing the Ubuntu installationFor more installation options, press ESC now 5...4...3...2...1

When you press ESC you get 5 options...

Code:

Normal mode (the only option that uses 'quiet splash'; the rest all run ubiquity in debug mode)Safe graphic mode (uses 'xforcevesa')ACPI workarounds (uses 'acpi=off noapic nolapic')Verbose mode (no special override, just debug mode)Demo mode (I don't know what this is supposed to do but it doesn't work at all on my test computer)

You can select any one of the above, however safe graphic mode doesn't do much for the nvidiaproblem, so I prefer to just hit 'e' on the first entry (Normal) and add 'nomodeset' prior to 'quietsplash'. Then CTRL+X to boot.

The full entry looks something like this after adding nomodeset (local settings forlanguage/keyboard differ):

In the same way as the non-wubi install, the override is only in place for as long as the installationprocess. After the unattended install the computer reboots, and the next time you select Ubuntuyou get a normal looking grub menu (looks identical to normal installs at a high level) and youhave to again apply the override as described in post #1. After that, either install drivers, oroverride using permanently using /etc/default/grub.

Method 2:New with release 11.10, if you run wubi.exe standalone it will download a preinstalled image whilein Windows, and there is no 2nd stage install anymore. But on the first boot there is no way tooverride boot options on the fly. You have to do it in Windows by editing the file:\ubuntu\install\wubildr-disk.cfg

linux /ubuntu/install/boot/vmlinuz debian-installer/custom-installation=/ubuntu/install/custom-installation iso-scan/filename=/ubuntu/install/installation.iso automatic-ubiquity noprompt nomodesetquiet splash boot=casper ro debian-installer/locale=en_US.UTF-8 console-setup/layoutcode=us console-setup/variantcode= -- rootflags-syncioinitrd /ubuntu/install/boot/initrd.lz

Page 9: Desligar Ubuntu [RESOLVIDO]

It looks like this:

Add boot options after "quiet splash" and then save before rebooting into Ubuntu. I recommendusing WordPad (write.exe) as the file has linux style line endings.

In the same way as the non-wubi install, the override is only in place for the first boot. However,with Method 2 wubi installs, you can make the override permanent as soon as it's booted. Refer topost#1 for specific instructions on how to do this... i.e. install drivers, or override permanentlyusing /etc/default/grub.

NOTE: the grub menu is now hidden by default on Wubi installs. Especially with method #2, if it'snot working make sure you hold down the Shift key after selecting Ubuntu. This tells grub todisplay the menu. If you get that grub menu, then you need to follow the override instructionsfrom post #1.

Last edited by bcbc; May 12th, 2012 at 01:26 AM. Reason: Add comment on how to display grub menu

loopback loop0 /ubuntu/disks/root.diskset root=(loop0)search --set=diskroot -f -n /ubuntu/disks/root.diskprobe --set=diskuuid -u $diskrootlinux /vmlinuz root=UUID=$diskuuid loop=/ubuntu/disks/root.diskpreseed/file=/ubuntu/install/preseed.cfg wubi-diskimage ro quiet splash nomodesetinitrd /initrd.imgboot

Adv Reply Reply With Quote

November 8th, 2010

Join Date:Oct 2007

Beans:Hidden!

Re: How to set NOMODESET and other kernel boot options in grub2

Thanks a lot bcbc. Ill incorporate that info soon. First Im gonna see if I can mess up my windows VMby installing wubi so I can actually test it (and grab some screenies).

How to set kernel boot options to solve black screen (nomodeset), LCD backlight and other biosrelated issues

#9

Linux noob forever

P4man

Adv Reply Reply With Quote

November 10th, 2010

Join Date:Oct 2006

Location:Slovakia

Beans:

#10

Dipped in Ubuntu

mahy

Page 10: Desligar Ubuntu [RESOLVIDO]

 Ubuntu vB4.x

« Previous Thread | Next Thread »

Ubuntu Forums Archive Top

All times are GMT +1. The time now is 04:28 AM.

vBulletin ©2000 - 2014, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop

Project.

User contributions on this site are licensed under the Creative Commons Attribution Share Alike 4.0 International License. For details

and our forum data attribution, retention and privacy policy, see here

590

Distro:Xubuntu 11.10 Oneiric Ocelot

Re: How to set NOMODESET and other kernel boot options in grub2

Perfect idea! Although the "nomodeset" option didn't work at all (caused my ubuntu to run in low-graphics mode), the "acpi_osi=" on the other hand really solved all my ACPI problems, such asscreensaver working erratically, battery state not reflecting reality and brightness keys notworking (Toshiba Satellite A300)! You're a genius!

בראשית ברא אלהים את השמים ואת הארץ׃

Adv Reply Reply With Quote

Page 1 of 11 1 2 3 ... Last

Quic k Navigation Installation & Upgrades Top

Tags for this Thread

boot options, grub2, napic , nolapic , nomodesetView Tag Cloud

Digg

del.ic io.us

StumbleUpon

Google

Bookmarks

You may not post newthreadsYou may not post repliesYou may not postattac hmentsYou may not edit your posts

Posting Permissions

BB code is OnSmilies are On[IMG] c ode is On[VIDEO] c ode is OffHTML c ode is Off

Ubuntu ForumsCode of Conduct