# 常用命令和优化

### 正确开启 HIDPI

注意必须使用 1424x802 的分辨率，才能在休眠唤醒的时候不遇到四分之一屏和花屏。

使用以下代码开启：

```bash
bash -c "$(curl -fsSL https://gitee.com/kirainmoe/static-files/raw/master/hidpi.sh)"
```

如要恢复，删除 /System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-9e5 即可。如果你是 Catalina 以上系统，你可能需要进入 Recovery 模式下挂载系统分区操作。

```bash
cd /Volumes/"Your System Disk Part"/System/Library/Displays/Contents/Resources/Overrides
rm -rf ./DisplayVendorID-9e5
cp -r ./backup/* ./
```

### macOS 和 Windows 时间同步

首先确保你在 macOS 下设置了正确的时区。在 Windows 下以管理员权限在 cmd 中执行以下命令：

```bash
Reg add HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /t REG_DWORD /d 1
```

### 重建系统缓存

```bash
sudo kextcache -i /
```

### 解决 10.14 以上系统字体渲染模糊

在 macOS 的终端中执行以下命令：

```bash
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
```

### 解决睡眠后摄像头失效

```bash
sudo killall VDCAssistant
```


---

# 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://hackintosh.kirainmoe.com/an-zhuang-hou/chang-yong-ming-ling-he-you-hua.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.
