unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* elogind configuration
       [not found] <87mt9xh02z.fsf.ref@yahoo.com.br>
@ 2022-10-15 10:07 ` Antonio Carlos Padoan Junior
  2022-10-15 10:28   ` Tobias Geerinckx-Rice
  2022-10-19  9:53   ` Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Antonio Carlos Padoan Junior @ 2022-10-15 10:07 UTC (permalink / raw)
  To: guix-devel

Hello Guixers,

I do not know why but "suspend" stopped working on my computer
after a recent upgrade (pull & reconfigure).

I tried to overcome it by modifying elogind configuration in my system.
I modified my config like this:

(define %my-desktop-services
  ;; List of desktop services that supports a broader range of scanners.
  (modify-services %desktop-services
    (sane-service-type _ => sane-backends)
    (elogind-service-type config =>
                          (elogind-configuration
                           (inherit config)
                           (suspend-state '("freeze"))))))

The %my-desktop-services is been used later like this:

(services (append (list (service ...) (service ...))
                    %my-desktop-services))


I was hoping that configuring suspend-state variable to "freeze" instead of the
defaults could eventually fix my issue.

However I'm intrigued because my
/run/current-system/profile/etc/elogind/logind.conf
file seems not to had changed at all (all lines are still commented). I was expecting 
to see at least the following line changed after the system reconfigure
(and reboot):
#SuspendState=mem standby freeze

But no.

What I'm missing in my %my-desktop-services definition? 
Am I in the good track?

Best regards,
-- 
Antonio Carlos PADOAN JUNIOR
GPG fingerprint:
243F 237F 2DD3 4DCA 4EA3  1341 2481 90F9 B421 A6C9


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: elogind configuration
  2022-10-15 10:07 ` elogind configuration Antonio Carlos Padoan Junior
@ 2022-10-15 10:28   ` Tobias Geerinckx-Rice
  2022-10-19  9:53   ` Ludovic Courtès
  1 sibling, 0 replies; 6+ messages in thread
From: Tobias Geerinckx-Rice @ 2022-10-15 10:28 UTC (permalink / raw)
  To: Antonio Carlos Padoan Junior; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1281 bytes --]

Hi Antonio!

Antonio Carlos Padoan Junior 写道:
> I do not know why but "suspend" stopped working on my computer
> after a recent upgrade (pull & reconfigure).

Do you still have a working system generation to compare?

Does suspending without elogind work?  E.g., using the more 
reliable

  ~ λ echo "mem" | sudo tee /sys/power/state # or "freeze"

user interface.

Is anything interesting logged (in ‘sudo dmesg’, or the aggregate 
/var/log/messages) when it fails?

If all else fails, try reconfiguring and rebooting with an older 
kernel, e.g.,

  (use-modules (gnu packages linux) …)
  (operating-system
    …
    (kernel linux-libre-5.15)
    …)

> I was hoping that configuring suspend-state variable to "freeze" 
> instead of the
> defaults could eventually fix my issue.

I know you probably know this, but I must point out for the 
archives that this drains your battery (and/or wallet) faster.

> /run/current-system/profile/etc/elogind/logind.conf

What made you find/look at this file?  It's not used.  I don't 
know why it exists.

You can view the configuration file of the currently running 
elogind with

  ~ λ sudo grep -0a ELOGIND_CONF_FILE /proc/$(pgrep 
  elogind)/environ

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: elogind configuration
       [not found] <8735bpguyh.fsf.ref@yahoo.com.br>
@ 2022-10-15 11:57 ` Antonio Carlos Padoan Junior
  2022-10-15 12:13   ` Tobias Geerinckx-Rice
  0 siblings, 1 reply; 6+ messages in thread
From: Antonio Carlos Padoan Junior @ 2022-10-15 11:57 UTC (permalink / raw)
  To: guix-devel


Hello Tobias,

thanks for your answer,


Tobias Geerinckx-Rice <me@tobias.gr> writes:

>
> Do you still have a working system generation to compare?

Yes, I will check an old generation, at the end this is one of the
reasons guix is great.

>
> Does suspending without elogind work?  E.g., using the more reliable
>
>  ~ λ echo "mem" | sudo tee /sys/power/state # or "freeze"

Oh, I tried something similar but I couldn't make it work. I tried your
recipe with "freeze" and it works nicely!  

> user interface.
>
> Is anything interesting logged (in ‘sudo dmesg’, or the aggregate
> /var/log/messages) when it fails?

I will investigate further.

> If all else fails, try reconfiguring and rebooting with an older
> kernel, e.g.,
>
>  (use-modules (gnu packages linux) …)
>  (operating-system
>    …
>    (kernel linux-libre-5.15)
>    …)

yep. 

>
> I know you probably know this, but I must point out for the archives
> that this drains your battery (and/or wallet) faster.

This is a desktop computer I use at home. My objective is to save (some)
energy. This is preferable than nothing. But I think I will choose
another kernel version instead or investigate further. 

>> /run/current-system/profile/etc/elogind/logind.conf
>
> What made you find/look at this file?  It's not used.  I don't know
> why it exists.
>

Oh, I was on the wrong track. :)

> You can view the configuration file of the currently running elogind
> with
>
>  ~ λ sudo grep -0a ELOGIND_CONF_FILE /proc/$(pgrep   elogind)/environ
>

yes now I see elogind is correctly configured and working as expected!
I think I needed to reboot after system reconfigure or whatever.

Thank you again!

Best regards,
-- 
Antonio Carlos PADOAN JUNIOR
GPG fingerprint:
243F 237F 2DD3 4DCA 4EA3  1341 2481 90F9 B421 A6C9


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: elogind configuration
  2022-10-15 11:57 ` Antonio Carlos Padoan Junior
@ 2022-10-15 12:13   ` Tobias Geerinckx-Rice
  0 siblings, 0 replies; 6+ messages in thread
From: Tobias Geerinckx-Rice @ 2022-10-15 12:13 UTC (permalink / raw)
  To: Antonio Carlos Padoan Junior; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]

Antonio Carlos Padoan Junior 写道:
> I will investigate further.

All right!

>>> /run/current-system/profile/etc/elogind/logind.conf
>>
>> What made you find/look at this file?  It's not used.  I don't 
>> know
>> why it exists.
>>
>
> Oh, I was on the wrong track. :)

Ah, so it exists as a funny prank!  That's good.

(Or maybe it isn't.)

This obvious trap bugs me, but I'm not sure what to do about it. 
That's why I asked how you found it.

- I do like the fact that /gnu/store/xxx is a little microcosm of 
  what the package thinks its world should look like—including 
  /etc.

- Patching hundreds of packages to ‘make 
  sysconfdir=$out/share/doc/examples install’ or so is no 
  improvement.

- /run/current-system/profile/etc *is* the actual system 
  configuration for at least one thing (etc/ssl) so we can't 
  simply delete the former to enforce /etc usage and reduce user 
  confusion.

But this is a tangent.  Happy debuggings,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: elogind configuration
  2022-10-15 10:07 ` elogind configuration Antonio Carlos Padoan Junior
  2022-10-15 10:28   ` Tobias Geerinckx-Rice
@ 2022-10-19  9:53   ` Ludovic Courtès
  2022-10-20 13:06     ` Csepp
  1 sibling, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2022-10-19  9:53 UTC (permalink / raw)
  To: Antonio Carlos Padoan Junior; +Cc: guix-devel

Hi,

Antonio Carlos Padoan Junior <acpadoanjr@yahoo.com.br> skribis:

> I do not know why but "suspend" stopped working on my computer
> after a recent upgrade (pull & reconfigure).

By that you mean that ‘loginctl suspend’ doesn’t have any effect?

I’ve just tried on my laptop and it works for me with this system
generation:

--8<---------------cut here---------------start------------->8---
$ guix system describe
Generation 204  Oct 10 2022 00:29:29    (current)
  file name: /var/guix/profiles/system-204-link
  canonical file name: /gnu/store/yvaj9yi25rm16q9j6jccviaf5i55hk83-system
  label: GNU with Linux-Libre 5.19.14
  bootloader: grub-efi
  root device: label: "root"
  kernel: /gnu/store/8s41d36dgb700p3g5jbgl5vy7wi7lbsw-linux-libre-5.19.14/bzImage
  channels:
    guix:
      repository URL: https://git.savannah.gnu.org/git/guix.git
      branch: master
      commit: e827d45db92d6e1f9dc68199cd40cb5d67de9d46
  configuration file: /gnu/store/p4w6x2q9x9cakslb0n6qcqyydn5y0a8m-configuration.scm
--8<---------------cut here---------------end--------------->8---

> However I'm intrigued because my
> /run/current-system/profile/etc/elogind/logind.conf

As Tobias wrote, it’s a trap.  :-)

The config file that’s actually use can be found like so:

--8<---------------cut here---------------start------------->8---
$ sudo herd status elogind
Status of elogind:
  It is started.
  Running value is 347.
  It is enabled.
  Provides (elogind).
  Requires (dbus-system).
  Conflicts with ().
  Will be respawned.
$ sudo cat /proc/347/environ |xargs -0
ELOGIND_CONF_FILE=/gnu/store/z14j9xi29aci66d2akcflbgxzwm4lg8q-logind.conf
--8<---------------cut here---------------end--------------->8---

I guess we could improve that user interface.

Ludo’.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: elogind configuration
  2022-10-19  9:53   ` Ludovic Courtès
@ 2022-10-20 13:06     ` Csepp
  0 siblings, 0 replies; 6+ messages in thread
From: Csepp @ 2022-10-20 13:06 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Antonio Carlos Padoan Junior, guix-devel


Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Antonio Carlos Padoan Junior <acpadoanjr@yahoo.com.br> skribis:
>
>> I do not know why but "suspend" stopped working on my computer
>> after a recent upgrade (pull & reconfigure).
>
> By that you mean that ‘loginctl suspend’ doesn’t have any effect?
>
> I’ve just tried on my laptop and it works for me with this system
> generation:
>
> $ guix system describe
> Generation 204  Oct 10 2022 00:29:29    (current)
>   file name: /var/guix/profiles/system-204-link
>   canonical file name: /gnu/store/yvaj9yi25rm16q9j6jccviaf5i55hk83-system
>   label: GNU with Linux-Libre 5.19.14
>   bootloader: grub-efi
>   root device: label: "root"
>   kernel: /gnu/store/8s41d36dgb700p3g5jbgl5vy7wi7lbsw-linux-libre-5.19.14/bzImage
>   channels:
>     guix:
>       repository URL: https://git.savannah.gnu.org/git/guix.git
>       branch: master
>       commit: e827d45db92d6e1f9dc68199cd40cb5d67de9d46
>   configuration file: /gnu/store/p4w6x2q9x9cakslb0n6qcqyydn5y0a8m-configuration.scm
>
>
>> However I'm intrigued because my
>> /run/current-system/profile/etc/elogind/logind.conf
>
> As Tobias wrote, it’s a trap.  :-)
>
> The config file that’s actually use can be found like so:
>
> $ sudo herd status elogind
> Status of elogind:
>   It is started.
>   Running value is 347.
>   It is enabled.
>   Provides (elogind).
>   Requires (dbus-system).
>   Conflicts with ().
>   Will be respawned.
> $ sudo cat /proc/347/environ |xargs -0
> ELOGIND_CONF_FILE=/gnu/store/z14j9xi29aci66d2akcflbgxzwm4lg8q-logind.conf
>
> I guess we could improve that user interface.
>
> Ludo’.

I have that issue on my netbook which uses Slim as a display manager to
launch an i3wm session.  It looks like Slim isn't launching dbus, which
also breaks a host of other things, like managing removable storage
devices.

The problem is not present on my x64 machine where I manually launch Sway
with dbus-run-session.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-20 16:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87mt9xh02z.fsf.ref@yahoo.com.br>
2022-10-15 10:07 ` elogind configuration Antonio Carlos Padoan Junior
2022-10-15 10:28   ` Tobias Geerinckx-Rice
2022-10-19  9:53   ` Ludovic Courtès
2022-10-20 13:06     ` Csepp
     [not found] <8735bpguyh.fsf.ref@yahoo.com.br>
2022-10-15 11:57 ` Antonio Carlos Padoan Junior
2022-10-15 12:13   ` Tobias Geerinckx-Rice

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).