This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit 76e7d26b8b9efd6811970968d8b03d63b8aaf338
Author: Mihai Moldovan <io...@ionic.de>
Date:   Wed Mar 7 02:01:39 2018 +0100

    nx-X11/programs/Xserver/hw/nxagent/Init.c: disable DPMS support within 
nxagent.
    
    Keeping it enabled leads to nxagent consuming 100% of CPU resources
    after some time.
    
    Older code used three different timers for each DPMS mode (standby,
    suspend, off), with each timer checking that the elapsed idle time is
    strictly less than the DPMS mode timeout value.
    
    Newer code started merging DPMS and ScreenSaver timers into a single
    one, with checking DPMS modes and timeouts in a fall-through fashion.
    The code expects that, if a timeout is reached, the mode is set
    accordingly, so that the old timeout is disregarded next time.
    
    Since we stub out DPMSSetMode() in nxagent, this doesn't happen.
    
    In this case, the old DPMS timeout will be checked the next time around
    and we will be calculating DPMS_MODE_TIMEOUT - IDLE_TIME. If IDLE_TIME
    is bigger than DPMS_MODE_TIMEOUT, we run into problems with unsigned
    integers. What happens next will be *another* overflow once DoTimers()
    is executed and from that function SetTimers(), which will add the
    current timestamp to the timeout value. Later functions subtract the
    current timestamp again (which will be even higher since some time
    elapsed) and underflow the value again.
    
    It looks like this leads to consistent firing of the timer - something
    we do not want to have.
    
    For new, disable DPMS support in nxagent. We do not execute it on actual
    hardware that could change DPMS modes.
    
    At a later time, implementing a DPMS timeout/mode passthrough to the
    connected X server/display might be beneficial.
    
    Fixes: ArcticaProject/nx-libs#671
---
 nx-X11/programs/Xserver/hw/nxagent/Init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c 
b/nx-X11/programs/Xserver/hw/nxagent/Init.c
index 598077b..12f7f0b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Init.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c
@@ -572,7 +572,7 @@ int DPMSGet(int *level)
 
 Bool DPMSSupported(void)
 {
-  return 1;
+  return 0;
 }
 
 #endif

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on 
/srv/git/code.x2go.org/nx-libs.git
_______________________________________________
x2go-commits mailing list
x2go-commits@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-commits

Reply via email to