# Debug

Source: [https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html](https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html)

Debug covers the information required to debug and analyze various segments such as the
            DSI panel clock, DPU, and Weston.

## DSI panel and clock information

Source: [https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html](https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html)

The subsequent sections provide information on the panel selected and the DSI clock
                information.
Note: You must enable SSH in Permissive mode to
                securely access your host device. For instructions, see [How to SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/how_to.html#how-to-ssh-).

Note: Ensure that you mount the
                    `debugfs` file system to access the `debugfs`
                details of the display subsystem. Use the following command to mount the
                    `debugfs` file system:

    mount -o remount,rw /Copy to clipboard

    mount -t debugfs none /sys/kernel/debugCopy to clipboard

### Check which panel was selected

To check which panel was selected, run the following
                command:

    cat /sys/kernel/debug/qcom,mdss_dsi_ext_bridge_4k30p/dump_infoCopy to clipboard

**Sample output:**

name = qcom,mdss_dsi_ext_bridge_4k30p
                       Resolution = 1920(148|88|44|1)x1080(36|4|5|1)@60fps 0 Hz
                       CTRL_0:
                              ctrl = dsi-ctrl-0
                              phy = dsi-phy-0
                       Panel = ext video mode dsi bridge
                       Clock master = dsi-ctrl-0	Copy to clipboard

### Check DSI clock information

To check the DSI clock information, run the following
                command:

    cat /sys/kernel/debug/qcom,mdss_dsi_ext_bridge_4k30p/dsi-ctrl-0/state_infoCopy to clipboard

**Sample output:**

Current State:
            CTRL_ENGINE = ON
            VIDEO_ENGINE = ON
            COMMAND_ENGINE = OFF
    Clock Info:
            BYTE_CLK = 111375000, PIXEL_CLK = 148500000, ESC_CLK = 19200000Copy to clipboard

## Regulator and clock information

Source: [https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html](https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html)

To check the regulator status and the voltage, run the following
            command:

    cat /sys/kernel/debug/regulator/regulator_summaryCopy to clipboard

## Display interface information

Source: [https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html](https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html)

The following is the debug dump-out: Display interface number, vsync count, underrun
            count, and interface modes.

    cat /sys/kernel/debug/dri/0/encoder*/status
    intf:1    vsync:  192124     underrun:       0    mode: video
     Copy to clipboard

## SDE layer mixers and layer information

Source: [https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html](https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html)

The SDE layer mixer information is currently available for users who have full access to
            the proprietary software shipped with Qualcomm Linux. For more information, see the
                [Qualcomm Linux Display Guide - Addendum](https://docs.qualcomm.com/bundle/resource/topics/80-70014-18A/debug.html)

## General DPU debugging information

Source: [https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html](https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html)

The common DPU debugging information is provided here.

### DPU clock rate

Note: You must enable SSH in Permissive mode to securely access
                your host device. For instructions, see [How to SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/how_to.html#how-to-ssh-).

To check the DPU clock rate, run the following commands:

    cat /sys/kernel/debug/clk/clk_summary | grep disp_ccCopy to clipboard

### Set DPU to the Performance mode

To set the DPU to the Performance mode, run the following commands:

    cd /sys/kernel/debug/dri/0/debug/core_perf/Copy to clipboard

    echo 1 > perf_modeCopy to clipboard

## User mode/Weston debug

Source: [https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html](https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html)

### Weston autolaunch

When the device is powered On, the Weston screen launches automatically. The
                following script file contains the Weston configurations and its command-line
                parameters that have been used to set up the Weston screen autolaunch: `
                    /etc/initscripts/init_qti_display`
Note: You must
                    enable SSH in Permissive mode to securely access your host device. For
                    instructions, see [How to
                SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/how_to.html#how-to-ssh-).

    mount -o remount,rw /Copy to clipboard

    cat /etc/initscripts/init_qti_displayCopy to clipboard

### Weston display configuration

Weston uses the `weston.ini` configuration file. When Weston starts,
                it searches for the `weston.ini` file from the Weston init script as
                    `--config=/etc/xdg/weston/weston.ini` and configures the Weston
                display pipeline. The detailed configurations are described at [https://manpages.ubuntu.com/manpages/focal/en/man5/weston.ini.5.html](https://manpages.ubuntu.com/manpages/focal/en/man5/weston.ini.5.html).

Run the following commands to fetch the Weston configuration file:

    mount -o remount,rw /Copy to clipboard

    cat /etc/xdg/weston/weston.iniCopy to clipboard

On running the commands, you see the following `weston.ini`
                configuration sample output:

configuration file for Weston
    [core]
    idle-time=0
    backend=sdm-backend.so
    repaint-window=10
     
    [output]
    name=DSI-1
    mode=on
     
    [output]
    name=DP-1
    mode=on
     
    [shell]
    clock-format=secondsCopy to clipboard

### Relaunch Weston

The following are the steps to kill the Weston process and manually relaunch the
                Weston server:
Note: You must enable SSH in Permissive mode to
                    securely access your host device. For instructions, see [How to SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/how_to.html#how-to-ssh-).

1. To identify the ID of the Weston processes, run the following
                            commands:

        mount -o remount,rw /Copy to clipboard

        ps -A | grep westonCopy to clipboard

**Sample                            output:**

        824 ?        00:00:12 weston
           1090 ?        00:00:00 weston-keyboard
           1092 ?        00:00:01 weston-desktop-Copy to clipboard
2. To kill the Weston process, run the following command:

        killall westonCopy to clipboard
3. To relaunch the Weston server, run the following
                    commands:

        mount -o remount,rw /Copy to clipboard

        suCopy to clipboard

        . /etc/profileCopy to clipboard

        export XDG_RUNTIME_DIR=/dev/socket/westonCopy to clipboard

        mkdir --parents $XDG_RUNTIME_DIRCopy to clipboard

        chmod 0700 $XDG_RUNTIME_DIRCopy to clipboard

        cd /usr/binCopy to clipboard

        ./weston --tty=2 --continue-without-inputCopy to clipboard

## HDMI troubleshooting

Source: [https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html](https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html)

LT9611uxc is the DSI-to-HDMI bridge chip firmware. The recommended firmware version is
                `LT9611UXC_DSI_PortA_HDCP_Disable_V5.0.21.bin`.

In case you experience a no-display screen on the HDMI, it is recommended to upgrade the
            firmware.

### Lontium firmware upgrade

The following are the Lontium firmware upgrade steps:

1. Download the recommended LT9611uxc firmware version
                        `LT9611UXC_DSI_PortA_HDCP_Disable_V5.0.21.bin` from [http://www.lontiumsemi.com/download](http://www.lontiumsemi.com/download) and go to the Qualcomm section.
Note: Enable SSH in the
                            Permissive mode to securely access your host device. For more
                            information, see [How to SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/how_to.html#how-to-ssh-).

Note: When prompted for
                            a password, enter *oelinux123*.
2. To upgrade the firmware, run the following Linux shell commands :

        mount -o rw,remount /Copy to clipboard

        setenforce 0Copy to clipboard

        scp <LT firmware bin> root@<IP of the device>:/lib/firmware/lt9611uxc_fw.binCopy to clipboard

        syncCopy to clipboard

        echo 0 > /sys/bus/i2c/devices/0-002b/lt9611uxc_firmwareCopy to clipboard

Note: Wait for at least
                            three minutes for the firmware upgrade to complete.
3. To retrieve the lt9611 logs, run the following command
                    :

        dmesg | grep lt9611Copy to clipboard

The following log confirms that the firmware upgrade is successful: `Firmware
                    updates successfully`

To ensure that the new firmware is in effect, it is recommended to hard reboot
                (unplug and plug in the power cable) the device.

### Known issues

You may experience a no-display screen on powering on the device or the hotplug HDMI
                cable.

To fetch the UART serial logs, click [UART serial console](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/how_to.html#how-to-connect-to-a-uart-shell-). After obtaining the
                UART logs, you may encounter one of the two known issue scenarios as follows:

Table : Workaround for known issues

| Known issue | Workaround |
| --- | --- |
| If the following EDID timeout log error<br>                                occurs:<br><br>    lt9611uxc 0-002b: wait for EDID timeout<br>    lt9611uxc 0-002b: wait for EDID timeout<br>    lt9611uxc 0-002b: wait for EDID timeout<br>    lt9611uxc 0-002b: wait for EDID timeout<br>    lt9611uxc 0-002b: wait for EDID timeout<br>    lt9611uxc 0-002b: wait for EDID timeout<br>    Copy to clipboard | <ol class="ol"><br>                                    <li class="li">Power On the Dev kit without the HDMI cable.</li><br><br>                                    <li class="li">Insert the HDMI cable (wait for two minutes) only after the<br>                                        device is successfully powered On.</li><br><br>                                </ol> |
| If the following disconnected and connected logs occur<br>                                continuously:<br>                                <br><br>    lt9611uxc 0-002b: [name=HDMI-A-1]:[status=connected]<br>    lt9611uxc 0-002b: wait for EDID timeout<br>    lt9611uxc 0-002b: wait for EDID timeout<br>    lt9611uxc 0-002b: release edid<br>    lt9611uxc 0-002b: [name=HDMI-A-1]:[status=disconnected]<br>    lt9611uxc 0-002b: [name=HDMI-A-1]:[status=connected]<br>    lt9611uxc 0-002b: release edid<br>    lt9611uxc 0-002b: [name=HDMI-A-1]:[status=disconnected]<br>    lt9611uxc 0-002b: [name=HDMI-A-1]:[status=connected]<br>    Copy to clipboard | Kill the Weston server and relaunch the Weston server manually.<br>                                For more information, see [Relaunch Weston](https://docs.qualcomm.com/doc/80-70014-18/topic/debug.html#user_mode_weston_debug__section_mr4_fkl_xbc). |

Last Published: Jul 16, 2024

[Previous Topic
Verify](https://docs.qualcomm.com/bundle/publicresource/80-70014-18/topics/verify_0.md) [Next Topic
References](https://docs.qualcomm.com/bundle/publicresource/80-70014-18/topics/references.md)