# Fix Shut down

## **Lỗi Shut down Restart**

> Đối với 1 số máy khi Shut down thì tự động Restart lại bắt buộc phải Shut down bằng phím cứng thì có thể thử cách sau đây:

B1: Down file từ nguồn [sau đây](https://github.com/dortania/OpenCore-Post-Install/blob/master/extra-files/FixShutdown-USB-SSDT.dsl).

B2: Chuyển file từ dạng file .`dsl` sang dạng file `.aml` theo hướng dẫn[ tại đây](/acpi-advance/patch-dsdt-phan-1.md)

B3: Bỏ file vào mục `EFI ⇒ ACPI` sau đó snaps lại&#x20;

> Đối với Clover các bạn bỏ file ssdt vào `EFI ==> ACPI ==> Patched`

B4: Các bạn Add vào config các Patch theo links [sau](https://github.com/dortania/OpenCore-Post-Install/blob/master/extra-files/FixShutdown-Patch.plist)

B5: Save lại.&#x20;

B6: Reboot và tận hưởng thôi.&#x20;

> Source tham khảo [Fixing Shutdown/Restart | OpenCore Post-Install (dortania.github.io)](https://dortania.github.io/OpenCore-Post-Install/usb/misc/shutdown.html)

> Lưu ý 2: Đối với các bạn đã làm theo những vẫn bị lỗi thì các bạn cóthể thử Apply Patch [sau ](https://github.com/RehabMan/Laptop-DSDT-Patch/blob/master/system/system_Shutdown_restart.txt)vào DSDT sau đó trích ra SSDT để sử dụng  xem chi tiết cách trích [tại đây](/acpi-advance/patch-dsdt-phan-3.md) hãy chắc rằng cách này hoạt động trên DSDT và lưu ý nếu như sử dụng DSDT bạn cần Rename EC xem chi tiết [tại đây](/acpi-advance/patch-dsdt-phan-2.md#rename-ec) để biết cách Rename EC

## Lỗi Shut down do NVRAM

B1: Mở Terminal và gõ các lệnh sau:&#x20;

```
sudo -s

nvram -c

nvram myvar=test

exit
```

B2: Restart máy và mở Terminal gõ lệnh sau:

`nvram -p | grep -i myvar`

Nếu không có giá trị trả về thì bạn hãy bỏ [SSDT-PMC](https://github.com/dortania/Getting-Started-With-ACPI/blob/master/extra-files/compiled/SSDT-PMC.aml) vào

> Do NVRAM không hoạt động

Nếu có giá trị trả về `myvar` test thì các bạn chuyển sang phần tiếp theo&#x20;

> Đối với OC nhớ Snapshot

> **Source tham khảo ​​**[**Emulated NVRAM | OpenCore Post-Install (dortania.github.io)**](https://dortania.github.io/OpenCore-Post-Install/misc/nvram.html#enabling-emulated-nvram-with-a-nvram-plist).

## Fix Shut down do DSDT bị lỗi

B1: Các bạn dump DSDT như hướng dẫn [tại đây](/acpi-advance/patch-dsdt-phan-1.md)

B2: Các bạn biên dịch DSDT thành file `.dsl` như hướng dẫn [tại đây](/acpi-advance/patch-dsdt-phan-1.md)

B3: Apply các patch sau [shutdown v1](https://github.com/RehabMan/Laptop-DSDT-Patch/blob/master/system/system_Shutdown.txt) [shutdown v2](https://github.com/RehabMan/Laptop-DSDT-Patch/blob/master/system/system_Shutdown2.txt)&#x20;

> Không apply cả 2 patch cùng lúc thử apply Shut down v1 trước nếu không được thì xóa patch Shut down v1 rồi mới apply Shut down v2 apply patch theo hướng dẫn [tại đây](/acpi-advance/patch-dsdt-phan-2.md)

B4: Trích `SSDT-Shutdown` từ DSDT theo hướng dẫn [tại đây](/acpi-advance/patch-dsdt-phan-3.md)&#x20;

> Hãy chắc rằng các patch đã apply vào DSDT hoạt động trước khi trích ra SSDT

B5: Bỏ SSDT vừa trích vào `EFI ⇒ ACPI` và Snapshot lại.

B6: Save và Restart.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://advance.heavietnam.com/acpi-advance/fix-shut-down.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
