> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 运行 DRM modetest

DRM modetest 可确保 DSI 和 DPU 路径正常工作。要验证显示驱动拓扑，请运行 DRM modetest。

<Note>
  您必须启用 SSH 才能访问主机设备。有关说明，请参阅[使用 SSH 登录](https://dragonwingdocs.qualcomm.com/Key-Documents/Flash-Guide/how-to-sign-in-with-ssh)。
</Note>

1. 要终止 Weston 客户端应用程序，请在设备 shell 中运行以下命令：

   > ```text theme={null}
   > mount -o remount,rw /
   > ```

   > ```text theme={null}
   > ps -A | grep weston
   > ```

   **示例输出：**

   ```text theme={null}
   824 ?        00:00:12 weston
   1090 ?        00:00:00 weston-keyboard
   1092 ?        00:00:01 weston-desktop-
   ```

   使用示例 Weston 进程列表中的 Weston 进程 ID 来终止 Weston 进程。

2. 要终止所有 Weston 进程，请运行以下命令：

   > ```text theme={null}
   > systemctl stop weston.service
   > ```

3. 要更改 modetest 应用程序的权限，请运行以下命令：

   > ```text theme={null}
   > chmod 0777 /usr/bin/modetest
   > ```

4. 要查看连接器 ID 和模式，请运行以下命令：

   > ```text theme={null}
   > /usr/bin/modetest -M msm > /opt/drm_mode.txt
   > ```

5. 要验证 DRM 模式和连接器信息，请将 `/opt/drm_mode.txt` 文件拉取到本地主机。使用安全复制协议（SCP）将 `drm_mode.txt` 文件从设备拉取到主机。例如：

   > ```text theme={null}
   > scp -r root@<IP of the device>:/opt/drm_mode.txt <directory path of the host machine>
   > ```

   <Note>当提示输入密码时，输入 `oelinux123`。</Note>

   下图所示的输出来自 `/opt/drm_mode.txt` 文件。

   <div className="flex flex-col items-center gap-2">
     <img src="https://mintcdn.com/qualcomm-prod/mGpYCfBsZaJSFIEo/Technologies/Display/media/qli-display/Command_prompt_output.png?fit=max&auto=format&n=mGpYCfBsZaJSFIEo&q=85&s=dd932c273d4a9a590a8d27c361ba3f48" alt="图：命令提示符输出" width="571" height="90" data-path="Technologies/Display/media/qli-display/Command_prompt_output.png" />
   </div>

6. 要获取连接器 ID 和模式名称，请使用 `/opt/drm_mode.txt` 文件中的相关值：

   > ```text theme={null}
   > modetest -M msm -s <Connector id>:<mode name>
   > ```

7. 要启动 modetest 应用程序，请使用从 `/opt/drm_mode.txt` 文件中获取的连接器 ID 和模式名称，运行以下示例命令。例如：

   > ```text theme={null}
   > /usr/bin/modetest -M msm -s 32:1920x1080-60
   > ```

   <Note>启动 DRM 测试应用程序并忽略警告日志：`Failed to set gamma: Function not implemented`。</Note>

   <div className="flex flex-col items-center gap-2">
     <img src="https://mintcdn.com/qualcomm-prod/mGpYCfBsZaJSFIEo/Technologies/Display/media/qli-display/DRM_mode_test_sample_application_output_screen.PNG?fit=max&auto=format&n=mGpYCfBsZaJSFIEo&q=85&s=3613118a658faaf67f9b9ddbec4c9d36" alt="图：DRM modetest 输出" width="680" height="376" data-path="Technologies/Display/media/qli-display/DRM_mode_test_sample_application_output_screen.PNG" />
   </div>

8. 要终止 modetest 应用程序，请按 **CTRL + C**。

   <Note>请确保[重新启动 Weston](troubleshoot-display-issues#relaunch-weston)。</Note>
