Background
I have a new HP (pavilion power) laptop 15-CB040ND with originally windows 10 home on it. I installed Ubuntu 18.04 alongside windows for dual-boot, although I should mention that the instal first froze and had to add the line acpi=off in GRUB to get to the install screen and run ubuntu.
After installing I noticed I had no wifi, upon going to wifi settings it states that no wifi-adapter can be found. I searched and triedy many solutions on internet, but it did not help. The first thing I tried was to reinstall the wifi with the command:
sudo apt-get install --reinstall bcmwl-kernel-source
but this did not work.
As a side note, I do have wifi while booting into windows and only have internet on ubuntu through USB tethering.
Searching for solution
Upon searching the internet I came across the command:
rfkill list all
Which gave
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: yes
So my wireless Lan is hard blocked and sudo rfkill unblock all does not help. Some people say this can unlocked with a wifi signal button, but I do not have this. I do have airplane mode, but it does not do anything and besides, my wifi is working in windows. And some other like Wifi doesnt work on fresh ubuntu 16.04 and Why is Wifi not working on my HP laptop? say that some things can be blacklisted and this unlocked the hard block and enabled wifi for them.
My question is how I can fix my wifi? I have not properly tried blacklisting as I do not know what to blacklist for my laptop. From another link I cannot find anymore I tried the following commands which it worked for another person:
sudo modprobe -r hp-wireless
But did not unlock it and I tried:
sudo modprobe hp-wmi
But this said I do not have such a device
Below I have executed some commands to give info about my laptop and hopefully can be of use to help me fix my wifi:
lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 05)
00:01.0 PCI bridge: Intel Corporation Skylake PCIe Controller (x16) (rev 05)
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
00:04.0 Signal processing controller: Intel Corporation Skylake Processor Thermal Subsystem (rev 05)
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31)
00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)
00:17.0 SATA controller: Intel Corporation Sunrise Point-H SATA Controller [AHCI mode] (rev 31)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #1 (rev f1)
00:1c.4 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #5 (rev f1)
00:1c.5 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #6 (rev f1)
00:1c.6 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #7 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #9 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31)
00:1f.3 Audio device: Intel Corporation CM238 HD Audio Controller (rev 31)
00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31)
01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader (rev 01)
04:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
06:00.0 Non-Volatile memory controller: Toshiba America Info Systems Device 0116
lsmod | grep -e hp -e wmi
snd_rawmidi 32768 1 snd_seq_midi
snd_seq_device 16384 3 snd_seq,snd_rawmidi,snd_seq_midi
snd 81920 23 snd_hda_intel,snd_hwdep,snd_seq,snd_hda_codec,snd_timer,snd_rawmidi,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_seq_device,snd_hda_codec_realtek,snd_pcm
shpchp 36864 0
lspci -knn | grep Net -A2
04:00.0 Network controller [0280]: Intel Corporation Wireless 7265 [8086:095a] (rev 59)
Subsystem: Intel Corporation Dual Band Wireless-AC 7265 [8086:5010]
Kernel driver in use: iwlwifi
uname -a; dmesg | grep iwl
HP-Pavilion-Power-Laptop-15-cb0xx 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[ 3.769394] iwlwifi 0000:04:00.0: can't find IRQ for PCI INT A; please try using pci=biosirq
[ 3.825211] iwlwifi 0000:04:00.0: loaded firmware version 29.1044073957.0 op_mode iwlmvm
[ 3.903684] iwlwifi 0000:04:00.0: Detected Intel(R) Dual Band Wireless AC 7265, REV=0x210
[ 3.910727] iwlwifi 0000:04:00.0: reporting RF_KILL (radio disabled)
[ 3.940168] iwlwifi 0000:04:00.0: base HW address: b8:08:cf:a6:2e:67
[ 3.978811] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
[ 5.618745] iwlwifi 0000:04:00.0 wlo1: renamed from wlan0