> ## 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.

# Run DRM modetest

DRM modetest ensures that the DSI and the DPU paths are working effectively. To verify the display driver topology, run the DRM modetest.

<Note>
  You must enable SSH to access your host device. For instructions, see [Sign in using SSH](https://dragonwingdocs.qualcomm.com/Key-Documents/Flash-Guide/how-to-sign-in-with-ssh).
</Note>

1. To kill the Weston client application, run the following commands in the device shell:

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

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

   **Sample output:**

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

   Use the Weston process ID from the sample Weston process list to kill the Weston processes.

2. To kill all Weston processes, run the following command:

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

3. To change permissions of the modetest application, run the following command:

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

4. To view the connector IDs and modes, run the following command:

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

5. To verify DRM modes and connector information, pull the `/opt/drm_mode.txt` file locally on your host computer. Use the Secure Copy Protocol (SCP) to pull the `drm_mode.txt` file from the device to your host computer. For example:

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

   <Note>When prompted for a password, enter `oelinux123`.</Note>

   The output as shown in the following figure is from the `/opt/drm_mode.txt` file.

   <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="Figure: Command prompt output" width="571" height="90" data-path="Technologies/Display/media/qli-display/Command_prompt_output.png" />
   </div>

6. To fetch the connector ID and mode name, use the relevant values from the `/opt/drm_mode.txt` file:

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

7. To start the modetest application, run the following sample command using the connector ID and the mode name retrieved from the `/opt/drm_mode.txt` file. For example:

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

   <Note>Start the DRM test application and ignore the warning log: `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="Figure: DRM modetest output" width="680" height="376" data-path="Technologies/Display/media/qli-display/DRM_mode_test_sample_application_output_screen.PNG" />
   </div>

8. To kill the modetest application, select **CTRL + C**.

   <Note>Ensure that you [Relaunch Weston](troubleshoot-display-issues#relaunch-weston).</Note>
