Frequent WiFi disconnections

I see that there are several similar problems in the forum but I’m experiencing this for Xfce.

Problem

I have an issue where my PC frequently disconnects from the WiFi network. The signal isn’t particularly strong since I’m using my main rig as a mobile hotspot and sharing its internet through a USB WiFi adapter, but there’s another Windows device connected to it that never experiences such downtimes.

Oh and I am trying to mine with its CPU so it does routinely send packets over through the stratum protocol. I’m using sugarmaker.

EDIT: currently not connecting to my hotspot network but connects with my home network.

Due Diligence

I’ve gone through the solutions of NetworkManager keeps getting disconnected [SOLVED] / Newbie Corner / Arch Linux Forums and https://www.reddit.com/r/archlinux/comments/1x7ph8/network_manager_disconnects_randomly/ but they don’t seem to be applicable for me:

» Only Network Manager and TLP seem to be the two programs which can control the network and I’ve already set TLP to ignore network power saving.
» I already have gnome-keyring but it’s not affecting anything (I haven’t performed any additional setup though).

Other links:
» Wifi disconnects randomly

Spec

inxi -Nxxxa
Network:    Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Micro-Star MSI driver: r8169 v: kernel
            port: e000 bus-ID: 01:00.0 chip-ID: 10ec:8168 class-ID: 0200
            Device-2: Realtek RTL8188EUS 802.11n Wireless Network Adapter type: USB driver: r8188eu bus-ID: 1-7:9
            chip-ID: 0bda:8179 class-ID: 0000 serial: 00E04C0001
  1. Output of inxi --admin --verbosity=7 --filter --width
    https://0x0.st/-R71.txt
  2. Output of sudo systemctl --all
    https://0x0.st/-R7p.txt
  3. Output of journalctl --catalog --priority=3 --boot=-1
    https://0x0.st/-R72.txt

I have TeamViewer on my device.

What didn’t work

  1. Trying to run watch -n 600 systemctl restart NetworkManager (will cause a GUI password prompt to appear, needs to work without my intervention).

What seems to be working

  1. Setting up /etc/NetworkManager/NetworkManager.conf with
    [device]
    wifi.scan-rand-mac-address=no
    
    Here, the adapter usually stays connected for a long time, but disconnects still happen and a GUI prompt for gnome-keyring appears. I’m looking for a solution which does away with this manual intervention.

Some parts of this solution sound quite complex (recreating initramfs) so I’ll need some handholding here, if anyone’s willing.

Hello,
Please send the output of the dmesg command after the issue occurs a few times. Thanks!

dmesg gives no outputs related to networks even after a few failures.

It does give output for NIC/hardware failure which could be the issue.