bug#65225: ‘guix shell --system=ALIEN’ builds for both systems

2023-10-20 Thread Maxim Cournoyer
Hi,

Ludovic Courtès  writes:

> Hello Guix,
>
> This fixes , ensuring that profile
> hooks are built for the right system.  It does so by passing each
> profile hook the targeted system.
>
> Thoughts?
>
> Thanks,
> Ludo'.
>
> Ludovic Courtès (2):
>   packages: Add ‘system’ parameter for ‘set-guile-for-build’.
>   profiles: Hooks honor the #:system parameter of ‘profile-derivation’.
>
>  gnu/bootloader.scm |  5 +++--
>  guix/channels.scm  |  3 ++-
>  guix/packages.scm  |  7 ---
>  guix/profiles.scm  | 49 ++
>  tests/profiles.scm | 24 ++-
>  5 files changed, 64 insertions(+), 24 deletions(-)

I see the cover letter, but not the patches :-).  Where did they go?

-- 
Thanks,
Maxim





bug#66651:

2023-10-20 Thread Maxim Cournoyer
tags 66651 + notabug
thanks

Hello!

Hugo Buddelmeijer  writes:

[...]

> This issue can be closed as far as I'm concerned, but I don't know how
> to do that. Let's try this:
>
> /close

You can reply to the bug via the special '66651-d...@debbugs.gnu.org'
email address.  I'm also CC'ing the Debbugs control server so that it
processes the directives found at the beginning of this mail (add a
'notabug' tag).

-- 
Thanks,
Maxim





bug#66651:

2023-10-20 Thread Tobias Geerinckx-Rice via Bug reports for GNU Guix

On 2023-10-20 21:39, Hugo Buddelmeijer wrote:

This issue can be closed as far as I'm concerned, but I don't know how
to do that. Let's try this:

/close


Add ‘-done’ or ‘-close’ to the bug address, as I've done here.

Kind regards,

T G-R

Sent from a Web browser.  Excuse or enjoy my brevity.





bug#66651:

2023-10-20 Thread Hugo Buddelmeijer
Csepp  riseup.net> wrote:

> You can use the kernel-arguments option in the operating-system config.
> Untested:
> (kernel-arguments (cons "i915.enable_guc=0" %default-kernel-arguments))
> This should work, in theory.

Thanks, using kernel-arguments indeed works!

The idea to use i915.enable_guc came from the arch wiki [1], which states

> GuC functionality is controlled by the i915.enable_guc kernel parameter.

So I searched the Guix manual for "kernel parameter", and found the
sysctl section.

> I suspect that the sysctl thing doesn't work because it is done too late
> in the boot process.

That makes sense now I understand the difference between kernel
arguments and parameters in Guix. From the sysctl man page:

> sysctl  is  used to modify kernel parameters at runtime.

And that is indeed a bit late for deciding whether to load firmware.


About the default value: naively I would think that the default of
i915.enable_guc should be changed to 0 in the libre kernel, at least
for those chips that do not have free firmware.

At least now the term 'wedged' is part of the issue tracker, so other
affected people will hopefully find this.


This issue can be closed as far as I'm concerned, but I don't know how
to do that. Let's try this:

/close

Thanks again,

Hugo


[1] https://wiki.archlinux.org/title/Intel_graphics





bug#39677: Evolution's inbox widget is blank

2023-10-20 Thread Csepp


Simon Tournier  writes:

> Hi,
>
> It is about this old bug#39677 [1].  Sorry for not noticing it before.
>
> 1: 
>
>
> On Tue, 18 Oct 2022 at 17:53, zimoun  wrote:
>> On Wed, 19 Feb 2020 at 15:20, raingloom  wrote:
>>
>>> I've been haunted by this for months, so it's high time I make a proper bug
>>> report.
>>>
>>> I wiped all Evolution related directories I could find in .cache, .config, 
>>> and
>>> .local, and reconfigured it from scratch, but that didn't help.
>>>
>>> When I open Evolution it prompts me for my password and pulls my emails
>>> without a problem, even shows a notification for them, but it doesn't
>>> display anything.
>>>
>>> It's not a font issue, because the scroll bar does not appear. There are no
>>> emails displayed at all. Double clicking on it should open a mail in a new
>>> window, but no window appears.
>>>
>>> I tried it in a VM that's a slight modification of my system, that had no
>>> problems.
>>> I also tried it in both i3wm and Gnome, but the results are identical.
>>>
>>> All I see in the log is this:
>>> ```
>>> (evolution:23706): GLib-GIO-WARNING **: 15:17:11.805: Your application did 
>>> not
>>> unregister from D-Bus before destruction. Consider using 
>>> g_application_run().
>>> ```
>>>
>>> I can send an strace log if necessary. The one I took was a bit long and
>>> didn't reveal much, but someone might have better luck.
>>>
>>> Any tips on where I should look?
>>>
>>> I suspect that it either doesn't play nice with some other package or that
>>> there is some state corruption I couldn't track down.
>>>
>>> For now I'll just use Geary for this account.
>>
>> Well, I am not an user of Evolution.  The question is: is it still an
>> issue for you?  If yes, are you running Guix on foreign distro?  Or Guix
>> System?
>
> Without any answer since 18 Oct 2022 (51 weeks, 6 days, 6 hours ago), I
> deduce it is not an issue anymore.  So I am going to close this issue
> soon.
>
> Cheers,
> simon

I haven't used Evolution for a long time, so if no one else reported
this, then hopefully it means it's no longer an issue.





bug#66651: How to pass i915.enable_guc=0 in config.scm to prevent a 'wedged' GPU?

2023-10-20 Thread Csepp


Hugo Buddelmeijer  writes:

> The i915 driver will try to load the GuC firmware, at least for Iris
> Xe chips. Loading the GuC firmware fails because it is non-free and
> deblobbed. As a result, some software, like sway, will not work.
>
> It is possible to manually pass the i915.enable_guc=0 kernel parameter
> at boot from grub. Then everything works as intended. However, it
> seems not possible to set this parameter from config.scm.
>
> So at the moment my system is not fully declarative, as I have to type
> in a kernel parameter at boot; does anyone perhaps have advice on how
> can this be done better?
> ...

You can use the kernel-arguments option in the operating-system config.
Untested:
(kernel-arguments (cons "i915.enable_guc=0" %default-kernel-arguments))
This should work, in theory.

I suspect that the sysctl thing doesn't work because it is done too late
in the boot process.





bug#66653: Should 'guix pack', 'install', ... accept '-f'?

2023-10-20 Thread Tobias Geerinckx-Rice via Bug reports for GNU Guix
Hi all,

I feel like that everything that could build a package should accept the 
'standard build options' like -f.

Does anyone have arguments against it?

Kind regards,

T G-R

Sent on the go.  Excuse or enjoy my brevity.





bug#66651: How to pass i915.enable_guc=0 in config.scm to prevent a 'wedged' GPU?

2023-10-20 Thread Hugo Buddelmeijer
The i915 driver will try to load the GuC firmware, at least for Iris
Xe chips. Loading the GuC firmware fails because it is non-free and
deblobbed. As a result, some software, like sway, will not work.

It is possible to manually pass the i915.enable_guc=0 kernel parameter
at boot from grub. Then everything works as intended. However, it
seems not possible to set this parameter from config.scm.

So at the moment my system is not fully declarative, as I have to type
in a kernel parameter at boot; does anyone perhaps have advice on how
can this be done better?

Details below.

Thanks,
Hugo


guix version:

  guix 27c2ebd
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 27c2ebd7cebba22b7acd341d7ce402f6beb02733



### Attempt 1, out-of-the box configuration ###

dmesg output:

[   10.028684] i915 :00:02.0: [drm] *ERROR* GT0: GuC firmware
/*(DEBLOBBED)*/: fetch failed -ENOENT
[   10.028692] i915 :00:02.0: [drm] GT0: GuC firmware(s) can be
downloaded from /*(DEBLOBBED)*/
[   10.029541] i915 :00:02.0: [drm] GT0: GuC firmware
/*(DEBLOBBED)*/ version 0.0.0
[   10.029613] i915 :00:02.0: [drm] *ERROR* GT0: GuC
initialization failed -ENOENT
[   10.029615] i915 :00:02.0: [drm] *ERROR* GT0: Enabling uc failed (-5)
[   10.029617] i915 :00:02.0: [drm] *ERROR* GT0: Failed to
initialize GPU, declaring it wedged!
[   10.029973] i915 :00:02.0: [drm:add_taint_for_CI [i915]] CI
tainted:0x9 by intel_gt_set_wedged_on_init+0x38/0x50 [i915]


sway-greeter.log:

error: Kernel is too old (4.16+ required) or unusable for Iris.
Check your dmesg logs for loading failures.

libEGL warning: egl: failed to create dri2 screen
00:00:00.185 [ERROR] [wlr] [EGL] command: eglInitialize, error:
EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen"



### Attempt 2: manually disabling guc ###

dmesg when passing i915.enable_guc=0 at boot (roughly instead of the
errors from attempt 1):

[9.233275] Setting dangerous option enable_guc - tainting kernel

sway works



### Attempt 3: through config.scm ###

attempt to set the kernel parameter in config.scm:

   (modify-services %base-services
(sysctl-service-type config =>
 (sysctl-configuration
  (settings (append '(("i915.enable_guc" . "0"))
%default-sysctl-settings)


dmesg output (in addition to the errors from attempt 1):

[7.759922] sysctl: cannot stat /proc/sys/i915/enable_guc: No such
file or directory

sway does not work





bug#65720: [PATCH] git: Shell out to ‘git gc’ when necessary.

2023-10-20 Thread Ludovic Courtès
Fixes .

This fixes a bug whereby libgit2-managed checkouts would keep growing as
we fetch.

* guix/git.scm (packs-in-git-repository, maybe-run-git-gc): New
procedures.
(update-cached-checkout): Use it.
---
 guix/git.scm | 39 ---
 1 file changed, 36 insertions(+), 3 deletions(-)

Hi!

This is a radical fix/workaround for the unbounded Git checkout growth
problem, shelling out to ‘git gc’ when it’s likely needed (“too many”
pack files around).

I thought we might be able to implement a ‘git gc’ approximation using
the libgit2 “packbuilder” interface, but I haven’t got around to doing
it: .

Once again, shelling out is not my favorite option, but it’s a bug we
should fix sooner rather than later, hence this compromise.

Thoughts?

Ludo’.

diff --git a/guix/git.scm b/guix/git.scm
index b7182305cf..d704b62333 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017, 2020 Mathieu Othacehe 
-;;; Copyright © 2018-2022 Ludovic Courtès 
+;;; Copyright © 2018-2023 Ludovic Courtès 
 ;;; Copyright © 2021 Kyle Meyer 
 ;;; Copyright © 2021 Marius Bakke 
 ;;; Copyright © 2022 Maxime Devos 
@@ -29,15 +29,16 @@ (define-module (guix git)
   #:use-module (guix cache)
   #:use-module (gcrypt hash)
   #:use-module ((guix build utils)
-#:select (mkdir-p delete-file-recursively))
+#:select (mkdir-p delete-file-recursively invoke/quiet))
   #:use-module (guix store)
   #:use-module (guix utils)
   #:use-module (guix records)
   #:use-module (guix gexp)
   #:autoload   (guix git-download)
   (git-reference-url git-reference-commit git-reference-recursive?)
+  #:autoload   (guix config) (%git)
   #:use-module (guix sets)
-  #:use-module ((guix diagnostics) #:select (leave warning))
+  #:use-module ((guix diagnostics) #:select (leave warning info))
   #:use-module (guix progress)
   #:autoload   (guix swh) (swh-download commit-id?)
   #:use-module (rnrs bytevectors)
@@ -428,6 +429,35 @@ (define (delete-checkout directory)
 (rename-file directory trashed)
 (delete-file-recursively trashed)))
 
+(define (packs-in-git-repository directory)
+  "Return the number of pack files under DIRECTORY, a Git checkout."
+  (catch 'system-error
+(lambda ()
+  (let ((directory (opendir (in-vicinity directory ".git/objects/pack"
+(let loop ((count 0))
+  (match (readdir directory)
+((? eof-object?)
+ (closedir directory)
+ count)
+(str
+ (loop (if (string-suffix? ".pack" str)
+   (+ 1 count)
+   count)))
+(const 0)))
+
+(define (maybe-run-git-gc directory)
+  "Run 'git gc' in DIRECTORY if needed."
+  ;; XXX: As of libgit2 1.3.x (used by Guile-Git), there's no support for GC.
+  ;; Each time a checkout is pulled, a new pack is created, which eventually
+  ;; takes up a lot of space (lots of small, poorly-compressed packs).  As a
+  ;; workaround, shell out to 'git gc' when the number of packs in a
+  ;; repository has become "too large", potentially wasting a lot of space.
+  ;; See .
+  (when (> (packs-in-git-repository directory) 25)
+(info (G_ "compressing cached Git repository at '~a'...~%")
+  directory)
+(invoke/quiet %git "-C" directory "gc")))
+
 (define* (update-cached-checkout url
  #:key
  (ref '())
@@ -515,6 +545,9 @@ (define* (update-cached-checkout url
seconds seconds
nanoseconds nanoseconds
 
+   ;; Run 'git gc' if needed.
+   (maybe-run-git-gc cache-directory)
+
;; When CACHE-DIRECTORY is a sub-directory of the default cache
;; directory, remove expired checkouts that are next to it.
(let ((parent (dirname cache-directory)))

base-commit: 6b0a32196982a0a2f4dbb59d35e55833a5545ac6
-- 
2.41.0






bug#66647: Installation of RPMs produced by ‘guix pack’ is super slow

2023-10-20 Thread Maxim Cournoyer
Hi Ludo,

Ludovic Courtès  writes:

> Hello!
>
> I made friends at work when I told them we could provide an RPM for any
> modern package to install on their old RPM-based distro.  :-)
>
> However, installing those RPMs takes a lot of time.  For example,
> installing the RPM for ‘gmsh’ (closure: 596 MiB; thousands of files)
> takes ~45mn.
>
> Is there something about the metadata generated by (guix rpm) that could
> be improved, or are we hitting some limitation of the RPM format or
> implementation?

What is the OS thy install on?  How do they generate the gmsh package
exactly?  Perhaps I still have a RPM-based distro VM to try it with.

-- 
Thanks,
Maxim





bug#66647: Installation of RPMs produced by ‘guix pack’ is super slow

2023-10-20 Thread Maxim Cournoyer
Hi!

Ludovic Courtès  writes:

> Hello!
>
> I made friends at work when I told them we could provide an RPM for any
> modern package to install on their old RPM-based distro.  :-)
>
> However, installing those RPMs takes a lot of time.  For example,
> installing the RPM for ‘gmsh’ (closure: 596 MiB; thousands of files)
> takes ~45mn.
>
> Is there something about the metadata generated by (guix rpm) that could
> be improved, or are we hitting some limitation of the RPM format or
> implementation?

What?  That's crazy.  I haven't experimented with it recently, but I
used to generate packages for Jami back when it had a closure of 2 GiB
and it took many seconds, but not that much.

Many RPM is doing extra checks now?

-- 
Thanks,
Maxim





bug#66319: Incorrect code snippet in manual

2023-10-20 Thread Simon Tournier
Hi,

On Thu, 19 Oct 2023 at 20:01, Gabriel Hondet via Bug reports for GNU Guix 
 wrote:

>> Therefore, I am proposing to close.  WDYT?
>
> No problem with me, this issue won't bring anything new.

Closing.

Thanks,
simon





bug#65769:

2023-10-20 Thread Hugo Buddelmeijer
Ok, just one more update on the hardware issue: I 'resolved' it, and
maybe I can help others by commenting here.

Specifying i915.enable_guc=0 as a kernel parameter at boot will ensure
the kernel doesn't get 'wedged' and now sway works on the libre kernel
too. I get the blinking cursor again if I forget.

I tried adding the kernel parameter to the config like this:

(sysctl-service-type config =>
 (sysctl-configuration
  (settings (append '(("i915.enable_guc" . "0"))
%default-sysctl-settings

But that does not work, so I have to add the parameter at boot time.
Maybe I'll create a new issue for that.

So now I can go back to actually using sway, and fixing my power
management! And perhaps, if it becomes annoying enough, the creation
of the /run/user/ directory...

Hugo


On Fri, 20 Oct 2023 at 12:14, Hugo Buddelmeijer  wrote:
>
> Thank you bdju!
>
> Your config also does not work for me, so my specific problem is
> probably hardware related. Thanks for helping me isolate the problem.
> Apparently I was naive in assuming that i915 would mean things would
> just work. (Well, X works.)
>
> I also get a blank screen with the cursor at the top of the screen
> (sometimes), but my problem seems unrelated to this issue, because
> greetd/wlgreet is now not involved. I will therefore not discuss my
> problem here further.
>
> Hugo
>
> On Fri, 20 Oct 2023 at 12:02, bdju  wrote:
> >
> > On Fri Oct 20, 2023 at 4:01 AM CDT, Hugo Buddelmeijer wrote:
> > > It would be greatly appreciated if someone could post an example Guix
> > > config for Sway that should run out of the box with the libre kernel
> > > without any extra channels. For example on a virtual machine. Then we
> > > have a shared starting point that we can all confirm to work, so we
> > > can detangle issues specific to our own hardware and software
> > > configuration, and issues related to Sway+Guix in general.
> > >
> > > Cheers,
> > > Hugo
> > >
> >
> > I am running Sway on Guix System with the libre kernel. My hardware is a
> > ThinkPad T440p, intel graphics. I do not use any channels.
> >
> > I've attached my config.scm, manifest, and sway config files in case
> > it's useful to you.





bug#65769:

2023-10-20 Thread Hugo Buddelmeijer
Thank you bdju!

Your config also does not work for me, so my specific problem is
probably hardware related. Thanks for helping me isolate the problem.
Apparently I was naive in assuming that i915 would mean things would
just work. (Well, X works.)

I also get a blank screen with the cursor at the top of the screen
(sometimes), but my problem seems unrelated to this issue, because
greetd/wlgreet is now not involved. I will therefore not discuss my
problem here further.

Hugo

On Fri, 20 Oct 2023 at 12:02, bdju  wrote:
>
> On Fri Oct 20, 2023 at 4:01 AM CDT, Hugo Buddelmeijer wrote:
> > It would be greatly appreciated if someone could post an example Guix
> > config for Sway that should run out of the box with the libre kernel
> > without any extra channels. For example on a virtual machine. Then we
> > have a shared starting point that we can all confirm to work, so we
> > can detangle issues specific to our own hardware and software
> > configuration, and issues related to Sway+Guix in general.
> >
> > Cheers,
> > Hugo
> >
>
> I am running Sway on Guix System with the libre kernel. My hardware is a
> ThinkPad T440p, intel graphics. I do not use any channels.
>
> I've attached my config.scm, manifest, and sway config files in case
> it's useful to you.





bug#66647: Installation of RPMs produced by ‘guix pack’ is super slow

2023-10-20 Thread Ludovic Courtès
Hello!

I made friends at work when I told them we could provide an RPM for any
modern package to install on their old RPM-based distro.  :-)

However, installing those RPMs takes a lot of time.  For example,
installing the RPM for ‘gmsh’ (closure: 596 MiB; thousands of files)
takes ~45mn.

Is there something about the metadata generated by (guix rpm) that could
be improved, or are we hitting some limitation of the RPM format or
implementation?

Thanks,
Ludo’.





bug#65769:

2023-10-20 Thread bdju
On Fri Oct 20, 2023 at 4:01 AM CDT, Hugo Buddelmeijer wrote:
> It would be greatly appreciated if someone could post an example Guix
> config for Sway that should run out of the box with the libre kernel
> without any extra channels. For example on a virtual machine. Then we
> have a shared starting point that we can all confirm to work, so we
> can detangle issues specific to our own hardware and software
> configuration, and issues related to Sway+Guix in general.
>
> Cheers,
> Hugo
>

I am running Sway on Guix System with the libre kernel. My hardware is a
ThinkPad T440p, intel graphics. I do not use any channels.

I've attached my config.scm, manifest, and sway config files in case
it's useful to you.
;; This is an operating system configuration generated
;; by the graphical installer.

(use-modules (gnu)
	(gnu services dbus)
	(gnu services pm)
	(gnu services linux)
	(gnu services virtualization)
	(gnu system setuid)
	(guix packages))
(use-service-modules audio base desktop networking ssh sound xorg)
(use-package-modules shells wm android gnome)

; workaround to use swaylock with PAM, requires disabling setuid
;	(define-public swaylock-pam-service-type
;		(service-type (name 'swaylock)
;			(extensions (list (service-extension pam-root-service-type
;(const (list (pam-service
;	(name "swaylock")
;	(auth (list
;		(pam-entry
;			(control "include")
;			(module "greetd"))
;			(description "Swaylock pam configuration")
;			(default-value '(

; attempt to restore a PAM-less swaylock
(define-public swaylock/no-pam
	(package
		(inherit swaylock)
		(name "swaylock-no-pam")
		(inputs
			(filter
(lambda (input)
	(not (string=? "linux-pam" (car input
(package-inputs swaylock)

(operating-system
	(locale "en_US.utf8")
	(timezone "America/Chicago")
	(keyboard-layout (keyboard-layout "us"))
	(host-name "anpan")
	(users (cons* (user-account
		(name "brad")
		(comment "Bradley")
		(group "users")
		(shell (file-append zsh "/bin/zsh"))
		(home-directory "/home/brad")
		(supplementary-groups
			'("wheel" "netdev" "audio" "video" "libvirt" "kvm" "adbusers"
			 "plugdev" "tor" "tty" "input" "dialout")))
		%base-user-accounts))

	(groups
		(cons* (user-group
			(name "adbusers")
			(system? #t))
			(user-group
			(name "plugdev")
			(system? #t))
		%base-groups))

	(packages
		(append
			(map specification->package '("adwaita-icon-theme"
			"hicolor-icon-theme"
			"gnome-themes-extra"
			"gvfs"
			"fwupd"
			"intel-vaapi-driver"
			"nss-certs"
			"neovim"
			"sway"
			"tmux"
			"v4l2loopback-linux-module"
			"vim-full"))
			(list swaylock/no-pam)
			%base-packages))

	(services
		(cons*
			(service openssh-service-type (openssh-configuration
			(password-authentication? #t)
			(use-pam? #f)))
		(service tor-service-type)
		(service network-manager-service-type)
		(service wpa-supplicant-service-type)
		(service ntp-service-type)
		(service tlp-service-type (tlp-configuration (cpu-scaling-governor-on-ac (list "performance"
		(service thermald-service-type)
		(service upower-service-type)
		(service earlyoom-service-type)
		(service alsa-service-type)
		(service polkit-service-type)
		(service dbus-root-service-type)
		(service udisks-service-type)
		(service libvirt-service-type
			(libvirt-configuration
(unix-sock-group "libvirt")
(tls-port "16555")))
		(service virtlog-service-type
			(virtlog-configuration
			(max-clients 1000)))
		(udev-rules-service 'controller-nintendo-gamecube-adapter
			(udev-rule "51-gcadapter.rules"
(string-append
	"SUBSYSTEM==\"usb\", ENV{DEVTYPE}==\"usb_device\", "
	"ATTRS{idVendor}==\"057e\", ATTRS{idProduct}==\"0337\", "
	"MODE=\"0666\"")))
;			(service udev-service-type
;(udev-configuration
;	(rules (cons android-udev-rules
;		(udev-configuration-rules config)
			(service elogind-service-type (elogind-configuration (handle-lid-switch 'ignore)))
			(simple-service 'fuse-etc etc-service-type
(list `("fuse.conf" ,(plain-file "fuse.conf" "user_allow_other\n"
			(simple-service 'ratbagd dbus-root-service-type (list libratbag))
	%base-services))

	(bootloader
		(bootloader-configuration
			(bootloader grub-efi-bootloader)
			(targets (list "/boot/efi"))
			(keyboard-layout keyboard-layout)))
	(swap-devices (list (swap-space
	(target "/swapfile"
	(mapped-devices
		(list
			(mapped-device
(source
(uuid "6098315e-f945-4450-8438-29cf49eea790"))
(targets (list "cryptroot"))
(type luks-device-mapping
			;(mapped-device
			;	(type luks-device-mapping)
			;	(source
			;	(uuid "b458c6b9-6781-474c-8623-ad869c02f194"))
			;	(targets (list "sidecar")
			;(mapped-device
			;	(type luks-device-mapping)
			;	(source
			;	(uuid "cb7b1caa-0448-4a35-9d40-7ab1d82a18f1"))
			;	(targets (list "bullet")

	(file-systems
		(cons* (file-system
(mount-point "/")
(device "/dev/mapper/cryptroot")
(type "btrfs")

bug#65769:

2023-10-20 Thread Hugo Buddelmeijer
Hi chirs, Josselin, unmatchedparenthesis,

Thank you for your example configs! It allowed me to get sway up and
running under Guix. For those interested, here is my configuration:
https://gist.github.com/hugobuddel/cd08fc2980c6901ff4a2df5c57531e46

However, I might switch to something else for now, as I'm having too
much trouble with running Sway. My main goal is to move to a window
manager that makes it easy to store my home configuration, for example
with guix home; I found dconf too convoluted. Using wayland or a
tiling WM is only a secondary goal for me. Maybe i3 or XFCE would
suite me just fine.

The main problems I faced, in detail below:
1) I cannot get Sway/wayland to work with the libre kernel; this is
probably due to my hardware, but X works fine.
2) I have to create the /run/user/936 directory manually. The 936 is
the `greeter` user, which occassionally changes.
3) Power management does not work. That might not be related to Sway
at all, but is an important showstopper for me right now.

It would be greatly appreciated if someone could post an example Guix
config for Sway that should run out of the box with the libre kernel
without any extra channels. For example on a virtual machine. Then we
have a shared starting point that we can all confirm to work, so we
can detangle issues specific to our own hardware and software
configuration, and issues related to Sway+Guix in general.

Cheers,
Hugo


1) Sway on libre kernel.

Having a libre system is one of my reasons for using Guix, so I'd
prefer a libre kernel. However, for me the libre kernel does not work
with sway. I expect this is a problem with my hardware, but I mention
it anyway, since I haven't seen a Sway configuration that uses the
libre kernel. My machine is a System 76 Lemure Pro with an "Intel
Corporation Alder Lake-UP3 GT2 [Iris Xe Graphics]".

Relevant logs (not necessarily all from the same session...):
- dmesg: https://gist.github.com/hugobuddel/5a593d91e93bb106056c05f8d2db4a96
- /var/log/greetd-1.log:
https://gist.github.com/hugobuddel/6ba7a3fb5b15d20851ade6fdf9c4ee87
- /tmp/sway-greeter.448.log:
https://gist.github.com/hugobuddel/f447d69a8502b02d103163fd0b2cfc86

I don't particularly care about hardware acceleration for now, so if
it is possible to run Sway in just software, then that would be fine
with me as well.


2) /run/user/936

Running the attached config as-is will result in the subject of this
tread: the blank screen with cursor at the top left. I have to figure
out what the id is of the greeter user, and then create the
appropriate directory. Something like:

GREETERID=$(id -u greeter)
mkdir "/run/user/${GREETERID}"
chmod greeter:users "/run/user/${GREETERID}"

I don't know how the id of the greeter user is determined. It has
changed after doing a `guix system reconfigure`, but only
occasionally. I create these directories manually at the moment.



3) Power management: this might not be related to Sway, but maybe I'm
solving too many problems at the same time, and power management is
the showstopper for using this laptop. So I'll ensure that power
manament works properly before experimenting with Sway.