nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
7.05k stars 1.82k forks source link

bug: wpaperd - daemon never starts #4538

Open bashfulrobot opened 1 year ago

bashfulrobot commented 1 year ago

Are you following the right branch?

Is there an existing issue for this?

Issue description

I have configured wpaperd with the following code:

{ pkgs, lib, config, ... }: {
  programs.wpaperd = {
    enable = true;
    settings = {
      default = {
        path = "${config.home.homeDirectory}/Pictures/Wallpapers";
        duration = "30m";
        apply-shadow = true;
        sorting = "random";
      };
    };
  };
}

I then added exec wpaperd in my sway config, but the daemon never seems to run. If I run it at the terminal, the command has no effect.

I then ran the command with strace wpaperd and got the following output:

λ strace wpaperd
execve("/etc/profiles/per-user/dustin/bin/wpaperd", ["wpaperd"], 0x7ffc7dd2df70 /* 81 vars */) = 0
brk(NULL)                               = 0x55e69711e000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd6c6b5040) = -1 EINVAL (Invalid argument)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbce5dfd000
access("/etc/ld-nix.so.preload", R_OK)  = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/glibc-hwcaps/x86-64-v3/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/glibc-hwcaps/x86-64-v3", 0x7ffd6c6b4270, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/glibc-hwcaps/x86-64-v2/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/glibc-hwcaps/x86-64-v2", 0x7ffd6c6b4270, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib", {st_mode=S_IFDIR|0555, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/glibc-hwcaps/x86-64-v3/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/glibc-hwcaps/x86-64-v3", 0x7ffd6c6b4270, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/glibc-hwcaps/x86-64-v2/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/glibc-hwcaps/x86-64-v2", 0x7ffd6c6b4270, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/xq05361kqwzcdamcsxr4gzg8ksxrb8sg-gcc-12.3.0-lib/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0444, st_size=141696, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 131400, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fbce5ddc000
mmap(0x7fbce5de0000, 94208, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x7fbce5de0000
mmap(0x7fbce5df7000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b000) = 0x7fbce5df7000
mmap(0x7fbce5dfb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7fbce5dfb000
close(3)                                = 0
openat(AT_FDCWD, "/nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0555, st_size=998104, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 913432, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fbce5cfc000
mmap(0x7fbce5d0a000, 475136, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe000) = 0x7fbce5d0a000
mmap(0x7fbce5d7e000, 376832, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x82000) = 0x7fbce5d7e000
mmap(0x7fbce5dda000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xde000) = 0x7fbce5dda000
close(3)                                = 0
openat(AT_FDCWD, "/nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220<\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0555, st_size=2252696, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1990000, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fbce5b16000
mmap(0x7fbce5b38000, 1413120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x22000) = 0x7fbce5b38000
mmap(0x7fbce5c91000, 360448, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17b000) = 0x7fbce5c91000
mmap(0x7fbce5ce9000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d3000) = 0x7fbce5ce9000
mmap(0x7fbce5cef000, 52592, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fbce5cef000
close(3)                                = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbce5b14000
arch_prctl(ARCH_SET_FS, 0x7fbce5b14d40) = 0
set_tid_address(0x7fbce5b15010)         = 19693
set_robust_list(0x7fbce5b15020, 24)     = 0
rseq(0x7fbce5b15660, 0x20, 0, 0x53053053) = 0
mprotect(0x7fbce5ce9000, 16384, PROT_READ) = 0
mprotect(0x7fbce5dda000, 4096, PROT_READ) = 0
mprotect(0x7fbce5dfb000, 4096, PROT_READ) = 0
mprotect(0x55e696c56000, 204800, PROT_READ) = 0
mprotect(0x7fbce5e30000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 0 (Timeout)
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fbce5b4ed30}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSEGV, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSEGV, {sa_handler=0x55e696b42030, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7fbce5b4ed30}, NULL, 8) = 0
rt_sigaction(SIGBUS, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGBUS, {sa_handler=0x55e696b42030, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7fbce5b4ed30}, NULL, 8) = 0
sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fbce5b11000
mprotect(0x7fbce5b11000, 4096, PROT_NONE) = 0
sigaltstack({ss_sp=0x7fbce5b12000, ss_flags=0, ss_size=8192}, NULL) = 0
getrandom("\xdb\x46\x0d\x5b\x04\x5c\x66\x17", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x55e69711e000
brk(0x55e69713f000)                     = 0x55e69713f000
openat(AT_FDCWD, "/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
newfstatat(3, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0
read(3, "55e69685e000-55e6968ae000 r--p 0"..., 1024) = 1024
read(3, "e/ld03l52xq2ssn4x0g5asypsxqls404"..., 1024) = 1024
read(3, "977511                  /nix/sto"..., 1024) = 1024
read(3, "p 0001f000 103:02 18401564      "..., 1024) = 1024
read(3, "ack]\n7ffd6c79c000-7ffd6c7a0000 r"..., 1024) = 249
close(3)                                = 0
sched_getaffinity(19693, 32, [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]) = 8
mkdir("/home/dustin/.config/wpaperd", 0777) = -1 EEXIST (File exists)
statx(AT_FDCWD, "/home/dustin/.config/wpaperd", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0755, stx_size=4096, ...}) = 0
statx(AT_FDCWD, "/home/dustin/.config/wpaperd/wpaperd.conf", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0x7ffd6c6b40a0) = -1 ENOENT (No such file or directory)
statx(0, NULL, AT_STATX_SYNC_AS_STAT, STATX_ALL, NULL) = -1 EFAULT (Bad address)
mkdir("/home/dustin/.config/wpaperd", 0777) = -1 EEXIST (File exists)
statx(AT_FDCWD, "/home/dustin/.config/wpaperd", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0755, stx_size=4096, ...}) = 0
statx(AT_FDCWD, "/home/dustin/.config/wpaperd/wpaperd.toml", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0x7ffd6c6b3f50) = -1 ENOENT (No such file or directory)
ioctl(1, TCGETS, {c_iflag=ICRNL|IXON|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0
ioctl(2, TCGETS, {c_iflag=ICRNL|IXON|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0
getrandom("\x29\xe6\x10\x19\x9e\x81\xe7\x56\x32\xb4\xd7\x75\xfc\xfb\x1b\xe1", 16, GRND_INSECURE) = 16
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fbce5b15010) = 19694
sigaltstack({ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=8192}, NULL) = 0
munmap(0x7fbce5b11000, 12288)           = 0
exit_group(0)                           = ?
+++ exited with 0 +++

I originally opened an issue on the package itself, but I was asked to open an issue on this repo.

Is it odd that we do not see the strace output reflect wallpaper.toml?

thank you.

Maintainer CC

@avi

System information

λ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.55, NixOS, 23.11 (Tapir), 23.11.20231001.fdd898f`
 - multi-user?: `yes`
 - sandbox: `relaxed`
 - version: `nix-env (Nix) 2.17.0`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
denizbaba0 commented 1 year ago

Bump, it seems there is no systemd/whatever service to run it. A small oversight.

denizbaba0 commented 1 year ago

But it runs - when I manually do it.

stale[bot] commented 9 months ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

dwf commented 5 months ago

This is a trivial fix but it should also probably be renamed services.wpaperd in that case.