Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: runit: wpa_supplicant's output shows up on tty1 (Read 1198 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

runit: wpa_supplicant's output shows up on tty1

I'm setting up a new Artix install with runit, and using connman as the network connection manager. I've enabled the connmand service with runit and it works fine. However, when I boot up I get network status messages printed out after my login: prompt shows up, as shown in the attached picture (sorry for the low quality).

What I think is happening here is that connman is starting wpa_supplicant to connect to wifi, but wpa_supplicant is writing its output to the console (?). I've set up logging for connmand, and modified runit's `run` file for connmand to redirect stderr to stdout ( 2>&1, which for some reason wasn't in there by default ), however none of this has stopped this behavior from happening.

Additional info:
While the system is running, more network status messages will occasionally be printed to the console, as shown in my second attachment. I've noticed that these only get printed to tty1, even if I'm currently using another tty (it's on tty1 when I switch back to it).
I've tried using iwd instead of wpa_supplicant, but iwd also prints its status messages to the console just like wpa_supplicant does.

Any help would be appreciated, this has been bugging me for a while and I'm not sure what else to try.

Re: runit: wpa_supplicant's output shows up on tty1

Reply #1
If you add:
console=tty2
by editing the linux kernel command line at boot for a one-off test, this will send all input sent to /dev/console to tty2 - (CTRL ALT F2, not F7 tty7 the usual GUI tty, or tty1 the boot screen.)
Then at least you will know if the messages are sent to /dev/tty1 or /dev/console which might help narrow down the problem.
The resulting boot screen might look oddly empty as tty1 won't be showing anything sent to /dev/console.

 

Re: runit: wpa_supplicant's output shows up on tty1

Reply #2
If you add:
console=tty2
by editing the linux kernel command line at boot for a one-off test, this will send all input sent to /dev/console to tty2 - (CTRL ALT F2, not F7 tty7 the usual GUI tty, or tty1 the boot screen.)
Then at least you will know if the messages are sent to /dev/tty1 or /dev/console which might help narrow down the problem.
The resulting boot screen might look oddly empty as tty1 won't be showing anything sent to /dev/console.
Thanks for the suggestion,  when I add console=tty2 to the kernel command line, all the messages show up on tty2 instead of tty1, so I guess that means everything's being sent to /dev/console.

That being said, I think I solved my problem. I tried installing iwd again and had the same problem (iwd's output showing up on the console as well), but all I had to do was set up logging for the iwd service. This setup is somewhat different from what it was with wpa_supplicant: I have iwd enabled as a runit service (with logging), but when I was using wpa_supplicant, connman (I think?) was starting wpa_supplicant instead of me having it enabled as a service. So this problem could probably be solved with wpa_supplicant by enabling the wpa_supplicant service and setting up logging, however I believe the wpa_supplicant service also requires you to set up a config file.