Opened 3 years ago
Last modified 6 months ago
#17130 new bug
The computer hangs, when shutting down system
Reported by: | huh20 | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | - General | Version: | R1/beta3 |
Keywords: | Shutdown | Cc: | |
Blocked By: | Blocking: | ||
Platform: | x86-64 |
Description (last modified by )
Hi, I have such a problem. Almost every time when I shut down the system, Haiku hangs up with the Shutdown… window, the mouse doesn’t respond.
The key for the Kernel debug console alt + print screen + d does not work. The disk light is off, the keyboard is not responding, and the lights on the keyboard are off. Sometimes the computer shuts down, but it rarely does. The Restart System option works normally. Haiku is the R1/beta3 hrev55181 + 52 x86_64, but it was same also with previous versions.
It works with Windows, which I have on the second disk, shutdown PC works every time.
The hardware is:
Core 2 Quad Q6600, 4GB RAM DDR2, Nvidia Geforce 6200 128MB, motherboard MSI P35 Neo (https://us.msi.com/Motherboard/P35_Neo/Specification), HDD WDC WD2500AAKS-00B3A0 250GB 7200 RPM SATA.
If more information is needed, I will supply it.
Attachments (6)
Change History (19)
by , 3 years ago
Attachment: | shutdown.jpg added |
---|
comment:2 by , 3 years ago
Description: | modified (diff) |
---|
by , 3 years ago
Attachment: | syslogreboot added |
---|
syslog after system restart (restart works well compared to shutdown) I don't know if it's important.
comment:3 by , 3 years ago
Description: | modified (diff) |
---|
follow-up: 12 comment:4 by , 3 years ago
As I understand it you are on x86_64.
For rebooting we try very old way of rebooting as a last try: https://github.com/haiku/haiku/blob/8f16317a5b6db5c672f331814273e5857555020f/src/system/kernel/arch/x86/arch_cpu.cpp#L1662
Another interesting thing is that for some reason we kill teams when rebooting, which we don't do for shutdown. The code is so old there is no commit message why it is done that way. To me it seems it should be done in both or neither case. Killing the teams first may also be what makes reboot work: https://github.com/haiku/haiku/blob/8f16317a5b6db5c672f331814273e5857555020f/src/system/kernel/shutdown.cpp#L13
comment:5 by , 3 years ago
If you could provide a patch for me to test (based upon the last comments) I would try it on my own system with the same issue.
comment:6 by , 3 years ago
Id just remove https://github.com/haiku/haiku/blob/8f16317a5b6db5c672f331814273e5857555020f/src/system/kernel/shutdown.cpp#L23 and its corresponding end bracket, so that teams are killed on shutdown as well.
comment:7 by , 3 years ago
I removed the lines and built an image, which I installed on the PC (hrev55269 dirty). It still hangs as before.
comment:8 by , 3 years ago
Ok, and this is still there?:
while (get_next_team_info(&cookie, &info) == B_OK) { if (info.team == B_SYSTEM_TEAM) continue; kill_team(info.team); }
Can you add a return B_NOT_SUPPORTED here: https://github.com/haiku/haiku/blob/8f16317a5b6db5c672f331814273e5857555020f/src/system/kernel/arch/x86/arch_cpu.cpp#L1666
If reboot stops working after this we know that the ACPI shutdown call returns an error and reboot used the fallback shutdown method.
comment:9 by , 3 years ago
Correct. See attached screenshot. So as not to mix up tickets, lets move any further discussion to my existing ticket for this issue.
by , 3 years ago
Attachment: | screenshot1.png added |
---|
comment:11 by , 3 years ago
Have you tried several times, so it is not just a fluke? Then it looks like it is not ACPI related but app or driver hang.
comment:12 by , 7 months ago
Replying to tqh:
Maybe it is related to this commit ?
commit e18d4a2d065fbf99191879fcac134475e991fbed Author: Stephan Aßmus <superstippi@…> Date: Sun Apr 5 19:04:25 2009 +0000
Patch by Olivier Coursiere: When rebooting, shutdown all the system teams, most importantly input_server, which then closes the drivers for input devices. This in turn will do some cleanup. The touch pad driver will then be reset to act as normal PS/2 mouse, so that OS like BeOS can use it again.
Another interesting thing is that for some reason we kill teams when rebooting, which we don't do for shutdown. The code is so old there is no commit message why it is done that way. To me it seems it should be done in both or neither case. Killing the teams first may also be what makes reboot work: https://github.com/haiku/haiku/blob/8f16317a5b6db5c672f331814273e5857555020f/src/system/kernel/shutdown.cpp#L13
comment:13 by , 6 months ago
I think we don't kill all teams if not rebooting in order so that the "It's now safe to turn off your computer" message displays if shutdown fails.
Picture