I'm currently trying to turn my display off and on when I leave / enter the house.

我正在试图在我离开/进入房子时关掉我的显示器。

I'm running an Ubuntu HTPC which is connected to a Samsung TV by HDMI (Intel HD4600). Using 'xset dmesq ...' results in switching the HDMI output off/on and doesn't change the power status of the TV (it just looses the signal). Therefore I connected an IR transmitter which is able to turn the tv off or on - sadly both commands are using the same IR code, resulting in the power status to tip over.

我正在运行一个Ubuntu HTPC,它通过HDMI(Intel HD4600)连接到三星电视。使用'xset dmesq ...'会导致HDMI输出关闭/打开,并且不会改变电视的电源状态(它只是丢失了信号)。因此,我连接了一个能够关闭或打开电视的红外发射器 - 遗憾的是两个命令都使用相同的红外代码,导致电源状态翻倒。

The xset status also doesn't return the right status, it's always seen as "On", regardless of the power status:

xset状态也不会返回正确的状态,无论电源状态如何,它始终显示为“On”:

<hashworks:~> DISPLAY=:0 xset q | grep 'Monitor is'
Monitor is On

I could save the last display status, but this will result in wrong values when I turn the TV off using the remote etc. The IR transmitter isn't getting anything back as well.

我可以保存最后的显示状态,但是当我使用遥控器等关闭电视时,这将导致错误的值。红外线发射器也没有得到任何回复。

Is there any other way to check the current status?

有没有其他方法来检查当前状态?

1 个解决方案

#1


1

It sounds like what you need is CEC.

听起来你需要的是CEC。

This thread ("Turn on / off TV via HDMI CEC") appears informative:

此线程(“通过HDMI CEC打开/关闭电视”)显示信息:

http://www.raspberrypi.org/forums/viewtopic.php?f=35&t=15749

更多相关文章

  1. linux获取网线插拔状态的实现
  2. mysql--查看mysql状态的常用命令
  3. 查看 SQL Server 作业(job)运行结果状态脚本
  4. mysql主从状态异常解决办法
  5. App在自己界面奔溃回到首页,状态栏沉浸式消失bug
  6. Android监控WIFI和GSM状态并绘制网络强度
  7. Java线程的生命周期和状态控制
  8. . io .IOException:setDataSource失败了。:状态= 0 x80000000
  9. fragment 状态保存时怎么执行一些需要在onResume、onPause方法里

随机推荐

  1. Python 为什么不支持 i++ 自增语法,不提供
  2. “三本”大学,小鹿春秋招误入的坑!
  3. 一篇文章掌握 Python 内置 zip() 的全部
  4. 我的“三本”大学生涯到此结束!
  5. 44万条数据揭秘:如何成为网易云音乐评论区
  6. Python 为什么只需一条语句“a,b=b,a”,就
  7. 用python重温统计学基础:描述性统计分析
  8. 我被一道今日头条面试题虐暴了,菊花疼!
  9. Python 为什么用 # 号作注释符?
  10. Python 3.10 版本采纳了首个 PEP,中文翻译