Bel*_*dez 7 arch-linux power-management x11 i3
[注意:注意到一个类似的问题,但从未收到回复。]
我使用i3
的archlinux
。我已将 DPMS 设置为在闲置 2 分钟后暂停显示 ( xset dpms 0 120 180
)。但是,我注意到它并不总是自动启动。我不认为这是硬件问题,因为执行xset dpms force
工作没有问题。
我的设置:
$ xset q
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: 0x22 BlackPixel: 0x0 WhitePixel: 0xffffff
Font Path:
/usr/share/fonts/TTF/,/usr/share/fonts/OTF/,built-ins
DPMS (Energy Star):
Standby: 0 Suspend: 120 Off: 180
DPMS is Enabled
Monitor is On
Run Code Online (Sandbox Code Playgroud)
根据 DPMS 设置,如何确定阻止我的显示器暂停的原因?
您可以使用这个小程序来检查它是否可能是由于某些用户输入(鼠标过于敏感?)或应用程序主动重置 XScreenSaver 扩展空闲计时器造成的:
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/extensions/scrnsaver.h>
/* Report amount of X server idle time. */
/* Build with- */
/* cc xidle.c -o xidle -lX11 -lXext -lXss */
int main(int argc, char *argv[])
{
Display *display;
int event_base, error_base;
XScreenSaverInfo info;
float seconds;
display = XOpenDisplay("");
if (XScreenSaverQueryExtension(display, &event_base, &error_base)) {
XScreenSaverQueryInfo(display, DefaultRootWindow(display), &info);
seconds = (float)info.idle/1000.0f;
printf("%f\n",seconds);
return(0);
}
else {
fprintf(stderr,"Error: XScreenSaver Extension not present\n");
return(1);
}
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2319 次 |
最近记录: |