Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Failed to initialize D-Bus, iwd spamming tty before login (Read 1127 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Failed to initialize D-Bus, iwd spamming tty before login

Recently I migrated from arch.
Things mostly work fine, but I get this right after artix boots up:
Code: [Select]
1 rule loaded.
waiting for events; event logging is off
Wireless daemon version 1.12
Loaded configuration from /etc/iwd/main.conf
Failed to initialize D-Bus
Wireless daemon version 1.12
Loaded configuration from /etc/iwd/main.conf
Failed to initialize D-Bus
Wireless daemon version 1.12
Loaded configuration from /etc/iwd/main.conf
Failed to initialize D-Bus
Wireless daemon version 1.12
Loaded configuration from /etc/iwd/main.conf
Failed to initialize D-Bus
Wireless daemon version 1.12
Loaded configuration from /etc/iwd/main.conf
[General].APRanges must be set for DHCP
Wiphy: 0, Name: phy0
    Permanent Address: <my addres>
    Bands <...>
    Ciphers <...>
    Supporet iftypes <...>
How do I get rid of this?
quick edit: I'm using runit

Re: Failed to initialize D-Bus, iwd spamming tty before login

Reply #1
Sounds like iwd should have a check on dbus before starting (that's why it fails until dbus is started). Not sure if it would still print the success messages though. I didn't realize that iwd depended on dbus running though, thanks for the report.

Re: Failed to initialize D-Bus, iwd spamming tty before login

Reply #2
is there a way to output that to a log, either system log or redirect the output to a file?
everything works fine but I'd rather not see these things show up

Re: Failed to initialize D-Bus, iwd spamming tty before login

Reply #3
This stuff can always be redirected to /dev/null.

Re: Failed to initialize D-Bus, iwd spamming tty before login

Reply #4
ok, I'm a noob so could you please tell me where to put that?
I tried putting it in /etc/runit/sv/iwd/run
Code: [Select]
#!/bin/sh
[ -r ./conf ] && . ./conf
exec 2>&1
exec /usr/lib/iwd/iwd ${OPTS} >> /path/to/logfile
but this doesn't work

Re: Failed to initialize D-Bus, iwd spamming tty before login

Reply #5
Maybe the extra exec has weird behavior with runit. You could try (the same thing in theory but one command).

Code: [Select]
#!/bin/sh
[ -r ./conf ] && . ./conf
exec /usr/lib/iwd/iwd ${OPTS} 2>&1 >> /path/to/file

Re: Failed to initialize D-Bus, iwd spamming tty before login

Reply #6
doesn't work, any other ideas? maybe it's not the iwd that's sending the messages?

Re: Failed to initialize D-Bus, iwd spamming tty before login

Reply #7
(google translate) :-X
I would do it like this:

1- Install the galaxy/socklog package, initialize and enable it.
2- Create the directory /var/log/iwd
3- Create the/etc/runit/sv/iwd/log directory
4- Create the file /etc/runit/sv/iwd/log/run as executable.
    With the following:
Code: [Select]
    #!/bin/sh
    exec chpst -u root svlogd /var/log/iwd
5- Restart the iwd service.
6- See the log:
    sudo tail -f /var/log/socklog/everything/current
   
Optionally you can edit the iwd service to detect if dbus has started:

Code: [Select]
#!/bin/sh
sv check dbus || exit 1 # <<< new line
[ -r ./conf ] && . ./conf
exec 2>&1
exec /usr/lib/iwd/iwd ${OPTS}

Suerte.

EDIT: My application can help you configure the service, it takes care of creating the related directories and files, see  https://github.com/daltomi/xsv

 

Re: Failed to initialize D-Bus, iwd spamming tty before login

Reply #8
I tried the first method and it works. Thank you.