openSUSE / SUSEPrime

Provide nvidia-prime like package for openSUSE
65 stars 11 forks source link

NetworkManager not working after switching graphics device #43

Closed lutzgruber closed 4 years ago

lutzgruber commented 4 years ago

Hi,

I am using SUSEPrime on a current Tumbleweed installation.

SUSEPrime requires a log out, log back in procedure after switching the graphics device. After such a log out, log in cycle, NetworkManager does not work anymore, producing the following error message when trying to connect: Error: Connection activation failed: No suitable device found for this connection (device wlanxxx not available because device is not available).

I also noticed that wpa_supplicant is not running after such a log out, log in procedure. I can establish a wifi connection after manually starting wpa_supplicant, and then using iwconfig and dhclient.

Everything works again flawlessly after a reboot. Also, there are no problems after a log out, log in cycle that is not preceded by switching the graphics device with SUSEPrime.

I would be happy to provide logging and debugging output if the appropriate file locations are pointed out.

Thank you

simopil commented 4 years ago

Hi, Yes I perfectly know this bug, I've found a workaround that consist to set wpa_supplicant service in autostart mode. I don't know why this happens but I think wpa supplicant don't like init switches. We can try to nofify wpa_supplucant developers about this Thanks

sndirsch commented 4 years ago

OMG! That's bad! :-(

simopil commented 4 years ago

Yes, it isn't good thing. I'll do some tests without SUSEPrime (only init switches) for wpa_supplicant and #41 issue related things too, I think issue isn't our service but init switch cycle

simopil commented 4 years ago

Can you post the output of "sudo cat /usr/lib/systemd/system/wpa_supplicant.service" ? I noticed that mine isn't different from default anymore because updates, and SUSEprime works as expected with wireless networking. Take a look to this wpa_supplicant service update, I think this resolved issue in my system. Thanks

lutzgruber commented 4 years ago
sudo cat /usr/lib/systemd/system/wpa_supplicant.service
[sudo] password for root: 
[Unit]
Description=WPA Supplicant daemon
After=dbus.service network.target

[Service]
Type=dbus
BusName=fi.w1.wpa_supplicant1
ExecStart=/usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -u -t -f /var/log/wpa_supplicant.log

[Install]
WantedBy=multi-user.target

Has the wpa_supplicant update you referenced been included into a current Tumbleweed build? I regularly run zypper dup, so I expect to my system to be mostly up to date.

simopil commented 4 years ago

Your service configuration is the same of mine

tankwyn commented 4 years ago

I've encountered this problem too, a temporary solution is restart NM after switching to runlevel 5: init 5 && systemctl restart NetworkManager The Optimus-manager of Arch handles this quite well, so does the ubuntu solution. Hope to see more advancements in suse!

lutzgruber commented 4 years ago

I confirm that running sudo systemctl restart NetworkManager after logging back in restores network connectivity.

Did this become a NetworkManager bug or is this still a SUSEPrime issue?

simopil commented 4 years ago

You can try switch to init3 then init5 without suse prime seevice and see if NetworkManager works. In my system this bug not appens anymore so I can't try

tankwyn commented 4 years ago

while leaving the prime-select service disabled, the issue persists. Might be a NM bug, what's the version of your NM and systemd? @simopil

simopil commented 4 years ago

NM 1.22.2 and systemd 243

simopil commented 4 years ago

Look today's 0.7.5 release, it should fixes the issue

lutzgruber commented 4 years ago

Apologies for the delay, and thank you very much for the fast fix!

My current Tumbleweed installation with suse-prime-bbswitch 0.7.5-1.1 does not have this problem anymore!