> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs-staging.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 connect to the target 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 command in the device shell:

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

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

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

   <Note>
     Running only the <code>systemctl stop weston.service</code> command generates the following warning:

     <br />

     **Stopping weston.service, but its triggering units are still active: weston.socket**

     <br />

     This behavior is expected because Weston is configured as a socket-activated service. To completely stop the display subsystem, stop both the socket and the service using the command in Step 2.
   </Note>

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 following figure shows the output from the `/opt/drm_mode.txt` file.

<div className="flex flex-col items-center gap-2">
  <img src="https://mintcdn.com/qualcomm-staging/blZpKs_b9On5nj-y/archives/2.1/Technologies/Display/media/qli-display/Command_prompt_output.png?fit=max&auto=format&n=blZpKs_b9On5nj-y&q=85&s=b1b1697f3cae81cabcd0ab371c33a47c" alt="Figure: Command prompt output" width="571" height="90" data-path="archives/2.1/Technologies/Display/media/qli-display/Command_prompt_output.png" />
</div>

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

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

   Where `<Connector id>` and `<mode name>` are the values retrieved from the `/opt/drm_mode.txt` file.

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-staging/blZpKs_b9On5nj-y/archives/2.1/Technologies/Display/media/qli-display/DRM_mode_test_sample_application_output_screen.PNG?fit=max&auto=format&n=blZpKs_b9On5nj-y&q=85&s=c79bbac65889341fa3311e855ea9fb7a" alt="Figure: DRM modetest output" width="680" height="376" data-path="archives/2.1/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-relaunch-weston).</Note>
