gbcox
(Gerald B Cox)
January 2, 2021, 11:16pm
1
https://bugzilla.redhat.com/show_bug.cgi?id=1754395
https://bugzilla.redhat.com/show_bug.cgi?id=1897717
opened 08:39AM - 21 Oct 16 UTC
closed 03:02PM - 19 Jan 21 UTC
RFE 🎁
pid1
### Submission type
- [x] Bug report
- [ ] Request for enhancement (RFE)
### sys… temd version the issue has been seen with
systemd 231
+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN
### Used distribution
Archlinux
### In case of bug report: Steps to reproduce the problem
$ dbus-update-activation-environment --systemd --all
`dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.InvalidArgs: Invalid environment assignments`
$ busctl monitor --user
http://sprunge.us/cNWK
A number of these variables are being set by grml-zsh-config http://grml.org/zsh/#grmlzshconfig
opened 01:47AM - 29 Nov 20 UTC
closed 11:48AM - 14 Jan 21 UTC
Works fine with X, however when using SDDM with Radeon graphics, black desktop o… ccurs.
When using GDM, Wayland and Radeon, also works fine.
Opened Fedora bug here:
https://bugzilla.redhat.com/show_bug.cgi?id=1897717
I’ve been researching a black screen bug for about a month now and ultimately find that this problem has been going on in one form or another for years. Here it is in a nutshell, from one of the comments:
Cause of this bug is simple - systemd don’t import ALL enviroment variables if any variable name is not POSIX compilant
(it must conform to the regex [0-9A-Z_], see: https://github.com/systemd/systemd/blob/a859abf062cef1511e4879c4ee39c6036ebeaec8/src/basic/env-util.c#L19 ).
You can test it with this command: env %=1 systemctl --user import-environment
, it will fail.
Now there is 2 known packages exporting those variables: environment-modules and Lmod.
Solution is simple - skip ONLY invalid variables while importing others.
I’ve created bug in the systemd, but still without answer - exporting bash functions as env vars are not compatible with systemctl's `--import-environment` operation · Issue #14878 · systemd/systemd · GitHub .
So, what we basically have is two projects lmod and environment-modules that create apparently non-compliant env variables that systemd won’t recognize. This in turn has caused and is continuing to cause a cascading trail of havoc. The correct way to fix this is either lmod and environment-modules change to a compliant naming scheme or systemd accept the names - or just skip the ones it doesn’t want to recognize. @mattdm I think we need some intervention here.
mattdm
(Matthew Miller)
January 2, 2021, 11:44pm
2
File a Fedora bug explaining the overall problem and nominate it as a potential prioritized bug . We’ll review and see what we can do.
gbcox
(Gerald B Cox)
January 3, 2021, 12:02am
3
Thanks. I created bug here: 1912046 – BASH_FUNC environment variables reigning havoc and it just keeps getting worse
We should be addressing the root cause rather than playing whack-a-mole.
2 Likes
mattdm
(Matthew Miller)
January 3, 2021, 12:05am
4
Yep, thanks. Continued conversation in that bug.