Giter Club home page Giter Club logo

Comments (5)

lahwaacz avatar lahwaacz commented on August 31, 2024

Does adding Before=sleep.target to the [Unit] section help?

from sxlock.

 avatar commented on August 31, 2024

from sxlock.

lahwaacz avatar lahwaacz commented on August 31, 2024

Have you run systemctl daemon-reload after editing the service? Do you have other services bound to the sleep/suspend/hibernate targets? Does using Before=suspend.target or Before=hibernate.target instead of the sleep.target help? It has to work somehow. There are also some examples here. Maybe use ExecStartPost=/usr/bin/sleep 1 or something like that as a workaround?

Writing a script won't help because sxlock does not fork itself, it has to keep running in foreground until you unlock the screen. Or maybe the lack of notification to the parent process when the screen is actually locked is the problem. There are delays to grab the keyboard and pointer, but I don't see how that could get into seconds...

from sxlock.

 avatar commented on August 31, 2024

Sorry if I reply this late. I tried all the three methods (sleep, suspend, hibernate) and they didn't work. The ExecStartPost didn't work either. I was talking about a script because I can rebind the key that put the pc in sleep mode and redirect to a script that first start sxlock and only then run the command to put the pc in sleep mode

from sxlock.

limitedAtonement avatar limitedAtonement commented on August 31, 2024

The way this looks on my system is that the screen flickers perhaps 4 times on wakeup showing the unlocked screen then black alternating before showing the lock screen. My guess is that the graphics card is showing "uninitialized" memory...a different buffer that still has the unlocked desktop on it? I'm thinking the desktop environment (xfce in this case) should take care of clearing graphical memory before going to sleep or before calling the lack command.

from sxlock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.