Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement automatic restarts. Picom crashes frequently. #4

Open
cjthompson opened this issue Nov 18, 2022 · 2 comments
Open

Implement automatic restarts. Picom crashes frequently. #4

cjthompson opened this issue Nov 18, 2022 · 2 comments

Comments

@cjthompson
Copy link

It would be great if picom was started using systemd or another way to have it automatically restart after a crash. In my experience, picom crashes frequently, especially when resuming from suspend.

Here's a sample user picom.service

[Unit]
Description=Picom compositor fork
Documentation=man:picom(1)
PartOf=graphical-session.target
# Try to restart up to 3 times
StartLimitBurst=3
# Don't try to restart after 60 seconds
StartLimitIntervalSec=60

[Service]
ExecStart=/usr/bin/picom --config %h/.config/regolith2/picom/config --experimental-backends --dbus
ExecReload=/usr/bin/kill -SIGUSR1 $MAINPID
# Try to restart no matter how the process ended
Restart=always
# Restart in 5 second intervals
RestartSec=5

[Install]
WantedBy=graphical-session.target
@kgilmer
Copy link
Member

kgilmer commented Nov 19, 2022

Interesting idea @cjthompson . I don't have any experience w/ systemd services. Do you have any links to recommend to get up to speed on the relevant parts as it relates to your suggestion?

@mfisher87
Copy link
Member

mfisher87 commented Dec 23, 2022

Since doing a CPU upgrade and a fresh OS install (with Regolith 2.2) I'm not noticing picom crashing like it used to. I'm not sure if it's thanks to 2.2 or if the crashes were a quirk of my old system.

FWIW back when I needed it, I used this bash script to check if picom is running and if not, start it. I'd run it any time I noticed screen tearing. I haven't needed it for a while though (:fist_right: :wood:) ! https://github.com/mfisher87/picom-ensure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants