Giter Site home page Giter Site logo

Comments (6)

maximbaz avatar maximbaz commented on July 18, 2024 1

Not to worry, it's provided in this repo, and possibly in the wluma distro package as well 😄 https://github.com/maximbaz/wluma/blob/main/wluma.service

from wluma.

maximbaz avatar maximbaz commented on July 18, 2024

I think it's very feasible, just not been prioritized because I'm using my laptop without any external screens 😅 PR would be most appreciated!

You are more than welcome to have a look at the code, and then if you want we can talk about the approach, hopefully that can help you get onboarded and save some time.

One important thing to consider (for me in particular 😅), is this PR: #86

This harmless idea to upgrade deps blew out of proportion, as I've seen that wlroots library has changed a lot in the way you are supposed to use it. I'm done somewhat, but I think it would be most valuable to finish that PR, before building things on top, just because it might significantly impact the approach for detecting screen change.

from wluma.

riley-martin avatar riley-martin commented on July 18, 2024

just not been prioritized because I'm using my laptop without any external screens

I am as well, its just that wluma seems to think that the built-in screen is disconnected when it goes to sleep; or am I misunderstanding and this is a separate problem?

I'm done somewhat, but I think it would be most valuable to finish that PR, before building things on top, just because it might significantly impact the approach for detecting screen change.

Ok, makes sense.

from wluma.

maximbaz avatar maximbaz commented on July 18, 2024

I might be hiding the problem for myself by running wluma as a systemd service with Restart set to always, so even if it crashes on sleep, it just self restarts on resume and I never notice this 😄 How are you running it, manually starting the process?

from wluma.

riley-martin avatar riley-martin commented on July 18, 2024

running wluma as a systemd service with Restart set to always

I guess that would do it. I just exec wluma in my compositor's config file (I use Hyprland). I guess I'm just too lazy to write a systemd service 😄.

from wluma.

name-snrl avatar name-snrl commented on July 18, 2024

My swayidle config turned off all outputs after 6 min, and sends idlehint after 10 minutes, with IdleActionSec=10min in logind.conf this suspends my system after 20 minutes, which means only 6 minutes out of 20 my screen is on. This causes wluma to crash. So yeah, I think this is an important issue for anyone using swayidle with default settings or something like that.

Hopefully, work on #86 is nearing completion.

systemd service with Restart set to always

In my case it stops restarting after 6 attempts. There some logs - journalctl.log

The reason is the default values for the DefaultStartLimitIntervalSec and DefaultStartLimitBurst options:

https://www.freedesktop.org/software/systemd/man/latest/systemd-system.conf.html#DefaultStartLimitIntervalSec=

I think this can be solved with StartLimitIntervalSec and StartLimitBurst, but I don't see a single solution for all possible cases.

I solved my case with a small change in the swayidle configuration:

 # DPMS
-timeout 360 'swaymsg "output * power off"' resume 'swaymsg "output * power on"'
+timeout 360 'systemctl --user stop wluma.service; swaymsg "output * power off"' resume 'swaymsg "output * power on"; systemctl --user start wluma.service'
 # sleep
 before-sleep 'loginctl lock-session "$XDG_SESSION_ID"'
 idlehint 600 # +IdleActionSec in logind.conf
-after-resume 'swaymsg "output * power on"'
+after-resume 'swaymsg "output * power on"; systemctl --user start wluma.service'

from wluma.

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.