Re: elogind configuration

2022-10-20 Thread Csepp


Ludovic Courtès  writes:

> Hi,
>
> Antonio Carlos Padoan Junior  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.



Re: elogind configuration

2022-10-19 Thread Ludovic Courtès
Hi,

Antonio Carlos Padoan Junior  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’.



Re: elogind configuration

2022-10-15 Thread Tobias Geerinckx-Rice

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


signature.asc
Description: PGP signature


Re: elogind configuration

2022-10-15 Thread Antonio Carlos Padoan Junior


Hello Tobias,

thanks for your answer,


Tobias Geerinckx-Rice  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



Re: elogind configuration

2022-10-15 Thread Tobias Geerinckx-Rice

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


signature.asc
Description: PGP signature


elogind configuration

2022-10-15 Thread Antonio Carlos Padoan Junior
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