Bug 12360

Summary: with 2.6.28 undock/dock work bad or freeze computer - Dell D430
Product: ACPI Reporter: Daniel Smolik (marvin)
Component: Config-HotplugAssignee: Shaohua (shaohua.li)
Status: CLOSED CODE_FIX    
Severity: normal CC: acpi-bugzilla, holger
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.28 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: dmesg output
patch which may be solve my problem
dmesg output when dock/undock is OK
Move bailing out down the function
Patch containing possible fix and some debug output
dmesg when notebook is docked
dmesg when notebook is undocked
Don't eval _STA on every sysfs read

Description Daniel Smolik 2009-01-04 12:29:58 UTC
Latest working kernel version:2.6.26.2
Earliest failing kernel version:2.6.28
Distribution:Debian SID
Hardware Environment: Dell D43
Software Environment: only kernel
Problem Description: after upgrade kernel and undocking kernel prints info about undock but after while docking  again.See atached dmesg. After this I lost keyboard and mouse. Sometime I get it back.

Steps to reproduce:
compile 2.6.28 and undock
Comment 1 Daniel Smolik 2009-01-04 12:30:51 UTC
Created attachment 19649 [details]
dmesg output
Comment 2 Daniel Smolik 2009-01-04 12:38:23 UTC
Sorry Dell is D430
Comment 3 Zhang Rui 2009-01-04 18:46:12 UTC
> After this I lost keyboard and mouse
is this always reproducible during the docking?
can you login the computer via network?
what do you see in the screen?
please attach the dmesg output when the laptop is not frozen after docking.
Comment 4 Daniel Smolik 2009-01-05 12:15:21 UTC
Created attachment 19664 [details]
patch which may be solve my problem
Comment 5 Daniel Smolik 2009-01-05 12:16:10 UTC
Created attachment 19665 [details]
dmesg output when dock/undock is OK
Comment 6 Daniel Smolik 2009-01-05 12:16:39 UTC
Not always, sometime I must dock/undock two times to get to this situation.
I don't know I am on mountains and have't another computer,but next week I can test it.
Screen is no corrupted I see normal KDE desktop.

I try diff dock.c from 2.6.26 to 2.6.28 and may be I found workaround.
With this small patch system work well. Dmesg output attached.
Comment 7 Holger Macht 2009-01-06 03:12:47 UTC
Created attachment 19672 [details]
Move bailing out down the function

Could you please also test this patch? It's quite the same except that it cares about the uevent being sent.
Comment 8 Daniel Smolik 2009-01-06 13:05:18 UTC
With your patch docking/undocking  stop working:-( After pressing undock button it starts flashing and in dmesg nothing is displayed.
But if undocking work button must light off not flash. 
Comment 9 Holger Macht 2009-01-10 08:22:29 UTC
I got a report that the Dell D620 has the same problem. Fortunately I've got such a system in my office, so I can do some debugging on monday.
Comment 10 Holger Macht 2009-01-14 02:48:23 UTC
Do you have full-fledged userspace running when trying to undock?

Anyway, I'm going to attach a patch for you to test. It contains one possible fix and some additional debug output. Please test and report back with attaching your dmesg. Thanks.
Comment 11 Holger Macht 2009-01-14 02:49:40 UTC
Created attachment 19785 [details]
Patch containing possible fix and some debug output
Comment 12 Daniel Smolik 2009-01-15 23:50:38 UTC
Yes, it looks like that patch solve problem. A attach dmesg outputs. Please look to it.
Comment 13 Daniel Smolik 2009-01-15 23:52:02 UTC
Created attachment 19824 [details]
dmesg when notebook is docked

dmesg when notebook is docked
Comment 14 Daniel Smolik 2009-01-15 23:53:23 UTC
Created attachment 19825 [details]
dmesg when notebook is undocked

dmesg when notebook is undocked
Comment 15 Holger Macht 2009-01-16 01:10:49 UTC
Created attachment 19826 [details]
Don't eval _STA on every sysfs read

That's the patch without the debugging output I will send upstream if it proves ok. Please just answer the question if you have a full userspace operating system, even with desktop, running while testing this. Especially, if the hal daemon was active. Thanks.
Comment 16 Daniel Smolik 2009-01-16 11:29:09 UTC
Yes I run Debian Sid with KDE  and HAL running. I it tested with console too.
Comment 17 Holger Macht 2009-01-20 03:20:56 UTC
Shaohua, I sent the patch to linux-acpi:
  [PATCH] ACPI: dock: Don't eval _STA on every show_docked sysfs read

Please close the bug. Thanks.
Comment 18 Len Brown 2009-02-06 19:04:05 UTC
note that bugzilla.kernel.org sightings are RESOLVED
when a patch is available, and are CLOSED only when
the patch ships upstream.
Comment 19 Len Brown 2009-02-06 19:11:46 UTC
patch in comment #15 applied to acpi tree
Comment 20 Len Brown 2009-02-21 09:25:38 UTC
fc5a9f8841ee87d93376ada5d73117d4d6a373ea
(ACPI: dock: Don't eval _STA on every show_docked sysfs read)
shipped in 2.6.29-rc4

closed.