all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Getting Guix to shutdown my laptop properly with Sway and no DE
@ 2023-07-04 19:26 danclm--- via
  2023-07-04 21:19 ` Robby Zambito
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: danclm--- via @ 2023-07-04 19:26 UTC (permalink / raw)
  To: Help Guix


Hello everyone!

My T420 with Guix (no DE, only SDDM + Elogind + Sway) hangs during shutdown after running loginctl poweroff/reboot or /sbin/shutdown /sbin/reboot. It just sits there and only resolution is hard poweroff. It happens often.

Is there something that I'm missing in my system.scm?

```
;; My Guix config with the SwayWM 

(use-modules
  (gnu) (gnu system nss) (gnu system setuid))
(use-service-modules
  dbus desktop networking sddm sound ssh)
(use-package-modules
  certs              
  compression        
  disk               
  emacs              
  finance            
  fonts           
  fontutils          
  freedesktop        
  glib              
  games              
  gnome              
  gnupg              
  gnuzilla          
  gtk                
  haskell-xyz      
  image             
  libreoffice        
  linux
  package-management 
  password-utils    
  pulseaudio         
  rsync              
  ruby               
  ssh                
  terminals          
  tex                
  texinfo           
  version-control   
  wm)                

(operating-system
(host-name "t420")
(timezone "Europe/Rome")
(locale "en_US.utf8")

  ;; Keyboard layout.
  (keyboard-layout (keyboard-layout "us"))

  ;; Bootloader
  (bootloader (bootloader-configuration
               (bootloader grub-bootloader)
       (terminal-outputs '(console))
               (targets (list "/dev/sda"))
               (keyboard-layout keyboard-layout)))

  ;; Specify a mapped device for the encrypted root partition.
  ;; The UUID is that returned by 'cryptsetup luksUUID'.
  (mapped-devices
   (list (mapped-device
          (source (uuid "8022876e-e0cc-4ec5-8363-0f07c590cdbc"))
          (targets (list "guix-root"))
          (type luks-device-mapping))))

  (file-systems
   (append
    (list (file-system
           (device (file-system-label "guix-root"))
           (mount-point "/")
           (type "ext4")
           (dependencies mapped-devices)))
         %base-file-systems))

  (swap-devices (list
(swap-space (target "/swapfile"))))

  ;; Define users and groups.
  (users
   (cons (user-account
          (name "dani")
          (comment "")
          (group "users")
          (home-directory "/home/dani")
          (supplementary-groups '("wheel" "netdev"
                                  "audio" "video" "input")))
         %base-user-accounts))

  ;; Sudoers
  (sudoers-file
   (plain-file "sudoers" "\
%root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL
%wheel ALL=(ALL) NOPASSWD: /run/current-system/profile/sbin/reboot\n"))
    
  ;; This is where we specify system-wide packages.
  (packages
   (append
    (list
     adwaita-icon-theme
     alacritty
     at-spi2-core
     dbus
     emacs
     font-awesome
     fontconfig
     font-dejavu
     font-gnu-unifont
     fzf
     git
     gnupg
     grim
     gtypist
     icecat
     keepassxc
     ledger
     libreoffice
     nss-certs
     openssh-sans-x
     pandoc
     parted
     pass-otp
     password-store
     pavucontrol
     pinentry
     pulseaudio
     rsync
     ruby-asciidoctor
     slurp
     stow
     sway
     swayidle
     swaylock-effects
     texinfo
     texlive-base
     unzip
     waybar
     xdg-utils
     zip)
    %base-packages))

  ;; Some programs need to run with “root” privileges, even when they are launched by unprivileged users
  (setuid-programs (cons*
    (setuid-program
                     (program
      (file-append swaylock-effects "/bin/swaylock")))
                    %setuid-programs))
  
  ;; Services
  (services
   (cons*
    (service alsa-service-type
     (alsa-configuration
      (pulseaudio? #t)))
    (service dbus-root-service-type)
    (service elogind-service-type)
    (service openssh-service-type
     (openssh-configuration
              (openssh openssh-sans-x)
              (port-number 22)
              (password-authentication? #f)
      (permit-root-login 'prohibit-password)
              (authorized-keys
               `(("dani" ,(local-file "/home/dani/.ssh/authorized_keys"))))))
    (service polkit-service-type)
    (service sddm-service-type
       (sddm-configuration
  (auto-login-user "dani")
  (display-server "wayland")))
    ;; Static networking for one NIC, IPv4-only.
    (service static-networking-service-type
             (list (static-networking
                    (addresses
                     (list (network-address
                            (device "wlp1s0")
                            (value "192.168.1.200/24"))))
                    (routes
                     (list (network-route
                            (destination "default")
                            (gateway "192.168.1.1"))))
                    (name-servers '("1.1.1.1" "1.0.0.1")))))
    (service wpa-supplicant-service-type
     (wpa-supplicant-configuration
      (config-file "/etc/wpa-supplicant/wpa-supplicant.conf")
      (interface "wlp1s0")))    
    %base-services))

  ;; Allow resolution of '.local' host names with mDNS.
  (name-service-switch %mdns-host-lookup-nss))
```

Thank you in advance,

Greetings



-- 



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

* Re: Getting Guix to shutdown my laptop properly with Sway and no DE
  2023-07-04 19:26 Getting Guix to shutdown my laptop properly with Sway and no DE danclm--- via
@ 2023-07-04 21:19 ` Robby Zambito
  2023-07-04 22:12   ` danclm--- via
  2023-07-05  1:11 ` Skyler Ferris
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Robby Zambito @ 2023-07-04 21:19 UTC (permalink / raw)
  To: danclm; +Cc: help-guix

Hi,

I don't have any suggestions for you, I just wish to add that I am also
having the same issue, and I use Sway and Elogind (but no display
manager). I have been dealing with it by hard powering off also, but it
would be nice to have a proper solution :)

Robby


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

* Re: Getting Guix to shutdown my laptop properly with Sway and no DE
  2023-07-04 21:19 ` Robby Zambito
@ 2023-07-04 22:12   ` danclm--- via
  2023-07-05  2:44     ` Robby Zambito
  0 siblings, 1 reply; 13+ messages in thread
From: danclm--- via @ 2023-07-04 22:12 UTC (permalink / raw)
  To: Robby Zambito; +Cc: help-guix

Hi Robby, 
thanks for your response.

Do you mind sharing your config? 
I never managed on Guix to autologin and automatically start Sway without a display manager.

Daniele
-- 

Jul 4, 2023, 23:21 by contact@robbyzambito.me:

> Hi,
>
> I don't have any suggestions for you, I just wish to add that I am also
> having the same issue, and I use Sway and Elogind (but no display
> manager). I have been dealing with it by hard powering off also, but it
> would be nice to have a proper solution :)
>
> Robby
>


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

* Re: Getting Guix to shutdown my laptop properly with Sway and no DE
  2023-07-04 19:26 Getting Guix to shutdown my laptop properly with Sway and no DE danclm--- via
  2023-07-04 21:19 ` Robby Zambito
@ 2023-07-05  1:11 ` Skyler Ferris
  2023-07-05  5:25 ` Ignas Lapėnas
  2023-08-09 12:41 ` bug#65178: Shepherd hangs (was: Getting Guix to shutdown my laptop properly with Sway and no DE) Hilton Chain via Bug reports for GNU Guix
  3 siblings, 0 replies; 13+ messages in thread
From: Skyler Ferris @ 2023-07-05  1:11 UTC (permalink / raw)
  To: help-guix

On 7/4/23 12:26, danclm--- via wrote:
> Hello everyone!
>
> My T420 with Guix (no DE, only SDDM + Elogind + Sway) hangs during shutdown after running loginctl poweroff/reboot or /sbin/shutdown /sbin/reboot. It just sits there and only resolution is hard poweroff. It happens often.

In case this is relevant I am experiencing a similar issue in a VM 
running kmscon. I /think/ it happens when I reconfigure my system in a 
way that changes the services running on the OS (maybe the user services 
too, I don't run any at the moment) but this is based on anecdotal 
observations, I haven't found time to thoroughly test or root-cause 
anything. So it might be a different issue with the same symptom, or 
Sway might not be a relevant detail (or both).



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

* Re: Getting Guix to shutdown my laptop properly with Sway and no DE
  2023-07-04 22:12   ` danclm--- via
@ 2023-07-05  2:44     ` Robby Zambito
  0 siblings, 0 replies; 13+ messages in thread
From: Robby Zambito @ 2023-07-05  2:44 UTC (permalink / raw)
  To: danclm; +Cc: help-guix


danclm@tutanota.com writes:

> Hi Robby, 
> thanks for your response.
>
> Do you mind sharing your config? 
> I never managed on Guix to autologin and automatically start Sway without a display manager.
>
> Daniele

Hi Daniele,

I actually don't have auto login / auto start Sway - I just login with a
TTY, and then I use `herd start sway` with a little guix home service
that I wrote:

(shepherd-service
  (documentation "SwayWM")
  (provision '(sway))
  (requirement '(dbus))
  (respawn? #f)
  (auto-start? #f)
  (start #~(make-forkexec-constructor
            (list #$(file-append (specification->package "dbus") "/bin/dbus-run-session") "sway")
            #:log-file (string-append #$log-dir "/swaywm.log")))
  (stop #~(make-system-destructor
           (string-join (list #$(file-append (specification->package "sway") "/bin/swaymsg")
                              "exit")))))

This isn't perfect (I use the system sway binary, but I use swaymsg from
my home profile - which means they can be different package version; and
herd stop sway doesn't work), but it's been good enough for me to not
care to fix.


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

* Re: Getting Guix to shutdown my laptop properly with Sway and no DE
  2023-07-04 19:26 Getting Guix to shutdown my laptop properly with Sway and no DE danclm--- via
  2023-07-04 21:19 ` Robby Zambito
  2023-07-05  1:11 ` Skyler Ferris
@ 2023-07-05  5:25 ` Ignas Lapėnas
  2023-07-17  8:06   ` Etienne B. Roesch
  2023-08-09 12:41 ` bug#65178: Shepherd hangs (was: Getting Guix to shutdown my laptop properly with Sway and no DE) Hilton Chain via Bug reports for GNU Guix
  3 siblings, 1 reply; 13+ messages in thread
From: Ignas Lapėnas @ 2023-07-05  5:25 UTC (permalink / raw)
  Cc: help-guix

Hello,

I have the same (or extremely similiar) issue. It seems that it is because of
shepherd. The system seems to work alright, although can’t communicate with it
at all. For some reason it hangs. Tried looking for logs for the program, sadly
I’m extremely new to Gnu Guix and still stuck here. :(

(Writing this out with an idea that it might maybe help)

danclm— via <help-guix@gnu.org> writes:

> Hello everyone!
>
> My T420 with Guix (no DE, only SDDM + Elogind + Sway) hangs during shutdown
> after running loginctl poweroff/reboot or /sbin/shutdown /sbin/reboot. It just
> sits there and only resolution is hard poweroff. It happens often.
>
> Is there something that I’m missing in my system.scm?
>
> ```
> ;; My Guix config with the SwayWM 
>
> (use-modules
>   (gnu) (gnu system nss) (gnu system setuid))
> (use-service-modules
>   dbus desktop networking sddm sound ssh)
> (use-package-modules
>   certs              
>   compression        
>   disk               
>   emacs              
>   finance            
>   fonts           
>   fontutils          
>   freedesktop        
>   glib              
>   games              
>   gnome              
>   gnupg              
>   gnuzilla          
>   gtk                
>   haskell-xyz      
>   image             
>   libreoffice        
>   linux
>   package-management 
>   password-utils    
>   pulseaudio         
>   rsync              
>   ruby               
>   ssh                
>   terminals          
>   tex                
>   texinfo           
>   version-control   
>   wm)                
>
> (operating-system
> (host-name “t420”)
> (timezone “Europe/Rome”)
> (locale “en_US.utf8”)
>
>   ;; Keyboard layout.
>   (keyboard-layout (keyboard-layout “us”))
>
>   ;; Bootloader
>   (bootloader (bootloader-configuration
>                (bootloader grub-bootloader)
>        (terminal-outputs ’(console))
>                (targets (list “/dev/sda”))
>                (keyboard-layout keyboard-layout)))
>
>   ;; Specify a mapped device for the encrypted root partition.
>   ;; The UUID is that returned by ’cryptsetup luksUUID’.
>   (mapped-devices
>    (list (mapped-device
>           (source (uuid “8022876e-e0cc-4ec5-8363-0f07c590cdbc”))
>           (targets (list “guix-root”))
>           (type luks-device-mapping))))
>
>   (file-systems
>    (append
>     (list (file-system
>            (device (file-system-label “guix-root”))
>            (mount-point “/“)
>            (type ”ext4“)
>            (dependencies mapped-devices)))
>          %base-file-systems))
>
>   (swap-devices (list
> (swap-space (target ”/swapfile“))))
>
>   ;; Define users and groups.
>   (users
>    (cons (user-account
>           (name ”dani“)
>           (comment ”“)
>           (group ”users“)
>           (home-directory ”/home/dani“)
>           (supplementary-groups ’(”wheel“ ”netdev“
>                                   ”audio“ ”video“ ”input“)))
>          %base-user-accounts))
>
>   ;; Sudoers
>   (sudoers-file
>    (plain-file ”sudoers“ ”\
> %root ALL=(ALL) ALL
> %wheel ALL=(ALL) ALL
> %wheel ALL=(ALL) NOPASSWD: /run/current-system/profile/sbin/reboot\n“))
>     
>   ;; This is where we specify system-wide packages.
>   (packages
>    (append
>     (list
>      adwaita-icon-theme
>      alacritty
>      at-spi2-core
>      dbus
>      emacs
>      font-awesome
>      fontconfig
>      font-dejavu
>      font-gnu-unifont
>      fzf
>      git
>      gnupg
>      grim
>      gtypist
>      icecat
>      keepassxc
>      ledger
>      libreoffice
>      nss-certs
>      openssh-sans-x
>      pandoc
>      parted
>      pass-otp
>      password-store
>      pavucontrol
>      pinentry
>      pulseaudio
>      rsync
>      ruby-asciidoctor
>      slurp
>      stow
>      sway
>      swayidle
>      swaylock-effects
>      texinfo
>      texlive-base
>      unzip
>      waybar
>      xdg-utils
>      zip)
>     %base-packages))
>
>   ;; Some programs need to run with “root” privileges, even when they are launched by unprivileged users
>   (setuid-programs (cons*
>     (setuid-program
>                      (program
>       (file-append swaylock-effects ”/bin/swaylock“)))
>                     %setuid-programs))
>   
>   ;; Services
>   (services
>    (cons*
>     (service alsa-service-type
>      (alsa-configuration
>       (pulseaudio? #t)))
>     (service dbus-root-service-type)
>     (service elogind-service-type)
>     (service openssh-service-type
>      (openssh-configuration
>               (openssh openssh-sans-x)
>               (port-number 22)
>               (password-authentication? #f)
>       (permit-root-login ‘prohibit-password)
>               (authorized-keys
>                `((”dani“ ,(local-file ”/home/dani/.ssh/authorized_keys“))))))
>     (service polkit-service-type)
>     (service sddm-service-type
>        (sddm-configuration
>   (auto-login-user ”dani“)
>   (display-server ”wayland“)))
>     ;; Static networking for one NIC, IPv4-only.
>     (service static-networking-service-type
>              (list (static-networking
>                     (addresses
>                      (list (network-address
>                             (device ”wlp1s0“)
>                             (value ”192.168.1.200/24“))))
>                     (routes
>                      (list (network-route
>                             (destination ”default“)
>                             (gateway ”192.168.1.1“))))
>                     (name-servers ’(”1.1.1.1“ ”1.0.0.1“)))))
>     (service wpa-supplicant-service-type
>      (wpa-supplicant-configuration
>       (config-file ”/etc/wpa-supplicant/wpa-supplicant.conf“)
>       (interface ”wlp1s0“)))    
>     %base-services))
>
>   ;; Allow resolution of ‘.local’ host names with mDNS.
>   (name-service-switch %mdns-host-lookup-nss))
> ```
>
> Thank you in advance,
>
> Greetings

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

* Re: Getting Guix to shutdown my laptop properly with Sway and no DE
  2023-07-05  5:25 ` Ignas Lapėnas
@ 2023-07-17  8:06   ` Etienne B. Roesch
  2023-07-17 14:18     ` Chris Keschnat
  0 siblings, 1 reply; 13+ messages in thread
From: Etienne B. Roesch @ 2023-07-17  8:06 UTC (permalink / raw)
  To: Ignas Lapėnas; +Cc: help-guix

Hi,

I think I have been having the same problem for a while, using standalone
guix system on a desktop. It seems to sort itself out after a pull and
system reconfigure, but then it breaks again: The countdown does not start
and hangs. I have to hard stop the desktop, which is fine but not exactly
what should be happening.

Etienne

On Sun, Jul 9, 2023 at 3:42 PM Ignas Lapėnas <ignas@lapenas.dev> wrote:

> Hello,
>
> I have the same (or extremely similiar) issue. It seems that it is because
> of
> shepherd. The system seems to work alright, although can’t communicate
> with it
> at all. For some reason it hangs. Tried looking for logs for the program,
> sadly
> I’m extremely new to Gnu Guix and still stuck here. :(
>
> (Writing this out with an idea that it might maybe help)
>
> danclm— via <help-guix@gnu.org> writes:
>
> > Hello everyone!
> >
> > My T420 with Guix (no DE, only SDDM + Elogind + Sway) hangs during
> shutdown
> > after running loginctl poweroff/reboot or /sbin/shutdown /sbin/reboot.
> It just
> > sits there and only resolution is hard poweroff. It happens often.
> >
> > Is there something that I’m missing in my system.scm?
> >
> > ```
> > ;; My Guix config with the SwayWM
> >
> > (use-modules
> >   (gnu) (gnu system nss) (gnu system setuid))
> > (use-service-modules
> >   dbus desktop networking sddm sound ssh)
> > (use-package-modules
> >   certs
> >   compression
> >   disk
> >   emacs
> >   finance
> >   fonts
> >   fontutils
> >   freedesktop
> >   glib
> >   games
> >   gnome
> >   gnupg
> >   gnuzilla
> >   gtk
> >   haskell-xyz
> >   image
> >   libreoffice
> >   linux
> >   package-management
> >   password-utils
> >   pulseaudio
> >   rsync
> >   ruby
> >   ssh
> >   terminals
> >   tex
> >   texinfo
> >   version-control
> >   wm)
> >
> > (operating-system
> > (host-name “t420”)
> > (timezone “Europe/Rome”)
> > (locale “en_US.utf8”)
> >
> >   ;; Keyboard layout.
> >   (keyboard-layout (keyboard-layout “us”))
> >
> >   ;; Bootloader
> >   (bootloader (bootloader-configuration
> >                (bootloader grub-bootloader)
> >        (terminal-outputs ’(console))
> >                (targets (list “/dev/sda”))
> >                (keyboard-layout keyboard-layout)))
> >
> >   ;; Specify a mapped device for the encrypted root partition.
> >   ;; The UUID is that returned by ’cryptsetup luksUUID’.
> >   (mapped-devices
> >    (list (mapped-device
> >           (source (uuid “8022876e-e0cc-4ec5-8363-0f07c590cdbc”))
> >           (targets (list “guix-root”))
> >           (type luks-device-mapping))))
> >
> >   (file-systems
> >    (append
> >     (list (file-system
> >            (device (file-system-label “guix-root”))
> >            (mount-point “/“)
> >            (type ”ext4“)
> >            (dependencies mapped-devices)))
> >          %base-file-systems))
> >
> >   (swap-devices (list
> > (swap-space (target ”/swapfile“))))
> >
> >   ;; Define users and groups.
> >   (users
> >    (cons (user-account
> >           (name ”dani“)
> >           (comment ”“)
> >           (group ”users“)
> >           (home-directory ”/home/dani“)
> >           (supplementary-groups ’(”wheel“ ”netdev“
> >                                   ”audio“ ”video“ ”input“)))
> >          %base-user-accounts))
> >
> >   ;; Sudoers
> >   (sudoers-file
> >    (plain-file ”sudoers“ ”\
> > %root ALL=(ALL) ALL
> > %wheel ALL=(ALL) ALL
> > %wheel ALL=(ALL) NOPASSWD: /run/current-system/profile/sbin/reboot\n“))
> >
> >   ;; This is where we specify system-wide packages.
> >   (packages
> >    (append
> >     (list
> >      adwaita-icon-theme
> >      alacritty
> >      at-spi2-core
> >      dbus
> >      emacs
> >      font-awesome
> >      fontconfig
> >      font-dejavu
> >      font-gnu-unifont
> >      fzf
> >      git
> >      gnupg
> >      grim
> >      gtypist
> >      icecat
> >      keepassxc
> >      ledger
> >      libreoffice
> >      nss-certs
> >      openssh-sans-x
> >      pandoc
> >      parted
> >      pass-otp
> >      password-store
> >      pavucontrol
> >      pinentry
> >      pulseaudio
> >      rsync
> >      ruby-asciidoctor
> >      slurp
> >      stow
> >      sway
> >      swayidle
> >      swaylock-effects
> >      texinfo
> >      texlive-base
> >      unzip
> >      waybar
> >      xdg-utils
> >      zip)
> >     %base-packages))
> >
> >   ;; Some programs need to run with “root” privileges, even when they
> are launched by unprivileged users
> >   (setuid-programs (cons*
> >     (setuid-program
> >                      (program
> >       (file-append swaylock-effects ”/bin/swaylock“)))
> >                     %setuid-programs))
> >
> >   ;; Services
> >   (services
> >    (cons*
> >     (service alsa-service-type
> >      (alsa-configuration
> >       (pulseaudio? #t)))
> >     (service dbus-root-service-type)
> >     (service elogind-service-type)
> >     (service openssh-service-type
> >      (openssh-configuration
> >               (openssh openssh-sans-x)
> >               (port-number 22)
> >               (password-authentication? #f)
> >       (permit-root-login ‘prohibit-password)
> >               (authorized-keys
> >                `((”dani“ ,(local-file
> ”/home/dani/.ssh/authorized_keys“))))))
> >     (service polkit-service-type)
> >     (service sddm-service-type
> >        (sddm-configuration
> >   (auto-login-user ”dani“)
> >   (display-server ”wayland“)))
> >     ;; Static networking for one NIC, IPv4-only.
> >     (service static-networking-service-type
> >              (list (static-networking
> >                     (addresses
> >                      (list (network-address
> >                             (device ”wlp1s0“)
> >                             (value ”192.168.1.200/24“))))
> >                     (routes
> >                      (list (network-route
> >                             (destination ”default“)
> >                             (gateway ”192.168.1.1“))))
> >                     (name-servers ’(”1.1.1.1“ ”1.0.0.1“)))))
> >     (service wpa-supplicant-service-type
> >      (wpa-supplicant-configuration
> >       (config-file ”/etc/wpa-supplicant/wpa-supplicant.conf“)
> >       (interface ”wlp1s0“)))
> >     %base-services))
> >
> >   ;; Allow resolution of ‘.local’ host names with mDNS.
> >   (name-service-switch %mdns-host-lookup-nss))
> > ```
> >
> > Thank you in advance,
> >
> > Greetings
>

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

* Re: Getting Guix to shutdown my laptop properly with Sway and no DE
  2023-07-17  8:06   ` Etienne B. Roesch
@ 2023-07-17 14:18     ` Chris Keschnat
  0 siblings, 0 replies; 13+ messages in thread
From: Chris Keschnat @ 2023-07-17 14:18 UTC (permalink / raw)
  To: help-guix


Same issue here, quite often. But I have no idea what's happening and no
logs ;/

"Etienne B. Roesch" <etienne.roesch@gmail.com> writes:

> Hi,
>
> I think I have been having the same problem for a while, using standalone
> guix system on a desktop. It seems to sort itself out after a pull and
> system reconfigure, but then it breaks again: The countdown does not start
> and hangs. I have to hard stop the desktop, which is fine but not exactly
> what should be happening.
>
> Etienne
>
> On Sun, Jul 9, 2023 at 3:42 PM Ignas Lapėnas <ignas@lapenas.dev> wrote:
>
>> Hello,
>>
>> I have the same (or extremely similiar) issue. It seems that it is because
>> of
>> shepherd. The system seems to work alright, although can’t communicate
>> with it
>> at all. For some reason it hangs. Tried looking for logs for the program,
>> sadly
>> I’m extremely new to Gnu Guix and still stuck here. :(
>>
>> (Writing this out with an idea that it might maybe help)
>>
>> danclm— via <help-guix@gnu.org> writes:
>>
>> > Hello everyone!
>> >
>> > My T420 with Guix (no DE, only SDDM + Elogind + Sway) hangs during
>> shutdown
>> > after running loginctl poweroff/reboot or /sbin/shutdown /sbin/reboot.
>> It just
>> > sits there and only resolution is hard poweroff. It happens often.
>> >
>> > Is there something that I’m missing in my system.scm?
>> >
>> > ```
>> > ;; My Guix config with the SwayWM
>> >
>> > (use-modules
>> >   (gnu) (gnu system nss) (gnu system setuid))
>> > (use-service-modules
>> >   dbus desktop networking sddm sound ssh)
>> > (use-package-modules
>> >   certs
>> >   compression
>> >   disk
>> >   emacs
>> >   finance
>> >   fonts
>> >   fontutils
>> >   freedesktop
>> >   glib
>> >   games
>> >   gnome
>> >   gnupg
>> >   gnuzilla
>> >   gtk
>> >   haskell-xyz
>> >   image
>> >   libreoffice
>> >   linux
>> >   package-management
>> >   password-utils
>> >   pulseaudio
>> >   rsync
>> >   ruby
>> >   ssh
>> >   terminals
>> >   tex
>> >   texinfo
>> >   version-control
>> >   wm)
>> >
>> > (operating-system
>> > (host-name “t420”)
>> > (timezone “Europe/Rome”)
>> > (locale “en_US.utf8”)
>> >
>> >   ;; Keyboard layout.
>> >   (keyboard-layout (keyboard-layout “us”))
>> >
>> >   ;; Bootloader
>> >   (bootloader (bootloader-configuration
>> >                (bootloader grub-bootloader)
>> >        (terminal-outputs ’(console))
>> >                (targets (list “/dev/sda”))
>> >                (keyboard-layout keyboard-layout)))
>> >
>> >   ;; Specify a mapped device for the encrypted root partition.
>> >   ;; The UUID is that returned by ’cryptsetup luksUUID’.
>> >   (mapped-devices
>> >    (list (mapped-device
>> >           (source (uuid “8022876e-e0cc-4ec5-8363-0f07c590cdbc”))
>> >           (targets (list “guix-root”))
>> >           (type luks-device-mapping))))
>> >
>> >   (file-systems
>> >    (append
>> >     (list (file-system
>> >            (device (file-system-label “guix-root”))
>> >            (mount-point “/“)
>> >            (type ”ext4“)
>> >            (dependencies mapped-devices)))
>> >          %base-file-systems))
>> >
>> >   (swap-devices (list
>> > (swap-space (target ”/swapfile“))))
>> >
>> >   ;; Define users and groups.
>> >   (users
>> >    (cons (user-account
>> >           (name ”dani“)
>> >           (comment ”“)
>> >           (group ”users“)
>> >           (home-directory ”/home/dani“)
>> >           (supplementary-groups ’(”wheel“ ”netdev“
>> >                                   ”audio“ ”video“ ”input“)))
>> >          %base-user-accounts))
>> >
>> >   ;; Sudoers
>> >   (sudoers-file
>> >    (plain-file ”sudoers“ ”\
>> > %root ALL=(ALL) ALL
>> > %wheel ALL=(ALL) ALL
>> > %wheel ALL=(ALL) NOPASSWD: /run/current-system/profile/sbin/reboot\n“))
>> >
>> >   ;; This is where we specify system-wide packages.
>> >   (packages
>> >    (append
>> >     (list
>> >      adwaita-icon-theme
>> >      alacritty
>> >      at-spi2-core
>> >      dbus
>> >      emacs
>> >      font-awesome
>> >      fontconfig
>> >      font-dejavu
>> >      font-gnu-unifont
>> >      fzf
>> >      git
>> >      gnupg
>> >      grim
>> >      gtypist
>> >      icecat
>> >      keepassxc
>> >      ledger
>> >      libreoffice
>> >      nss-certs
>> >      openssh-sans-x
>> >      pandoc
>> >      parted
>> >      pass-otp
>> >      password-store
>> >      pavucontrol
>> >      pinentry
>> >      pulseaudio
>> >      rsync
>> >      ruby-asciidoctor
>> >      slurp
>> >      stow
>> >      sway
>> >      swayidle
>> >      swaylock-effects
>> >      texinfo
>> >      texlive-base
>> >      unzip
>> >      waybar
>> >      xdg-utils
>> >      zip)
>> >     %base-packages))
>> >
>> >   ;; Some programs need to run with “root” privileges, even when they
>> are launched by unprivileged users
>> >   (setuid-programs (cons*
>> >     (setuid-program
>> >                      (program
>> >       (file-append swaylock-effects ”/bin/swaylock“)))
>> >                     %setuid-programs))
>> >
>> >   ;; Services
>> >   (services
>> >    (cons*
>> >     (service alsa-service-type
>> >      (alsa-configuration
>> >       (pulseaudio? #t)))
>> >     (service dbus-root-service-type)
>> >     (service elogind-service-type)
>> >     (service openssh-service-type
>> >      (openssh-configuration
>> >               (openssh openssh-sans-x)
>> >               (port-number 22)
>> >               (password-authentication? #f)
>> >       (permit-root-login ‘prohibit-password)
>> >               (authorized-keys
>> >                `((”dani“ ,(local-file
>> ”/home/dani/.ssh/authorized_keys“))))))
>> >     (service polkit-service-type)
>> >     (service sddm-service-type
>> >        (sddm-configuration
>> >   (auto-login-user ”dani“)
>> >   (display-server ”wayland“)))
>> >     ;; Static networking for one NIC, IPv4-only.
>> >     (service static-networking-service-type
>> >              (list (static-networking
>> >                     (addresses
>> >                      (list (network-address
>> >                             (device ”wlp1s0“)
>> >                             (value ”192.168.1.200/24“))))
>> >                     (routes
>> >                      (list (network-route
>> >                             (destination ”default“)
>> >                             (gateway ”192.168.1.1“))))
>> >                     (name-servers ’(”1.1.1.1“ ”1.0.0.1“)))))
>> >     (service wpa-supplicant-service-type
>> >      (wpa-supplicant-configuration
>> >       (config-file ”/etc/wpa-supplicant/wpa-supplicant.conf“)
>> >       (interface ”wlp1s0“)))
>> >     %base-services))
>> >
>> >   ;; Allow resolution of ‘.local’ host names with mDNS.
>> >   (name-service-switch %mdns-host-lookup-nss))
>> > ```
>> >
>> > Thank you in advance,
>> >
>> > Greetings
>>


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

* bug#65178: Shepherd hangs (was: Getting Guix to shutdown my laptop properly with Sway and no DE)
  2023-07-04 19:26 Getting Guix to shutdown my laptop properly with Sway and no DE danclm--- via
                   ` (2 preceding siblings ...)
  2023-07-05  5:25 ` Ignas Lapėnas
@ 2023-08-09 12:41 ` Hilton Chain via Bug reports for GNU Guix
  2023-08-13 15:25   ` Hilton Chain via Bug reports for GNU Guix
  3 siblings, 1 reply; 13+ messages in thread
From: Hilton Chain via Bug reports for GNU Guix @ 2023-08-09 12:41 UTC (permalink / raw)
  To: 65178
  Cc: danclm, Robby Zambito, Skyler Ferris, Ignas Lapėnas,
	Etienne B. Roesch, Chris Keschnat

Hello!

I have experienced many instances of Shepherd hanging through my use
of Guix, though I don't have a clear record of when it first happened.

These days I have seen a few reports on the subject.  With a quick
search of recent bug reports, I can't find any related, only to find
this thread [1] on help-guix.  So I'll start a bug report here, but I
don't know how to debug Shepherd and I haven't found a way to
reproduce it stably.

I'm not sure if Shepherd hangs at usual, but most of the time I find
it already hanging is when doing a reconfiguration.  The
reconfiguration becomes unresponsive and it won't accept a ^C, herd
actions also hang.  This usually happens with home reconfiguration,
but I can remember once with system reconfiguration when adding and
deleting some services in the configuration file.

I'm not sure how Shepherd hangs either, because in the latter case
(system one) I can still see logs indicating that it's trying to
respawn a process I killed manually, even though that's just a output
and no processes are actually spawned.

And as shown in [1], there are also cases where Shepherd hangs at some
point in the halting process, usually after syslogd has been
terminated but before term-tty*.

(The termination message indicates that Shepherd is still functional,
and no logs after that point shows that that's a real action, but
because of this I can't know anything happened further either.  After
that I'm still able to switch ttys so I assume term-tty* are alive.)

Although I don't know how they are related, I have linked my
configurations below:
<https://codeberg.org/hako/Testament/src/branch/trunk/dorphine-home.scm>
<https://codeberg.org/hako/Testament/src/branch/trunk/dorphine-system.scm>

Thanks

[1]:
<https://lists.gnu.org/archive/html/help-guix/2023-07/msg00021.html>
(public-inbox mirror on yhetil.org)
<https://yhetil.org/guix/NZXMeM4--3-9@tutanota.com/t/#u>




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

* bug#65178: Shepherd hangs (was: Getting Guix to shutdown my laptop properly with Sway and no DE)
  2023-08-09 12:41 ` bug#65178: Shepherd hangs (was: Getting Guix to shutdown my laptop properly with Sway and no DE) Hilton Chain via Bug reports for GNU Guix
@ 2023-08-13 15:25   ` Hilton Chain via Bug reports for GNU Guix
  2023-08-15 13:20     ` Hilton Chain via Bug reports for GNU Guix
  0 siblings, 1 reply; 13+ messages in thread
From: Hilton Chain via Bug reports for GNU Guix @ 2023-08-13 15:25 UTC (permalink / raw)
  To: 65178

On Wed, 09 Aug 2023 20:41:44 +0800,
Hilton Chain wrote:
> I'm not sure if Shepherd hangs at usual, but most of the time I find
> it already hanging is when doing a reconfiguration.  The
> reconfiguration becomes unresponsive and it won't accept a ^C, herd
> actions also hang.  This usually happens with home reconfiguration,

Today I encountered the home reconfiguration issue.  The behavior is
similar to <https://issues.guix.gnu.org/54919>.

Ending part of output for the hanging reconfiguration:
--8<---------------cut here---------------start------------->8---
[...]
Symlinking /home/hako/.config/fontconfig/fonts.conf -> /gnu/store/fvvqbma1xxgisfcq7rrwihbw7jwnyliv-fonts.conf... done
Symlinking /home/hako/.gnupg/gpg-agent.conf -> /gnu/store/kfaz4zrxmfz6p72x47c7qrqvb873gbyi-gpg-agent.conf... done
Symlinking /home/hako/.ssh/config -> /gnu/store/xb6f584pwclg48fr28wl21v1mxplqp6f-ssh.conf... done
Symlinking /home/hako/.icons/default/index.theme -> /gnu/store/3sraq69nrs04ii0fjgk36aw2c57q6z27-icons.theme... done
 done
Finished updating symlinks.


--8<---------------cut here---------------end--------------->8---

And `herd status' also hangs:
--8<---------------cut here---------------start------------->8---
$ herd status

--8<---------------cut here---------------end--------------->8---




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

* bug#65178: Shepherd hangs (was: Getting Guix to shutdown my laptop properly with Sway and no DE)
  2023-08-13 15:25   ` Hilton Chain via Bug reports for GNU Guix
@ 2023-08-15 13:20     ` Hilton Chain via Bug reports for GNU Guix
  2023-09-02 20:49       ` Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Hilton Chain via Bug reports for GNU Guix @ 2023-08-15 13:20 UTC (permalink / raw)
  To: 65178

On Sun, 13 Aug 2023 23:25:59 +0800,
Hilton Chain wrote:
>
> Today I encountered the home reconfiguration issue.  The behavior is
> similar to <https://issues.guix.gnu.org/54919>.

And today Shepherd hung after starting a service [1], the service
itself started successfully (process started, logs available):
--8<---------------cut here---------------start------------->8---
$ sudo herd enable cloudflare-tunnel && sudo herd start cloudflare-tunnel
Enabled service cloudflare-tunnel.

--8<---------------cut here---------------end--------------->8---

[1]: <https://codeberg.org/hako/Rosenthal/src/commit/c7dc95c2932d7362673c28cdc2f52e6bb8357c18/rosenthal/services/child-error.scm#L151>




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

* bug#65178: Shepherd hangs (was: Getting Guix to shutdown my laptop properly with Sway and no DE)
  2023-08-15 13:20     ` Hilton Chain via Bug reports for GNU Guix
@ 2023-09-02 20:49       ` Ludovic Courtès
  2023-09-03  8:21         ` Hilton Chain via Bug reports for GNU Guix
  0 siblings, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2023-09-02 20:49 UTC (permalink / raw)
  To: Hilton Chain; +Cc: 65178

Hi!

Hilton Chain <hako@ultrarare.space> scribes:

> On Sun, 13 Aug 2023 23:25:59 +0800,
> Hilton Chain wrote:
>>
>> Today I encountered the home reconfiguration issue.  The behavior is
>> similar to <https://issues.guix.gnu.org/54919>.
>
> And today Shepherd hung after starting a service [1], the service
> itself started successfully (process started, logs available):

I’m assuming this is shepherd 0.10.2, right?

> $ sudo herd enable cloudflare-tunnel && sudo herd start cloudflare-tunnel
> Enabled service cloudflare-tunnel.
>
> [1]: <https://codeberg.org/hako/Rosenthal/src/commit/c7dc95c2932d7362673c28cdc2f52e6bb8357c18/rosenthal/services/child-error.scm#L151>

Is any of the services you’re using doing “non-standard things” such as
using constructors/destructors other than those provided by shepherd
(‘make-forkexec-constructor’ et al.)?

Is it reproducible, and do you think you could come up with a reduce
test case (for example by removing services from the config until you
reach the minimum)?

Thanks,
Ludo’.




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

* bug#65178: Shepherd hangs (was: Getting Guix to shutdown my laptop properly with Sway and no DE)
  2023-09-02 20:49       ` Ludovic Courtès
@ 2023-09-03  8:21         ` Hilton Chain via Bug reports for GNU Guix
  0 siblings, 0 replies; 13+ messages in thread
From: Hilton Chain via Bug reports for GNU Guix @ 2023-09-03  8:21 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 65178

On Sun, 03 Sep 2023 04:49:35 +0800,
Ludovic Courtès wrote:
>
> Hi!
>
> Hilton Chain <hako@ultrarare.space> scribes:
>
> > On Sun, 13 Aug 2023 23:25:59 +0800,
> > Hilton Chain wrote:
> >>
> >> Today I encountered the home reconfiguration issue.  The behavior is
> >> similar to <https://issues.guix.gnu.org/54919>.
> >
> > And today Shepherd hung after starting a service [1], the service
> > itself started successfully (process started, logs available):
>
> I’m assuming this is shepherd 0.10.2, right?


Yes!


>
> > $ sudo herd enable cloudflare-tunnel && sudo herd start cloudflare-tunnel
> > Enabled service cloudflare-tunnel.
> >
> > [1]: <https://codeberg.org/hako/Rosenthal/src/commit/c7dc95c2932d7362673c28cdc2f52e6bb8357c18/rosenthal/services/child-error.scm#L151>
>
> Is any of the services you’re using doing “non-standard things” such as
> using constructors/destructors other than those provided by shepherd
> (‘make-forkexec-constructor’ et al.)?


No, I'm unaware of such things.


> Is it reproducible, and do you think you could come up with a reduce
> test case (for example by removing services from the config until you
> reach the minimum)?


I still don't know which condition triggers it, so I can't make a test
case.

It's unreproducible.  And I don't think it's really related to the
config, since Shepherd won't hang when rebooting to a system
generation which made it hanging at reconfiguration before.

It might be related to bug#65419 ([Shepherd] Non-reponding service
control fiber) you have reported, since there's similar behavior that
`herd status nscd' still works when Shepherd hangs.

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

end of thread, other threads:[~2023-09-03  8:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-04 19:26 Getting Guix to shutdown my laptop properly with Sway and no DE danclm--- via
2023-07-04 21:19 ` Robby Zambito
2023-07-04 22:12   ` danclm--- via
2023-07-05  2:44     ` Robby Zambito
2023-07-05  1:11 ` Skyler Ferris
2023-07-05  5:25 ` Ignas Lapėnas
2023-07-17  8:06   ` Etienne B. Roesch
2023-07-17 14:18     ` Chris Keschnat
2023-08-09 12:41 ` bug#65178: Shepherd hangs (was: Getting Guix to shutdown my laptop properly with Sway and no DE) Hilton Chain via Bug reports for GNU Guix
2023-08-13 15:25   ` Hilton Chain via Bug reports for GNU Guix
2023-08-15 13:20     ` Hilton Chain via Bug reports for GNU Guix
2023-09-02 20:49       ` Ludovic Courtès
2023-09-03  8:21         ` Hilton Chain via Bug reports for GNU Guix

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.