What is the output in terminal of:
sudo apt install gcc
and
sudo apt install build-essential
What is the output in terminal of:
sudo apt install gcc
and
sudo apt install build-essential
Good news!
It looks like it got fixed. Everything looks normal now. I am able to see the icon and connect now. I restarted it 3 times and I was able to connect all 3 times. I will reply to this topic if this issue occurs again. Thank you all for spending your valuable time for helping me out.
Hello. It looks like the problem is still there. Is this an issue of core being too much for my device as I found out from @Aravisian from another topic ? And talking about that topic "Laptop locks itself again and again after being locked once" it looks like it got fixed.
The output of the above commands:
jeslin@jeslin-Satellite-L510:~$ sudo apt install gcc
[sudo] password for jeslin:
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version (4:9.3.0-1ubuntu2).
The following packages were automatically installed and are no longer required:
libcurl4 linux-headers-5.11.0-25-generic linux-hwe-5.11-headers-5.11.0-25
linux-image-5.11.0-25-generic linux-modules-5.11.0-25-generic
linux-modules-extra-5.11.0-25-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
jeslin@jeslin-Satellite-L510:~$ sudo apt install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.8ubuntu1.1).
The following packages were automatically installed and are no longer required:
libcurl4 linux-headers-5.11.0-25-generic linux-hwe-5.11-headers-5.11.0-25
linux-image-5.11.0-25-generic linux-modules-5.11.0-25-generic
linux-modules-extra-5.11.0-25-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Is there a wifi switch on the laptop ? fn + wifi key or a seperate key ?
unfortunately, no 
Hope this helps for you
Hmm, the wifi key on the function keys is toggling the airplane mode
I could not find the find the rc.local file. I searched for it but couldn't find it.
So the issue stopped, then returned?
What happens if you run sudo systemctl restart networking in terminal?
Yes.
Here is the output of sudo systemctl restart networking
jeslin@jeslin-Satellite-L510:~$ sudo systemctl restart networking
[sudo] password for jeslin:
Failed to restart networking.service: Unit networking.service not found.
Maybe it's:
sudo systemctl restart NetworkManager
is it supposed to show nothing after I enter my password?
jeslin@jeslin-Satellite-L510:~$ sudo systemctl restart NetworkManager
[sudo] password for jeslin:
jeslin@jeslin-Satellite-L510:~$
If it works, yes.
It will only give a message if something went wrong.
What this shows is that the network manager is working... If your icon vanishes and it drops out - then try that command.
Thanks a lot. Now the wifi icon is visible 
I tried this one but no use.
This clarifies it is not desktop related...
What is your output if this terminal command, again?
sudo lshw -C network
jeslin@jeslin-Satellite-L510:~$ sudo lshw -C network
[sudo] password for jeslin:
*-network
description: Ethernet interface
product: RTL810xE PCI Express Fast Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:02:00.0
logical name: enp2s0
version: 02
serial: 00:1e:33:f9:e0:4c
capacity: 100Mbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.11.0-36-generic latency=0 link=no multicast=yes port=twisted pair
resources: irq:16 ioport:2000(size=256) memory:d0410000-d0410fff memory:d0400000-d040ffff memory:d3600000-d361ffff
*-network
description: Ethernet interface
physical id: 2
bus info: usb@2:3
logical name: usb0
serial: a2:3c:ce:3b:6f:a6
capabilities: ethernet physical
configuration: broadcast=yes driver=rndis_host driverversion=5.11.0-36-generic firmware=RNDIS device ip=192.168.42.67 link=yes multicast=yes