Xserver中旋转屏幕的方法是什么

发布于 2024-09-27 22:27:29 字数 184 浏览 2 评论 0原文

我想知道使用 xrandr 工具将屏幕旋转 90/180/270 度的 functioncode/source_file ?

xrandr -o 左 xrandr -o 右 xrandr -o 反转 xrandr -o normal

什么函数使用上述命令在 Xserver 中调用屏幕旋转?

问候, 莱文

I would like to know the functioncode/source_file which rotates screen by 90/180/270 degrees using xrandr tool ?

xrandr -o left
xrandr -o right
xrandr -o inverted
xrandr -o normal

What function invokes screen rotation in Xserver using above commands ?

Regards,
Levon

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

葬シ愛 2024-10-04 22:27:29

您应该检查

xrandr --output --rotate left

它是否不起作用,也许您的 X 驱动程序不支持旋转或已禁用。
尝试

Option         "RandRRotation" "True"

在 /etc/X11/xorg.conf 文件的 Screen 部分

Yo should check

xrandr --output --rotate left

if it doesn't work maybe your X driver doesn't support rotating or it's disabled.
Try

Option         "RandRRotation" "True"

in the Screen section /etc/X11/xorg.conf file

离线来电— 2024-10-04 22:27:29

有两种不同的 X 扩展可以处理窗口的内部旋转。最基本的是 RANDR,其源代码位于 X Server 源代码的顶级 randr 目录中。

MODES 扩展提供对多头设备的支持,并公开您可以在调用 xrandr 的结果中看到的输出和 CRTC,它是第二个与旋转窗口配合使用的扩展。 MODES 可以在 X 服务器源代码的 hw/xfree86/modes 子目录中找到。

如果 X 驱动程序直接使用 RANDR,则它必须提供许多让 RANDR 旋转和显示窗口的函数。如果您使用 MODES,那么它将自身设置为 RANDR 和驱动程序之间的一层,并且您必须为 MODES 提供一组更有限的功能,并且它可以处理大部分工作。

也就是说,我还没有真正让 MODES 在我正在编写的 X 驱动程序中旋转窗口,可能是因为 RANDR 和 MODES 实际上都没有记录,而且还不清楚它们的图像处理模型是什么。

There are two different X extensions that handle the internal rotation of windows. The most basic is RANDR and its source code is in the top level randr directory of the X Server source.

The MODES extension that provides support for multi-headed devices and which exposes the Outputs and CRTCs you can see listed in the results of invoking xrandr, is the second extension that works with rotating windows. MODES can be found in the hw/xfree86/modes subdirectory of the X server source.

If an X driver uses RANDR directly, it must provide a number of functions that lets RANDR rotate and display windows. If you are using MODES then it sets itself as a layer between RANDR and your driver, and you have to give MODES a more limited set of functions and it handles much of the work.

That said, I've yet to actually get MODES to rotate a window in the X Driver I'm writing, probably because both RANDR and MODES are practically undocumented and its far from clear what their image processing models are.

彻夜缠绵 2024-10-04 22:27:29

/usr/include/X11/extensions/Xrandr.h 中的函数之一 - 可能是 XRRSetScreenConfig - 使用 RANDR 扩展来询问服务器配置一堆东西,包括旋转。这就是 xrandr 命令行工具所使用的。

如果您问的是实际工作是什么,这是一个更难的问题 - X 服务器假设它支持 RANDR 扩展,则可能使用通用代码,尽管它更有可能使用特定于芯片组的代码代码,在渲染帧时完成实际工作......

One of the functions in /usr/include/X11/extensions/Xrandr.h - probably XRRSetScreenConfig - uses the RANDR extension to ask the server to configure a pile of things including the rotation. That's what the xrandr commandline tool would be using.

If you're asking what actually does the work, that's a harder question - the X server, assuming it supports the RANDR extension, may be using generic code, though more likely it is using very chipset-specific code, to do the actual work when rendering the frame...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文