Network goes missing after booting Windows on dual boot system

I have a Lenovo Legion laptop. I’ve configured it to boot both Leap 15.2 and Windows 10 from Grub. I rarely boot Windows, but when I do and boot Leap after shutting Windows down, Leap does not detect any network - network manager shows up with a red x on the icon and it won’t recognize wireless or, I assume, any wired network. If I shut down and then reboot Leap, everything works as it should. I assume Windows is hosing something as is its wont. Is there any way to fix this problem so that I don’t have to boot Opensuse twice?

Provide info about your hardware.
Contact Lenovo support.
Check that: https://bugzilla.kernel.org/show_bug.cgi?id=87771

This thread may be of interest.

Adapting for openSUSE, something like…

sudo zypper install -t pattern devel_basis
sudo zypper install dkms git
git clone https://github.com/jeremyb31/ideapad-laptop.git
sudo dkms add ./ideapad-laptop
sudo dkms install ideapad-laptop/1.0
echo "options ideapad_laptop override_has_hw_rfkill_switch=0" | sudo tee /etc/modprobe.d/ideapad_laptop.conf

Since you don’t use Windows much, why not just don’t ever shut it down? Instead, reboot, and at the Grub menu, power it off with the switch. If this doesn’t work for fixing networking, try rebooting into openSUSE, then shut it down, and it should have working network on next openSUSE boot.

I never shut Windows down. I always select reboot when I’m done with Windows, and either power down with the switch during or shortly after POST, or boot into Linux.

I experienced a similar issue when booting into Fedora and then booting into Tumbleweed again. Fixed that by switching from wicked to networkd/resolved.

You may try to use dhcp and static hostnames for Windows and Leap:

**erlangen:~ #** hostnamectl  
**   Static hostname: erlangen **
         Icon name: computer-desktop 
           Chassis: desktop 
          Location: home 
        Machine ID: 94f3af277bac4a8eb57da425c9677379 
           Boot ID: d44b904d6b9046ba9371cc780afdac0c 
  Operating System: openSUSE Tumbleweed 
       CPE OS Name: cpe:/o:opensuse:tumbleweed:20210305 
            Kernel: Linux 5.11.2-1-default 
      Architecture: x86-64 
**erlangen:~ #**



The issue the OP is describing has nothing to do with the choice of network management. The wifi device is effectively disabled at boot (allegedly by the state it is put in by Windows at shutdown).

I am not sure about this. My machine has Windows too. It doesn’t matter whether I reboot or shutdown Windows. See also https://forums.opensuse.org/showthread.php/534453-Switching-to-Fedora-and-back-to-openSUSE-renders-wireless-interface-dormant Similar issues occurred frequently upon rebooting into another system or suspending to RAM and resuming.

A couple of points: I’m already using networkd, so that is not the issue. It is definitely a state Windows puts the system into at shutdown. When I first boot Opensuse there is no wifi, when I reboot Opensuse from Opensuse, wifi mysteriously reappears.

The thread that Deano_Ferrari recommends with the code:

sudo zypper install -t pattern devel_basissudo zypper install dkms git
git clone https://github.com/jeremyb31/ideapad-laptop.git
sudo dkms add ./ideapad-laptop
sudo dkms install ideapad-laptop/1.0 echo "options ideapad_laptop override_has_hw_rfkill_switch=0" | sudo tee /etc/modprobe.d/ideapad_laptop.conf

looks like it would take care of the problem. Unfortunately, the C program included in the code, while showing three Lenovo Legions, does not have my model number, 151MH05H, so I can’t use it without some modifications.

Can you confirm rfkill wifi state at first boot?

/usr/sbin/rfkill list

. Unfortunately, the C program included in the code, while showing three Lenovo Legions, does not have my model number, 151MH05H, so I can’t use it without some modifications.

Most of that code is just used to match against the various models it supports. You could likely adjust by relaxing the matching like this

{
                .ident = "Lenovo Y720",
                .matches = {
                        DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
                },
},

Thanks, if I relax the match, might I harm something if my model is not supported?

As for rfkill, here is the output after first boot:

0: ideapad_wlan: Wireless LAN    Soft blocked: no
    Hard blocked: no
1: ideapad_bluetooth: Bluetooth
    Soft blocked: yes
    Hard blocked: no
2: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no

After the second boot, when wifi is working, I get

0: ideapad_wlan: Wireless LAN    Soft blocked: no
    Hard blocked: no
1: ideapad_bluetooth: Bluetooth
    Soft blocked: yes
    Hard blocked: no
2: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
3: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no

No, it just takes care of overriding the value of some rfkill parameters, which prevent the wifi device from being active (ie phy0 is absent).

You might also check if your UEFI firmware settings allow the wifi device to be enabled at boot perhaps.

It’s still a mystery. The downloaded fix had no effect and wifi on boot is enabled in UEFI. It appears I don’t have to get all the way into Opensuse to fix the problem. If I get to Grub and then reboot, wifi works.

Strange. Not sure if a bug report can fix this.