Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
switchd - daemon for all your power button needs?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3343
Location: Rasi, Finland

PostPosted: Wed Sep 29, 2021 6:51 am    Post subject: switchd - daemon for all your power button needs? Reply with quote

https://git.sr.ht/~kennylevinsen/switchd

I'm thinking of ditching elogind... well a part of it anyways. This switchd looks much more customizable.
Anyone here tried it? Writing an ebuild for it shouldn't be too hard.

main.c is just 8kb. Nice.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3343
Location: Rasi, Finland

PostPosted: Sun Feb 27, 2022 7:04 pm    Post subject: Reply with quote

I made an ebuild for switchd.
May the test runs begin. ;)
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3624

PostPosted: Sun Feb 27, 2022 7:33 pm    Post subject: Reply with quote

Nice,
Any interest in dlm ???
Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3343
Location: Rasi, Finland

PostPosted: Sun Feb 27, 2022 7:36 pm    Post subject: Reply with quote

CaptainBlood wrote:
Any interest in dlm ???
Distributed Lock Manager? No?
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3624

PostPosted: Sun Feb 27, 2022 7:50 pm    Post subject: Reply with quote

dlm upstream as a, alternative to tuigreet.
Should have posted to tuigreet post, sorry.
Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3343
Location: Rasi, Finland

PostPosted: Sat Mar 05, 2022 10:13 am    Post subject: *sigh* Reply with quote

Well. Dang.
Looks like my hardware isn't compatible. I tried this:
Code:
demi ~ # switchd power_button 'echo power'
Could not open device /dev/input/.: Is a directory
Could not open device /dev/input/..: Is a directory
Could not open device /dev/input/by-id: Is a directory
Device /dev/input/event11 not suitable
Device /dev/input/mouse1 not suitable
Device /dev/input/event10 not suitable
Device /dev/input/mouse0 not suitable
Device /dev/input/event9 not suitable
Device /dev/input/event8 not suitable
Device /dev/input/event6 not suitable
Device /dev/input/event5 not suitable
Could not open device /dev/input/by-path: Is a directory
Device /dev/input/event7 not suitable
Device /dev/input/event4 not suitable
Device /dev/input/mice not suitable
Listening to 4 event devices
Pressing the power buttons doesn't print anything to the terminal. I also tried with lid actions - nada. :(
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sat Mar 05, 2022 1:42 pm    Post subject: Reply with quote

Worked for me.

:( unfortunately, for me, I had forgotten to turn off acpi actions and ... I was f'ing surprised to see my system shut down. :( :oops:
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sat Mar 05, 2022 1:44 pm    Post subject: Re: *sigh* Reply with quote

Zucca wrote:
Well. Dang.
Looks like my hardware isn't compatible. I tried this:
Code:
demi ~ # switchd power_button 'echo power'
Could not open device /dev/input/.: Is a directory
Could not open device /dev/input/..: Is a directory
Could not open device /dev/input/by-id: Is a directory
Device /dev/input/event11 not suitable
Device /dev/input/mouse1 not suitable
Device /dev/input/event10 not suitable
Device /dev/input/mouse0 not suitable
Device /dev/input/event9 not suitable
Device /dev/input/event8 not suitable
Device /dev/input/event6 not suitable
Device /dev/input/event5 not suitable
Could not open device /dev/input/by-path: Is a directory
Device /dev/input/event7 not suitable
Device /dev/input/event4 not suitable
Device /dev/input/mice not suitable
Listening to 4 event devices
Pressing the power buttons doesn't print anything to the terminal. I also tried with lid actions - nada. :(


It is listening to 4 devices, so not sure why power button isn't working, but if you have acpi on, you might make sure it's not activated when playing with switchd.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Leonardo.b
Apprentice
Apprentice


Joined: 10 Oct 2020
Posts: 294

PostPosted: Sat Mar 05, 2022 4:45 pm    Post subject: Reply with quote

A lot of interesting stuff on that site. Bookmarked, thanks for sharing.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3343
Location: Rasi, Finland

PostPosted: Sat Mar 05, 2022 5:48 pm    Post subject: Re: *sigh* Reply with quote

Anon-E-moose wrote:
It is listening to 4 devices, so not sure why power button isn't working, but if you have acpi on, you might make sure it's not activated when playing with switchd.
Code:
 $ pgrep -ai acpi
151 acpi_thermal_pm
I have set elogind to ignore all buttons and lid actions.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum