Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8032

Troubleshooting • Re: Turn on/off HDMI: not tvservice, not vcenvcmd, not dtparam (despite man pages), so how...?

$
0
0
thank you very much for this, this is really promising, i think i can fix my problem with these hints. :-)

edit: yes, this works fine even without writing my own drm/kms driver, though i'll look into this next, seems like a fun project.

for now i run the kmsblank command via python script and inject the <enter> key when i want the screen back. these are my tests if anyone wants to use this workaround:

kmsblank.py:

Code:

import oscmd = "kmsblank -c 0" # blank connector 0 (first hdmi)os.system(cmd)
turn hdmi off and on again (from a different python script, since the kmsblank command enters a while(True) loop until <enter> is pressed):

Code:

from subprocess import Popen, PIPEimport timeprocess = Popen(['python', 'kmsblank.py'], stdin=PIPE, text=True)time.sleep(5)process.communicate('\n')

Statistics: Posted by spliff — Fri Jan 19, 2024 10:09 pm



Viewing all articles
Browse latest Browse all 8032

Trending Articles