Opened 9 years ago

Last modified 15 months ago

#5064 reopened bug

Laptop doesn't shutdown anymore with ACPI enabled

Reported by: jackburton Owned by: nobody
Priority: normal Milestone: R1
Component: Drivers/ACPI Version: R1/Development
Keywords: shutdown Cc: vegarwa@…
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Since some time (I can't say how much, since I haven't tested that so often), my laptop doesn't shutdown correctly using ACPI. It was shutting down correctly since hrev33781.

Attachments (2)

syslog_acpi_no_shutdown.txt (193.1 KB) - added by vegardw 9 years ago.
syslog_acpi_no_shutdown_2.txt (194.0 KB) - added by vegardw 9 years ago.
media_server, media_addon_server and debug_server killed before trying to shut down

Download all attachments as: .zip

Change History (35)

comment:1 Changed 9 years ago by axeld

Version: R1/alpha1R1/Development

FWIW my desktop machine has the same problem since a few weeks.

comment:2 Changed 9 years ago by michael.weirauch

hrev34452 gcc4h2 fresh install and it did shut down correctly last night. (ThinkPad T500)

comment:3 Changed 9 years ago by jackburton

Seems to be working again since a few revisions. I'd be for closing this. Axel ?

comment:4 Changed 9 years ago by axeld

I'll try again shortly.

comment:5 Changed 9 years ago by axeld

Problem persists in hrev34532.

comment:6 Changed 9 years ago by tqh

Cc: fredrik.holmqvist@… added

Afaict it works on my machines, so I'm not sure if I can do that much.

comment:7 Changed 9 years ago by kallisti5

FYI: My Thinkpad T43 with ACPI enabled shuts down properly as of hrev35012 x86gcc2hybrid

comment:8 Changed 9 years ago by tqh

I think this might be related to #5449, can anyone not being able to shutdown fo the following?

  • Check that ACPI is running, more -f /dev/acpi/namespace should work if ACPI is running
  • Provide a syslog from boot

comment:9 Changed 9 years ago by tqh

Should be:

  • Check that ACPI is running, more -f /dev/acpi/namespace should work if ACPI is running
  • Provide a syslog from boot


(I loathe the comment editor btw. Can't it be made sane.)

comment:10 in reply to:  9 Changed 9 years ago by bonefish

Replying to tqh:

(I loathe the comment editor btw. Can't it be made sane.)

Just add a space before your "*" or "-" bullets and your list items will be formatted correctly. Please have a look at http://dev.haiku-os.org/wiki/WikiFormatting.

comment:11 Changed 9 years ago by tqh

Yes, but I was thinking of linebreaks, which works everywhere, except here. Fobar according to me.

comment:12 Changed 9 years ago by tqh

Can someone test if it works with hrev35726 or later?

comment:13 in reply to:  12 Changed 9 years ago by vegardw

Cc: vegarwa@… added

Replying to tqh:

Can someone test if it works with hrev35726 or later?

My Acer Aspire One AOA110 doesn't shut down on hrev35727

comment:14 Changed 9 years ago by stippi

Hi vegarwa, did your Acer Aspire AOA110 ever shutdown with any Haiku version, though? And just to make sure, you did enable ACPI in the kernel settings file, correct? hrev35726 does not enable ACPI by default, it's just suppose to fix a bug, in case you do have it already enabled manually.

comment:15 Changed 9 years ago by tqh

He has it enabled as he helped with another ACPI bug. wegardw, could you provide the syslog after you have tried to run shutdown. Just reboot after that and grab it.

comment:16 Changed 9 years ago by vegardw

The attached syslog is when booting (cold boot), then trying to shut after the system has finished booting, without doing anything else first.

comment:17 Changed 9 years ago by tqh

That one only seems to be one boot. I want one after you've tried shutdown.

(Or is the syslog behaviour changed so it's not written to disk or overwritten on boot?)

comment:18 in reply to:  17 Changed 9 years ago by vegardw

Replying to tqh:

That one only seems to be one boot. I want one after you've tried shutdown.

(Or is the syslog behaviour changed so it's not written to disk or overwritten on boot?)

Yeah, thats just from the one boot and attempted shutdown. I booted from another haiku partition to copy out the syslog. Will do it again so you also get the subsequent reboot.

Changed 9 years ago by vegardw

Attachment: syslog_acpi_no_shutdown.txt added

comment:19 Changed 9 years ago by vegardw

attachment updated, now also with the next boot

comment:20 Changed 9 years ago by tqh

To me it looks like media-server or debug-server halts shutdown.

KERN: vm_page_fault: vm_soft_fault returned error 'Bad address' on fault at 0x6d3a6566, ip 0x4a7490, write 0, user 1, thread 0x92
KERN: vm_page_fault: thread "media_addon_server" (146) in team "media_addon_server" (146) tried to read address 0x6d3a6566, ip 0x4a7490 ("libmedia.so_seg0ro" +0x59490)
KERN: debug_server: Thread 146 entered the debugger: Segment violation

Could you try killing media-server before shutting down?

Changed 9 years ago by vegardw

media_server, media_addon_server and debug_server killed before trying to shut down

comment:21 Changed 9 years ago by axeld

For me, the problem is fixed since hrev36511. Please retest.

comment:22 Changed 9 years ago by jackburton

I will.

comment:23 Changed 9 years ago by jackburton

Resolution: fixed
Status: newclosed

Fixed since hrev36511.

comment:24 Changed 9 years ago by axeld

I'm afraid my Desktop has gotten resistant to the change; after the update it shut down 4 times in a row (which it didn't ever do before), but the last two times it didn't properly shut down.

I'll do another update soon, maybe that brings things back in order. If not, I'll just reopen that bug again.

comment:25 Changed 9 years ago by tqh

I guess we need more logging. I wonder if dpc still does its job til the very end..

comment:26 Changed 9 years ago by tqh

I'm trying to look into this in #5880.

If someone can reproduce pls: Try going in to kernel debugger (ctrl + alt + sys req + d) and see what the end lines of the command 'syslog' returns?

Also what 'threads' and 'sc <threadnr>' shows for any interesting threads can also help.

comment:27 in reply to:  26 Changed 9 years ago by axeld

Resolution: fixed
Status: closedreopened

Replying to tqh:

Try going in to kernel debugger (ctrl + alt + sys req + d) and see what the end lines of the command 'syslog' returns?

Nothing interesting, I'm afraid.

Also what 'threads' and 'sc <threadnr>' shows for any interesting threads can also help.

What would be an interesting thread? I have 3 idle threads running, as well as the shutdown worker (I guess that one would have been interesting - will see next time).

In any case, the problem goes away completely if I disable SMP.

comment:28 Changed 9 years ago by tqh

Then it's probably true what comments in FreeBSD say, that shutdown should only be called on the boot cpu. Also it says that interrupts should be disabled in ACPI-headers, but with interrupts disabled it doesn't work at all afaict.

comment:29 Changed 9 years ago by axeld

That could explain the situation, indeed. Should be pretty easy to do, too (just disable the other CPUs, and then yield once).

comment:30 Changed 9 years ago by axeld

BTW should I attach a stack trace of the shutdown worker? It's busy reading some data from PCI over ACPI.

comment:31 Changed 9 years ago by tqh

Please do, I need as much info as possible.

comment:32 Changed 9 years ago by tqh

#5880 suggests this might be a wifi-issue. Please try removing wifi and see if that allows proper shutdown.

comment:33 Changed 15 months ago by tqh

Cc: fredrik.holmqvist@… removed
Keywords: shutdown added
Note: See TracTickets for help on using tickets.