long sleep in boot process

Bug #765230 reported by laulau on 2011-04-18
98
This bug affects 24 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: linux-image-2.6.38-8-generic

reproducable with a fresh install of ubuntu 11.04 beta2 amd64. same thing after update.
just after selecting ubuntu in grub, screen remains black during about 2 minutes. HDD isn't working, but after 2 minutes boot process really start and finish properly.
it is easilly noticeable in dmesg !

hardware :
- motherboard : M4A89GTD-PRO/USB3
- cpu : pheno II BE 955
- RAM : 8 GB
- GPU : nvidia GTX 460
of course, this computer worked perfectly with ubuntu 10.10.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: linux-image (not installed)
Regression: Yes
Reproducible: Yes
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
NonfreeKernelModules: nvidia
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: laulau 1324 F.... pulseaudio
 /dev/snd/controlC0: laulau 1324 F.... pulseaudio
CRDA: Error: [Errno 2] Aucun fichier ou dossier de ce type
Card0.Amixer.info:
 Card hw:0 'SB'/'HDA ATI SB at 0xfbff4000 irq 16'
   Mixer name : 'Realtek ALC892'
   Components : 'HDA:10ec0892,104383c0,00100302'
   Controls : 32
   Simple ctrls : 18
Card1.Amixer.info:
 Card hw:1 'U0x46d0x8b4'/'USB Device 0x46d:0x8b4 at usb-0000:00:12.0-1, full speed'
   Mixer name : 'USB Mixer'
   Components : 'USB046d:08b4'
   Controls : 2
   Simple ctrls : 1
Card1.Amixer.values:
 Simple mixer control 'Mic',0
   Capabilities: cvolume cvolume-joined cswitch cswitch-joined penum
   Capture channels: Mono
   Limits: Capture 0 - 3
   Mono: Capture 0 [0%] [30.00dB] [on]
Card2.Amixer.info:
 Card hw:2 'NVidia'/'HDA NVidia at 0xfe57c000 irq 19'
   Mixer name : 'Nvidia GPU 12 HDMI/DP'
   Components : 'HDA:10de0012,10de0101,00100100'
   Controls : 16
   Simple ctrls : 4
Date: Mon Apr 18 23:35:27 2011
HibernationDevice: RESUME=UUID=f2b3cb6e-8e16-439c-b739-5e6c5dece110
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta amd64+mac (20110413)
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.
MachineType: System manufacturer System Product Name
ProcEnviron:
 LANGUAGE=fr_FR:en
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic root=UUID=286f5e8a-1a05-4fc9-b08c-31480a2b4a86 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-2.6.38-8-generic N/A
 linux-backports-modules-2.6.38-8-generic N/A
 linux-firmware 1.50
RfKill:

SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 05/04/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 1456
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: M4A89GTD-PRO/USB3
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr1456:bd05/04/2010:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnM4A89GTD-PRO/USB3:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

laulau (olaulau) wrote :
tags: added: regression-release
removed: regression-update
chrmhoffmann (chrmhoffmann) wrote :

Hi,

I have exactly the same issue with the same motherboard. I posted something here to Asus: http://vip.asus.com/forum/view.aspx?id=20110417224456867&board_id=1&model=M4A89GTD+PRO%2fUSB3&page=1&SLanguage=en-us.

It seems to work if I remove
  set gfxpayload=$linux_gfx_mode
and remove
  quiet splash vt.handoff=7
from the kernel options.

Rgds,
Chris

chrmhoffmann (chrmhoffmann) wrote :

It seems to work just by removing

set gfxpayload=$linux_gfx_mode

from the grub startup sequence.

Rgds,
Chris

laulau (olaulau) wrote :

I just tried to remove both from the /etc/grub.d/10_linux file (tell me if it's not that), then run update-grub and reboot.
Same problem, the computer hangs for about 2 minutes, then finish the bott process.
Only change : screen isn't pink but really black (with the blinking cursor at top-left of the screen).

chrmhoffmann (chrmhoffmann) wrote :

Indeed, it doesn't seem to always fix the problem. I get it booting like this every now and then. It seems a timing issue. Should we report this to kernel mailing list?

chrmhoffmann (chrmhoffmann) wrote :

I bisected kernel and found that offensive revision is:

08ec0c58fb8a05d3191d5cb6f5d6f81adb419798
"x86: Improve TSC calibration using a delayed workqueue"

I posted to lkml.

Rgds,
Chris

laulau (olaulau) wrote :

if you find a decent way to bypass this problem, before Ubuntu fix this, bofore ubuntu publish a fix ...
and if I can help you making (or reproducing) some test with this motherboard, or if I can help in a way ...
URL of the threat in lklm ?

thanks.

chrmhoffmann (chrmhoffmann) wrote :

Hi,

I think you can work around with acpi=off as a kernel param, but then cpu frequency scaling et al. are gone as well.

The thread on lkml: https://lkml.org/lkml/2011/5/2/239

Rgds,
Chris

Brad Figg (brad-figg) on 2011-05-03
Changed in linux (Ubuntu):
status: New → Confirmed
Jean-Louis Dupond (dupondje) wrote :

I have the same issue with the same motherboard

I have the same problem with my ASUS setup.
mainboard: M3A32-MVP DELUXE
cpu: AMD Phenom(tm) II X4 940 Processor
ram: 8GB
gpu: GeForce 8800 GTS 512

Another very strange observation: When I disable "Legacy USB Support" in BIOS the "sleep" does not happen!

BIOS Config:
Advanced -> USB Configuration -> Legacy USB Support -> Disabled

s56vpe (peter-podbevsek) wrote :

Tnx Eduard. Works for me too on Asus M4A87TD/USB3, Phenom II X4 and Asus EAH5670.

Stas (stanislavelensky) wrote :

Disabling legacy USB support worked for me too on ASUS M4A88T-M/USB3. Thanks

Before everybody stumbling upon this bug disables "legacy USB support" one WARNING: This feature is required to boot from USB storage (sticks, cdrom, etc.), and (AFAIK) to be able to change BIOS settings using an USB keyboard.

The main reason for posting the information was to provide another piece of information which might help identifying the root cause for the bug. If disabling "legacy USB support" does not harm you, it is nevertheless a viable solution.

GreDi (gdeneka) wrote :

This workaround works for me too with Asus Crosshair IV Formula (AMD 890FX/SB850) + AMD 1090t.
But there is another side of medal. This workaround are disabling USB Keyboard in Grub menu.

laulau (olaulau) wrote :

any idea of when it could be integrated in a linux kernel version, and then in ubuntu ?
I don't know how patch validation / integration works.

laulau (olaulau) wrote :

(acpi=off works fine for me too)

GreDi (gdeneka) wrote :

I just checked that fix created by Thomas Gleixner. It works.

Test method:
* apt-get source linux-image-2.6.38-8-generic
* cp /boot/config-2.6.38-8-generic linux-2.6.38/.config
* edit linux-2.6.38/.config: (disable CONFIG_DEBUG_KERNEL, CONFIG_DEBUG_INFO)
* cd linux-2.6.38
* make -j7, make modules_install, make install (etc.)
* reboot

booting with new kernel:

[ 1.518883] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
[ 1.519062] NET: Registered protocol family 1
[ 146.880175] pci 0000:04:00.0: Boot video device
[ 146.880191] PCI: CLS 64 bytes, default 64

Bug still exists (that's good, I'm able to reproduce this bug)

Fixing by patch:
* cd linux-2.6.38
* wget -O tick-broadcast.patch "http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=patch;h=07f4beb0b5bbfaf36a64aa00d59e670ec578a95a"
* patch -p1 < tick-broadcast.patch
* make clean, make -j7, make modules_install, make install (again, compile and install new kernel)
* dpkg-reconfigure nvidia-current (make install, had some problems with nvidia drivers, so I needed, to do it by dpkg-reconfigure)
* reboot

[ 1.453138] UDP hash table entries: 2048 (order: 4, 65536 bytes)
[ 1.453157] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
[ 1.453234] NET: Registered protocol family 1
[ 2.310177] pci 0000:04:00.0: Boot video device

Thx chrmhoffmann.
So again. Fix created by Thomas Gleixner <email address hidden>, works for me (with everything = on).

Confirmation from my side: 07f4beb0b5bbfaf36a64aa00d59e670ec578a95a fixes the problem also on my M3A32-MVP. So it is very likely that the fix will be included in the next LTS.

WRT natty: The patch is apparently small enough for a SRU.

Thanks.

laulau (olaulau) wrote :

am I tired or dit it have been integrated in 2.6.38-10 ?
I removed acpi=off (and ran a update-grub), made ubuntu upgrades, and the computer boot normally !

chrmhoffmann (chrmhoffmann) wrote :

Yes, it is fixed in latest 2.6.38-10 Ubuntu kernel.
Chris

Download full text (4.1 KiB)

thanks guys ! think someone could change the status of this bug.

On Wed, Jun 15, 2011 at 08:59, chrmhoffmann <email address hidden> wrote:

> Yes, it is fixed in latest 2.6.38-10 Ubuntu kernel.
> Chris
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/765230
>
> Title:
> long sleep in boot process
>
> Status in “linux” package in Ubuntu:
> Confirmed
>
> Bug description:
> Binary package hint: linux-image-2.6.38-8-generic
>
> reproducable with a fresh install of ubuntu 11.04 beta2 amd64. same thing
> after update.
> just after selecting ubuntu in grub, screen remains black during about 2
> minutes. HDD isn't working, but after 2 minutes boot process really start
> and finish properly.
> it is easilly noticeable in dmesg !
>
> hardware :
> - motherboard : M4A89GTD-PRO/USB3
> - cpu : pheno II BE 955
> - RAM : 8 GB
> - GPU : nvidia GTX 460
> of course, this computer worked perfectly with ubuntu 10.10.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 11.04
> Package: linux-image (not installed)
> Regression: Yes
> Reproducible: Yes
> ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
> Uname: Linux 2.6.38-8-generic x86_64
> NonfreeKernelModules: nvidia
> AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
> Architecture: amd64
> AudioDevicesInUse:
> USER PID ACCESS COMMAND
> /dev/snd/controlC1: laulau 1324 F.... pulseaudio
> /dev/snd/controlC0: laulau 1324 F.... pulseaudio
> CRDA: Error: [Errno 2] Aucun fichier ou dossier de ce type
> Card0.Amixer.info:
> Card hw:0 'SB'/'HDA ATI SB at 0xfbff4000 irq 16'
> Mixer name : 'Realtek ALC892'
> Components : 'HDA:10ec0892,104383c0,00100302'
> Controls : 32
> Simple ctrls : 18
> Card1.Amixer.info:
> Card hw:1 'U0x46d0x8b4'/'USB Device 0x46d:0x8b4 at usb-0000:00:12.0-1,
> full speed'
> Mixer name : 'USB Mixer'
> Components : 'USB046d:08b4'
> Controls : 2
> Simple ctrls : 1
> Card1.Amixer.values:
> Simple mixer control 'Mic',0
> Capabilities: cvolume cvolume-joined cswitch cswitch-joined penum
> Capture channels: Mono
> Limits: Capture 0 - 3
> Mono: Capture 0 [0%] [30.00dB] [on]
> Card2.Amixer.info:
> Card hw:2 'NVidia'/'HDA NVidia at 0xfe57c000 irq 19'
> Mixer name : 'Nvidia GPU 12 HDMI/DP'
> Components : 'HDA:10de0012,10de0101,00100100'
> Controls : 16
> Simple ctrls : 4
> Date: Mon Apr 18 23:35:27 2011
> HibernationDevice: RESUME=UUID=f2b3cb6e-8e16-439c-b739-5e6c5dece110
> InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta amd64+mac
> (20110413)
> IwConfig:
> lo no wireless extensions.
>
> eth0 no wireless extensions.
> MachineType: System manufacturer System Product Name
> ProcEnviron:
> LANGUAGE=fr_FR:en
> LANG=fr_FR.UTF-8
> SHELL=/bin/bash
> ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic
> root=UUID=286f5e8a-1a05-4fc9-b08c-31480a2b4a86 ro quiet splash vt.handoff=7
> RelatedPackageVersions:
> linux-restricted-modules-2.6.38-8-generic N/A
> linux-backports-modules-2.6.38-8-generic N/A
> linux-firmware ...

Read more...

Changed in linux (Ubuntu):
status: Confirmed → Fix Released
Ian! D. Allen (idallen) wrote :

2.6.38-10 improved things from 145 seconds down to 9 seconds, yes:

Jun 16 09:40:23 kernel: [ 1.044704] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes)
Jun 16 09:40:23 kernel: [ 1.044798] NET: Registered protocol family 1
Jun 16 09:40:23 kernel: [ 10.470269] pci 0000:05:00.0: Boot video device
Jun 16 09:40:23 kernel: [ 10.470286] PCI: CLS 64 bytes, default 64

Still - 9 seconds delay? What takes 9 seconds in a world of quad-core 64-bit CPUs?

ASUSTeK M4A79T Deluxe
AMD Phenom(tm) II X4 965
American Megatrends Inc. BIOS Revision: 8.15 Version: 1303 Release Date: 06/10/2009
05:00.0 VGA compatible controller: ATI Technologies Inc FireMV 2250
05:00.1 Display controller: ATI Technologies Inc FireMV 2250 (Secondary)
Ubuntu 11.04
Linux linux 2.6.38-10-generic #44-Ubuntu SMP Thu Jun 2 21:32:22 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
sda: OCZ-VERTEX2 120GB

laulau (olaulau) wrote :

according to my dmesg, whole boot now takes about 20 secondes.
the only temporal hole I can see is this :

[ 5.839838] EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: (null)
[ 13.672032] <30>udev[399]: starting version 167

do you think the problem is still there ?

This was fixed:

Signed-off-by: John Stultz <johnstul [at] us>

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 6519cf6..0e17c10 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -685,8 +685,8 @@ int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq)
/* Add clocksource to the clcoksource list */
mutex_lock(&clocksource_mutex);
clocksource_enqueue(cs);
- clocksource_select();
clocksource_enqueue_watchdog(cs);
+ clocksource_select();
mutex_unlock(&clocksource_mutex);
return 0;
}
@@ -706,8 +706,8 @@ int clocksource_register(struct clocksource *cs)

mutex_lock(&clocksource_mutex);
clocksource_enqueue(cs);
- clocksource_select();
clocksource_enqueue_watchdog(cs);
+ clocksource_select();
mutex_unlock(&clocksource_mutex);
return 0;
}

Now we just need a new 2.6.38-10.46 kernel

oh, my "long sleep" happens at a different time.

Jul 4 16:19:57 lakshmi kernel: [ 1.474519] pci 0000:00:01.0: MSI quirk detected; subordinate MSI disabled
Jul 4 16:19:57 lakshmi kernel: [ 146.850202] pci 0000:01:05.0: Boot video device

No delay now:
Jul 6 10:24:08 lakshmi kernel: [ 1.494740] pci 0000:00:01.0: MSI quirk detected; subordinate MSI disabled
Jul 6 10:24:08 lakshmi kernel: [ 2.350204] pci 0000:01:05.0: Boot video device

$ uname -a
Linux lakshmi 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:07:17 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -sd
Ubuntu 11.04

Kernel 2.6.38-10.46 via copy of S. Conklin PPA package. Copy is here:
https://launchpad.net/~nutznboltz/+archive/natty-linux-pre-proposed

To post a comment you must log in.