Artix Linux Forum

Artix Linux => Installation / Migration / Configuration => Topic started by: jzS6qNc on 08 March 2021, 02:02:59

Title: Failed to initialize D-Bus, iwd spamming tty before login
Post by: jzS6qNc on 08 March 2021, 02:02:59
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
Title: Re: Failed to initialize D-Bus, iwd spamming tty before login
Post by: Dudemanguy on 08 March 2021, 15:11:14
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.
Title: Re: Failed to initialize D-Bus, iwd spamming tty before login
Post by: jzS6qNc on 08 March 2021, 18:16:15
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
Title: Re: Failed to initialize D-Bus, iwd spamming tty before login
Post by: Dudemanguy on 08 March 2021, 20:50:06
This stuff can always be redirected to /dev/null.
Title: Re: Failed to initialize D-Bus, iwd spamming tty before login
Post by: jzS6qNc on 09 March 2021, 19:27:56
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
Title: Re: Failed to initialize D-Bus, iwd spamming tty before login
Post by: Dudemanguy on 10 March 2021, 05:36:03
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
Title: Re: Failed to initialize D-Bus, iwd spamming tty before login
Post by: jzS6qNc on 10 March 2021, 22:22:11
doesn't work, any other ideas? maybe it's not the iwd that's sending the messages?
Title: Re: Failed to initialize D-Bus, iwd spamming tty before login
Post by: daltomi on 11 March 2021, 04:53:18
(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
Title: Re: Failed to initialize D-Bus, iwd spamming tty before login
Post by: jzS6qNc on 12 March 2021, 14:25:44
I tried the first method and it works. Thank you.