获取可用的 X11 视频模式,无需扩展
我一直在四处寻找,但找不到解决方案。官方 NVIDIA Tegra 2 Linux SDK (L4T) 不包含用于查询可用视频模式的 XRandR 或 VideoMode X11 扩展。我的下一个想法是解析视频模式的日志文件。当然,大多数时候它位于 /var/log/Xorg.0.log 但我不想总是做出这样的假设。 XF86misc 扩展提供了一种获取日志路径的方法,但默认情况下也不会安装该扩展。
所以我想知道是否有人知道任何其他方法来确定可用的视频模式以及显示器当前的视频模式是什么。
I've been searching around and can't find a solution for this. The official NVIDIA Tegra 2 Linux SDK (L4T) doesn't include both XRandR or the VideoMode X11 extension for querying available video modes. My next thought was to parse the log file for video modes. Of course most of the time it's at /var/log/Xorg.0.log but I'd rather not always make that assumption. The XF86misc extension provides a way to get the log path but that extension is also not installed by default.
So I'm wondering if anyone knows of any other way to figure out what video modes are available and also what the current video mode of the display is.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
核心 X 协议没有提及模式。你必须使用扩展。这没有什么问题,这就是扩展的用途。
另外,请记住,无法保证您所显示的计算机与您正在运行的计算机是同一台计算机,因此如果您的应用程序跨网络运行,则解析 X 日志文件注定会失败。
The core X protocol does not mention modes. You have to use extensions. There's nothing wrong with that, that's what extensions are for.
Also, remember that there's no guarantee that the machine you're displaying on is the same machine as you're running on, so parsing the X log file is destined to fail if your app ever runs across the network.