# Switch linear vs. SHDR mode automatically Note This section is only applicable for QCS6490. This feature allows on-the-fly switching between Linear and SHDR v2 mode pipelines without stopping and starting the camera session. This feature is helpful to prevent interrupting a video session when there is a SHDR vs. Linear mode switch needed based on lux value. It also helps reduce the pipeline switch latency as the pipelines (Linear and SHDR) are pre-initialized during session creation time. During mode switch, hardware resources of the pipeline are released (sensor, IFE, IPE) and then acquired and reconfigured for the new pipeline. Note This feature works only for SHDR v2 and Linear mode pipelines. Note Connect to the device console using SSH. See [How To SSH?](https://docs.qualcomm.com/bundle/publicresource/topics/80-80022-254/how_to.html#use-ssh) for instructions. ## Prerequisites Before running this usecase, you must configure the cam-server systemd service to use the Adreno OpenCL ICD library. sed -i '/^\[Install\]/i Environment="OCL_ICD_FILENAMES=/usr/lib/libOpenCL_adreno.so.1"' \ /usr/lib/systemd/system/cam-server.service && \ systemctl daemon-reload && \ systemctl restart cam-server Copy to clipboard To collect the log, run the following command on the device: # journalctl -f > /opt/log.txt Copy to clipboard Use `vhdr=3` in a GST command to enable this feature. To enable the feature and toggle between Linear and SHDR modes: 1. Run the gst-camera-metadata-example application, which can support setting the vendor tag to switch the use case during runtime. For example: gst-camera-metadata-example -p "qtiqmmfsrc name=camsrc camera=0 vhdr=3 ! \ video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1,\ interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 \ output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location=/opt/mux4k.mp4" Copy to clipboard 2. In the application, select **(1) READY**. 3. Select **(3) PLAYING**. The camera starts in linear mode. 4. Select **(4) META**. The following menu is shown: ---------MENU--------- (1) video-metadata (2) image-metadata (3) static-metadata (4) session-metadata Copy to clipboard 5. Select **(1) video-metadata**. The following menu is shown: ---------video-metadata--------- (1) List all available tags (2) Dump all tags values in a file (3) Dump custom tags values in a file (4) Get a tag (5) Set a tag Copy to clipboard 6. Select **(5) Set a tag**. 7. A prompt appears to enter the section name and tag name separated by spaces without quotes. Enter `org.quic.camera.videoHDRmode modeType` 8. A prompt appears to set the value. Enter 1 to switch to SHDR mode. To toggle between Linear and SHDR modes, repeat this process and enter 1 (SHDR mode) and 0 (Linear mode) as needed. To close the camera, select **(q) QUIT** or press **CTRL + C**. Verify this feature using the following logs: - Linear mode: cam-server[1693]: CamX: [REQMAP]1693 2652 [CORE ] camxsession.cpp:4811 ProcessRequest() chiFrameNum: 0 <==> requestId: 1 <==> sequenceId: 0 <==> CSLSyncId: 1 -- RealTimeFeatureZSLPreviewRawYUV_0 Copy to clipboard - SHDR mode: cam-server[1693]: CamX: [REQMAP]1693 2652 [CORE ] camxsession.cpp:4811 ProcessRequest() chiFrameNum: 296 <==> requestId: 297 <==> sequenceId: 296 <==> CSLSyncId: 297 -- RealTimeSHDR_0 Copy to clipboard Last Published: May 26, 2026 [Previous Topic Enable multiple ROI streams](https://docs.qualcomm.com/bundle/publicresource/80-80022-17/topics/enable-multiple-roi-streams.md) [Next Topic Troubleshoot camera](https://docs.qualcomm.com/bundle/publicresource/80-80022-17/topics/troubleshooting.md)