bug#63045: Can't suspend and wakeup outside of gnome

2023-04-26 Thread Stefan Huchler
here is the part of the log that should show a crash from suspend.

Apr 15 19:38:32 localhost elogind[352]: Suspending system...
Apr 15 19:38:32 localhost vmunix: [   96.960350] PM: suspend entry (deep)
Apr 15 19:38:34 localhost vmunix: [   96.971363] Filesystems sync: 0.011 seconds
Apr 15 19:38:34 localhost vmunix: [   96.971643] Freezing user space processes
Apr 15 19:38:34 localhost vmunix: [   96.972920] Freezing user space processes 
completed (elapsed 0.001 seconds)
Apr 15 19:38:34 localhost vmunix: [   96.972926] OOM killer disabled.
Apr 15 19:38:34 localhost vmunix: [   96.972927] Freezing remaining freezable 
tasks
Apr 15 19:38:34 localhost vmunix: [   96.974038] Freezing remaining freezable 
tasks completed (elapsed 0.001 seconds)
Apr 15 19:38:34 localhost vmunix: [   96.974062] printk: Suspending console(s) 
(use no_console_suspend to debug)
Apr 15 19:38:34 localhost vmunix: [   96.975397] serial 00:04: disabled
Apr 15 19:38:34 localhost vmunix: [   96.975545] r8169 :02:00.0 enp2s0: 
Link is Down
Apr 15 19:38:34 localhost vmunix: [   97.002210] sd 0:0:0:0: [sda] 
Synchronizing SCSI cache
Apr 15 19:38:34 localhost vmunix: [   97.002481] sd 0:0:0:0: [sda] Stopping disk
Apr 15 19:38:34 localhost vmunix: [   97.290213] ACPI: PM: Preparing to enter 
system sleep state S3
Apr 15 19:38:34 localhost vmunix: [   97.830759] ACPI: PM: Saving platform NVS 
memory
Apr 15 19:38:34 localhost vmunix: [   97.830872] Disabling non-boot CPUs ...
Apr 15 19:38:34 localhost vmunix: [   97.830875] Wakeup pending. Abort CPU 
freeze
Apr 15 19:38:34 localhost vmunix: [   97.830876] Non-boot CPUs are not disabled
Apr 15 19:38:34 localhost vmunix: [   97.830886] ACPI: PM: Waking up from 
system sleep state S3
Apr 15 19:38:34 localhost vmunix: [   98.162855] xhci_hcd :03:00.3: 
Controller not ready at resume -19
Apr 15 19:38:34 localhost vmunix: [   98.162881] xhci_hcd :03:00.3: PCI 
post-resume error -19!
Apr 15 19:38:34 localhost vmunix: [   98.162884] xhci_hcd :03:00.3: HC 
died; cleaning up
Apr 15 19:38:34 localhost vmunix: [   98.162892] xhci_hcd :03:00.3: PM: 
dpm_run_callback(): pci_pm_resume+0x0/0x110
 returns -19
Apr 15 19:38:34 localhost vmunix: [   98.162908] xhci_hcd :03:00.3: PM: 
failed to resume async: error -19


bug#63045: Can't suspend and wakeup outside of gnome

2023-04-23 Thread Stefan Huchler
When I try to suspend as example with loginctl suspend, but also other
methods like dbus command sending or the echo mem > ... it sometimes
works but around 60% mostly the 2nd time never reaches fully the suspend
state but monitor is out, no suspend typical power blinking, the only
way to recover is then to shut down the pc long power button press.

Now I switched from nixos where it worked I also tried to install the
5.15 kernel so in case it's a kernel bug, but the same issue.

I run into another person on #guix irc which claimed to have the same
issue, with a totally different system, I use a amd Ryzen 5 2400G with
the vanilla kernel not linux-libre he said he used the libre kernel with
a intel system.

Did report this already to the nonguix repo.
https://gitlab.com/nonguix/nonguix/-/issues/257

My workaround is to have a gnome instance runnig on tty8 and switch
there to suspend it over gnome then it works always.






bug#43390: eudev should have ability to add a hwdb file

2020-09-13 Thread Stefan Huchler
There is a configuration field for udev rules:

https://guix.gnu.org/manual/en/html_node/Base-Services.html
udev-service [#:udev eudev #:rules '()]

But there is no configuration option to add a hwdb file.

I don't know if that matters but nixos has such option:
services.udev.extraHwdb

That's the hwdb file I want to add:
https://github.com/spiderbit/emacs-ergo-thinkpad-kb-layout/archive/master.zip







bug#41516: Slim package unnessesarily conflates default-user/default-session with autologin

2020-05-24 Thread Stefan Huchler
The 3 options of default-user / default-login-session and autologin are
not as tight coupled and should in fact it's the wrong way coupled:

> When @var{auto-login?} is true, log in automatically as
> @var{default-user} with @var{auto-login-session}.

So you can set auto-login? #t and don't set the other 2 values and it
then succesfully reconfigures but just presents the normal login screen
and not autologins.

But if you only use default-user or auto-login-session but keep
auto-login? #f this values get not written in the config and therefor
the settings get just ignored:

(if (slim-configuration-auto-login? config)
(string-append "auto_login yes\ndefault_user "
   (slim-configuration-default-user config) "\n")
"")

At least that is true for user, I find no code for the
auto-login-session but when I set it without autologin it seems to get
ignored, too.

But the default user setting works independent from autologin:
https://wiki.archlinux.org/index.php/SLiM#Set_default_username

In fact the default-session seems to be also only useful for autologin
as far as I can tell:

  (let* ((xinitrc (xinitrc #:fallback-session
   (slim-configuration-auto-login-session
   config)))
...
login_cmd  exec " xinitrc " %session
...
)

There seems to be different ways to have per user default sessions or
global so I am not 100% sure about that, but you can set default user
without conflating that with autologin, while you maybe need a
default-user for autologin you don't need autologin for a default-user.






bug#41121: (Keyboard-layout) form does not work "across the board"

2020-05-24 Thread Stefan Huchler
o.ro...@posteo.net writes:

> In the process of changing my login manager to slim (over gdm), I
> noticed that the (keyboard-layout ...) form does not work the same way
> in the (bootloader)/(set-xorg-configuration) and the
> (slim-configuration) form. While in the former cases, (keyboard-layout
> keyboard-layout) uses the string I inputted in the beginning of the
> config file, an error is thrown when I try to do the same in the
> (slim-configuration) form (error 1). When I simply use (service
> slim-service-type) and try to supplement via (set-xorg-configuration),
> an error is thrown as well (error 2).

Hello "o",

sadly can't see your name, I run into the same Problem and first found
only your bug report so did not care to look for other bug reports
further back in the past, but this "bug" missunderstanding seems to be
related to bug#37422.

I found the solution by carefully reading the docu und try/error a few
iterations first with simpler level of config till I got the solution
( would be easier if I found the bug mentioned earlier but I learned more
this way so it's good :D )

This is the solution to get it working:
(service slim-service-type
(slim-configuration
   (xorg-configuration (xorg-configuration
(keyboard-layout keyboard-layout)

The tricky part is that you have to use 2 times xorg-configuration one
time for the variable name and one time you have some sort of generator
function for xorg-configuration, that didn't clip for me as newcomer to
guix instantly.

If we consider that a bug it would be a documentian bug, and maybe that
the set-xorg-configuration method does not work (at least it seems that
way) that is not what the documentation implies. This function looks
like a general function where it says "e.g. gdm" that implies that it
should work for both gdm and all other login-managers the same way.

Ok just testet it that works to:

(set-xorg-configuration
   (xorg-configuration
  (keyboard-layout keyboard-layout)) slim-service-type)

Where the documentition there is missleading is that you see the:

Scheme Procedure: set-xorg-configuration config
[login-manager-service-type]

optional login-manager-service-type parameter but it's not described
that it defaults to gdm-service-type and can be therefor ommited in the
case of gdm.

So I would A maybe add more sample code and B adding (default:
gdm-service-type) behind the "set-xorg-configuration" description.






bug#41178: can't log into X anymore ( polkit )

2020-05-22 Thread Stefan Huchler
So, after nobody answered to my problem and a guix pull / reconfigure
did change nothing I replaced gdm with slim with following changes:

(use-modules (gnu)
 (srfi srfi-1)
 (gnu system nss))
(use-service-modules desktop ssh xorg)
(use-package-modules bootloaders certs ratpoison emacs-xyz
 suckless wm xorg emacs web-browsers)

...

 (services (cons* (service openssh-service-type
   (openssh-configuration
(permit-root-login #t)))
  (service slim-service-type)
  (remove (lambda (service)
(eq? (service-kind service) gdm-service-type))
  %desktop-services)))

and slim just works, it fixes the problem for me because I don't want to
run gdm on this low power machine anyway, but maybe somebody can
understand why slim runs and gdm not, I did not do much special I just
wanted to make my first guix install and got X running with the
light-desktop config with some minor unrelated changes like adding a few
packages and activate ssh. The only thing as I said was that I set a
password for root, but that seems also not to be such a untypical
step. So I wonder if that is a 32bit only problem else I would assume
many people would run into that. More or less the default installation
broke, sure not the graphical installation, with that I had problems
with grub, because if I remember correctly it assumed efi support.

It's strange to me that switching the display-manager fixes the problem
because that would imply that the gdm package is buggy, which again it's
in the default desktop-services variable.

But for me it's ok and maybe somebody else runs into that problem, then
maybe my bug report information helps.


Stefan Huchler  writes:

> shortly after installing X and making the first few changes setting the
> root password and boom I can't login into X anymore.
>
>
> My configuration:
> /--
> (use-modules (gnu) (gnu system nss))
> (use-service-modules desktop ssh)
> (use-package-modules bootloaders certs ratpoison emacs-xyz
>suckless wm xorg emacs web-browsers)
>
> (operating-system
>  (host-name "XXX")
>  (timezone "Europe/Berlin")
>  (locale "en_US.utf8")
>
>  (keyboard-layout (keyboard-layout "us" "dvorak"))
>  
>  (bootloader (bootloader-configuration
> (bootloader grub-bootloader)
> (target "/dev/sda")))
>
>  (file-systems (append
>   (list (file-system
>  (device (file-system-label "guix-root"))
>  (mount-point "/")
>  (type "ext4"))
> (file-system
>  (device (file-system-label "home"))
>  (mount-point "/home")
>  (type "ext4")))
>   %base-file-systems))
>
>  (users (cons (user-account
>  (name "XXX")
>  (comment "Me")
>  (group "users")
>  (supplementary-groups '("wheel" "netdev"
>  "audio" "video")))
> %base-user-accounts))
>
>  (packages (append (list
>   ;; window managers
>   ratpoison i3-wm i3status dmenu
>   ;; emacs-exwm
>   xterm
>   nss-certs
>   vimb
>   emacs)
>  %base-packages))
>
>  (services (cons* (service openssh-service-type
>  (openssh-configuration
>   (permit-root-login #t)))
> ;;(service xfce-desktop-service-type)
> %desktop-services))
>
>  (name-service-switch %mdns-host-lookup-nss))
>
> /--
>
> Authentication needed [...] intel-backlight-helper and a password prompt
> that I can't hit on, and somethnig with polkit.
>
> I think it propable had to do with me setting a root password. I unset
> it with password -dl root and only passwd -d root, but both didn't fix
> it.






bug#41178: can't log into X anymore ( polkit )

2020-05-10 Thread Stefan Huchler
shortly after installing X and making the first few changes setting the
root password and boom I can't login into X anymore.


My configuration:
/--
(use-modules (gnu) (gnu system nss))
(use-service-modules desktop ssh)
(use-package-modules bootloaders certs ratpoison emacs-xyz
 suckless wm xorg emacs web-browsers)

(operating-system
 (host-name "XXX")
 (timezone "Europe/Berlin")
 (locale "en_US.utf8")

 (keyboard-layout (keyboard-layout "us" "dvorak"))
 
 (bootloader (bootloader-configuration
  (bootloader grub-bootloader)
  (target "/dev/sda")))

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

 (users (cons (user-account
   (name "XXX")
   (comment "Me")
   (group "users")
   (supplementary-groups '("wheel" "netdev"
   "audio" "video")))
  %base-user-accounts))

 (packages (append (list
;; window managers
ratpoison i3-wm i3status dmenu
;; emacs-exwm
xterm
nss-certs
vimb
emacs)
   %base-packages))

 (services (cons* (service openssh-service-type
   (openssh-configuration
(permit-root-login #t)))
  ;;(service xfce-desktop-service-type)
  %desktop-services))

 (name-service-switch %mdns-host-lookup-nss))

/--

Authentication needed [...] intel-backlight-helper and a password prompt
that I can't hit on, and somethnig with polkit.

I think it propable had to do with me setting a root password. I unset
it with password -dl root and only passwd -d root, but both didn't fix
it.