Waveshare 7 Inch DSI display - how to turn off completely?

Hi All,
I have been using Volumio with a USB DAC for few months. Just added a Waveshare 7 inch DSI display to it now. Everything works fine except one issue. The screensaver works and turns off after the given time. But the backlight of the screen doesn’t go off. This is a deal breaker for me as I want to keep the streamer always on even while not using. I understand the display with no information and just a small backlight would not consume so much power. But backlight not turning off doesnt look good. Any help here - any methiod to turn it completely off on timeout or manually? Sorry if this has been asked and anwered earlier; but I could not find anything regarding this in the forums.

Hi
Please provide the exact link to your screen, so we know where we are dealing with.

Please run these commands from a ssh session and provide the output:

export DISPLAY=:0
sudo xset q

sudo xset dpms force off

The screen is this: https://www.waveshare.com/wiki/7inch_DSI_LCD

Getting this when trying to execute it:

No protocol specified
xset: unable to open display “:0”

Made an error, was a bit overactive with sudo…

export DISPLAY=:0
xset q

Turn off display:
xset dpms force off

xset q gives the below and “xset dpms force off” turns the display blank with backlight not gone.

Keyboard Control:
auto repeat: on key click percent: 0 LED mask: 00000000
XKB indicators:
00: Caps Lock: off 01: Num Lock: off 02: Scroll Lock: off
03: Compose: off 04: Kana: off 05: Sleep: off
06: Suspend: off 07: Mute: off 08: Misc: off
09: Mail: off 10: Charging: off 11: Shift Lock: off
12: Group 2: off 13: Mouse Keys: off
auto repeat delay: 660 repeat rate: 25
auto repeating keys: 00ffffffdffffbbf
fadfffefffedffff
9fffffffffffffff
fff7ffffffffffff
bell percent: 50 bell pitch: 400 bell duration: 100
Pointer Control:
acceleration: 2/1 threshold: 4
Screen Saver:
prefer blanking: yes allow exposures: yes
timeout: 0 cycle: 600
Colors:
default colormap: 0x20 BlackPixel: 0x0 WhitePixel: 0xffffff
Font Path:
/usr/share/fonts/X11/misc,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,built-ins
DPMS (Energy Star):
Standby: 0 Suspend: 0 Off: 0
DPMS is Enabled
Monitor is On

I am afraid you screen’s backlight can’t be controlled by SW.

@gvolt @nerd
Any suggestion?

Per Waveshare’s wiki

the screen will enter sleep mode

by executing xset dpms force off. So, unless Waveshare understands “sleep mode” to mean “blanking”, IMO the backlight should turn off.

@njaustin123
What Pi model are you using?

Please post the output of

cat /boot/userconfig.txt

Also post the output of

export DISPLAY=:0
xset q

after executing

xset dpms force off

Mine is Pi 4b 1 GB

Below the contents of userconfig. Had dded HDMI blanking as per somebody’s suggestion. Also the LED off and underclocking commands as you can see here

"

# Add your custom config.txt options to this file, which will be preserved during updates
lcd_rotate=2
display_hdmi_rotate=2
display_lcd_rotate=2

hdmi_group=2
hdmi_mode=87
hdmi_timings=400 0 100 10 140 1280 10 20 20 2 0 0 0 60 0 43000000 3
hdmi_blanking=1

# Turn off Power LED
dtparam=pwr_led_trigger=default-on
dtparam=pwr_led_activelow=off
# Turn off Activity LED
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off
# Turn off Ethernet ACT LED
dtparam=eth_led0=4
# Turn off Ethernet LNK LED
dtparam=eth_led1=4

 Archimago's CRAAP Pi 4B Settings...
# http://archimago.blogspot.com/2020/10/musingshow-to-raspberry-pi-4-touch.html
# October 14, 2020

# CPU speed control - normally 1500MHz, min 600
arm_freq=1200
arm_freq_min=300

# CPU voltage control - SYSTEM DEPENDENT!
over_voltage=-3
over_voltage_min=-4

# SDRAM control, normally 3200 - again, watch system dependent voltage
sdram_freq=2400
sdram_freq_min=300
over_voltage_sdram=-3

core_freq_min=200
gpu_freq_min=200

gpu_mem = 256

# Keep it cooler! Throttle at max 75C.
temp_limit=75

"

and here is output of xset q after “xset dpms force off”


"
Keyboard Control:
  auto repeat:  on    key click percent:  0    LED mask:  00000000
  XKB indicators:
    00: Caps Lock:   off    01: Num Lock:    off    02: Scroll Lock: off
    03: Compose:     off    04: Kana:        off    05: Sleep:       off
    06: Suspend:     off    07: Mute:        off    08: Misc:        off
    09: Mail:        off    10: Charging:    off    11: Shift Lock:  off
    12: Group 2:     off    13: Mouse Keys:  off
  auto repeat delay:  660    repeat rate:  25
  auto repeating keys:  00ffffffdffffbbf
                        fadfffefffedffff
                        9fffffffffffffff
                        fff7ffffffffffff
  bell percent:  50    bell pitch:  400    bell duration:  100
Pointer Control:
  acceleration:  2/1    threshold:  4
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  0    cycle:  600
Colors:
  default colormap:  0x20    BlackPixel:  0x0    WhitePixel:  0xffffff
Font Path:
  /usr/share/fonts/X11/misc,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,built-ins
DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 0
  DPMS is Enabled
  Monitor is Off
"
1 Like

All the “hdmi_xxx” options are irrelevant for your DSI display. In your “/boot/userconfig.txt” try replacing

lcd_rotate=2
display_hdmi_rotate=2
display_lcd_rotate=2

hdmi_group=2
hdmi_mode=87
hdmi_timings=400 0 100 10 140 1280 10 20 20 2 0 0 0 60 0 43000000 3
hdmi_blanking=1

with

dtoverlay=vc4-kms-v3d-pi4
dtoverlay=vc4-kms-dsi-7inch

P.S. Please use code tags (look for the </> symbol) when posting the output of commands that were executed from Volumio’s command prompt.

@gvolt , you are a life saviour.
This worked!!!

1 Like

I installed a switch inline with the USB power line. When i want the backlight off i just hit the switch. Volumio stays on 24/7

i was also plannnig something similar. That’s where @gvolt 's answer helped me. Now I am good.