Can't get wifi to work on Asus laptop (manjaro KDE)

I was running linux63 on my laptop which was having issues with frequent freezing and wifi not working. Downgraded the kernel to 6.1.38-1 (LTS), the freezing issue seems to be resolved but still can’t get wifi to work.

I tried following a few threads on arch wiki with no success. My current driver is r8169, tried installing r8168 (unsuccessfully).

sudo dmesg | grep r8169                                                   ✔  basic  
[    2.068261] r8169 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
[    2.081866] r8169 0000:02:00.0 eth0: RTL8125B, 04:42:1a:a1:f3:f1, XID 641, IRQ 160
[    2.081871] r8169 0000:02:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[    2.147230] r8169 0000:02:00.0 enp2s0: renamed from eth0
[    3.466428] RTL8226B_RTL8221B 2.5Gbps PHY r8169-0-200:00: attached PHY driver (mii_bus:phy_addr=r8169-0-200:00, irq=MAC)
[    3.669938] r8169 0000:02:00.0 enp2s0: Link is Down

I don’t exactly know what the issue seems to be, any nudge in the right direction is greatly appreciated.

sudo mhwd -l -li                                                          ✔  basic  
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2023.03.23               false            PCI
     video-modesetting            2020.01.13                true            PCI
         network-r8168            2016.04.20                true            PCI


Warning: No installed USB configs!
> 0000:01:00.0 (0300:10de:25a0) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2023.03.23               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2023.03.23               false            PCI
          video-nvidia            2023.03.23               false            PCI
    video-nvidia-470xx            2023.03.23               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> 0000:00:02.0 (0300:8086:9a68) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2023.03.23               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2023.03.23               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI

inxi --full --admin --filter --width                                      ✔  basic  
System:
  Kernel: 6.1.38-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1-x86_64
    root=UUID=2dc1aead-efcd-4b0a-9cab-d13b0c8c0d48 rw quiet
    resume=UUID=55a4bfc8-2bef-4478-be36-a0e9946e9f1d udev.log_priority=3
  Desktop: KDE Plasma v: 5.27.6 tk: Qt v: 5.15.10 wm: kwin_x11 vt: 2 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: ASUSTeK product: ASUS TUF Gaming F15 FX506HEB_FX566HEB
    v: 1.0 serial: <superuser required>
  Mobo: ASUSTeK model: FX506HEB v: 1.0 serial: <superuser required>
    UEFI: American Megatrends LLC. v: FX506HEB.310 date: 11/25/2021
Battery:
  ID-1: BAT1 charge: 74.0 Wh (85.4%) condition: 86.7/90.2 Wh (96.1%)
    volts: 16.5 min: 15.9 model: ASUS A32-K55 type: Li-ion serial: N/A
    status: not charging
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse serial: <filter>
    charge: 55% (should be ignored) rechargeable: yes status: discharging
  Device-2: hidpp_battery_1 model: Logitech Wireless Keyboard
    serial: <filter> charge: 55% (should be ignored) rechargeable: yes
    status: discharging
CPU:
  Info: model: 11th Gen Intel Core i5-11400H bits: 64 type: MT MCP
    arch: Tiger Lake gen: core 11 level: v4 note: check built: 2020
    process: Intel 10nm family: 6 model-id: 0x8D (141) stepping: 1
    microcode: 0x44
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 480 KiB desc: d-6x48 KiB; i-6x32 KiB L2: 7.5 MiB desc: 6x1.2 MiB
    L3: 12 MiB desc: 1x12 MiB
  Speed (MHz): avg: 2700 min/max: 800/4500 scaling: driver: intel_pstate
    governor: powersave cores: 1: 2700 2: 2700 3: 2700 4: 2700 5: 2700 6: 2700
    7: 2700 8: 2700 9: 2700 10: 2700 11: 2700 12: 2700 bogomips: 64536
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB
    filling, PBRSB-eIBRS: SW sequence
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel TigerLake-H GT1 [UHD Graphics] vendor: ASUSTeK driver: i915
    v: kernel arch: Gen-12.1 process: Intel 10nm built: 2020-21 ports:
    active: eDP-1 empty: HDMI-A-1 bus-ID: 0000:00:02.0 chip-ID: 8086:9a68
    class-ID: 0300
  Device-2: NVIDIA GA107M [GeForce RTX 3050 Ti Mobile] vendor: ASUSTeK
    driver: nvidia v: 535.54.03 alternate: nouveau,nvidia_drm non-free: 535.xx+
    status: current (as of 2023-07) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-22 bus-ID: 0000:01:00.0
    chip-ID: 10de:25a0 class-ID: 0300
  Device-3: Sonix USB2.0 HD UVC WebCam driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-7:4 chip-ID: 322e:202c
    class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.8 compositor: kwin_x11 driver: X:
    loaded: modesetting,nvidia alternate: fbdev,nouveau,nv,vesa dri: iris
    gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x1080 s-dpi: 96 s-size: 1013x285mm (39.88x11.22")
    s-diag: 1052mm (41.43")
  Monitor-1: DP-1-0.2 pos: right res: 1920x1080 hz: 60 dpi: 102
    size: 480x270mm (18.9x10.63") diag: 551mm (21.68") modes: N/A
  Monitor-2: eDP-1 pos: primary,left res: 1920x1080 dpi: 142
    size: 344x194mm (13.54x7.64") diag: 395mm (15.55") modes: N/A
  API: OpenGL v: 4.6 Mesa 23.0.4 renderer: Mesa Intel UHD Graphics (TGL GT1)
    direct-render: Yes
Audio:
  Device-1: Intel Tiger Lake-H HD Audio vendor: ASUSTeK driver: snd_hda_intel
    v: kernel alternate: snd_sof_pci_intel_tgl bus-ID: 0000:00:1f.3
    chip-ID: 8086:43c8 class-ID: 0403
  Device-2: NVIDIA vendor: ASUSTeK driver: snd_hda_intel v: kernel
    bus-ID: 0000:01:00.1 chip-ID: 10de:2291 class-ID: 0403
  Device-3: Logitech G435 Wireless Gaming Headset
    driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
    lanes: 1 mode: 1.1 bus-ID: 3-4.2:6 chip-ID: 046d:0acb class-ID: 0300
    serial: <filter>
  API: ALSA v: k6.1.38-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 0.3.73 status: off with: pipewire-media-session
    status: active tools: pw-cli
  Server-3: PulseAudio v: 16.1 status: active with: pulseaudio-alsa
    type: plugin tools: pacat,pactl
Network:
  Device-1: Realtek vendor: ASUSTeK driver: r8169 v: kernel port: 3000
    bus-ID: 0000:02:00.0 chip-ID: 10ec:8162 class-ID: 0200
  IF: enp2s0 state: down mac: <filter>
  Device-2: Realtek RTL8153 Gigabit Ethernet Adapter driver: r8152 type: USB
    rev: 3.0 speed: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 bus-ID: 4-4.1:3
    chip-ID: 0bda:8153 class-ID: 0000 serial: <filter>
  IF: enp0s20f0u4u1 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: IMC Networks Wireless_Device driver: btusb v: 0.8 type: USB
    rev: 2.1 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-14:5 chip-ID: 13d3:3563
    class-ID: e001 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
RAID:
  Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd
    v: 0.6 port: N/A bus-ID: 0000:00:0e.0 chip-ID: 8086:9a0b rev: class-ID: 0104
Drives:
  Local Storage: total: 476.94 GiB used: 63.44 GiB (13.3%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SK Hynix model: HFM512GD3JX013N
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 41000C20 temp: 40.9 C
    scheme: GPT
Partition:
  ID-1: / raw-size: 100 GiB size: 97.87 GiB (97.87%) used: 29.93 GiB (30.6%)
    fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 513 MiB size: 512 MiB (99.80%)
    used: 312 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 361.79 GiB size: 355.04 GiB (98.14%)
    used: 33.52 GiB (9.4%) fs: ext4 dev: /dev/nvme0n1p4 maj-min: 259:4
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 14.65 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
Sensors:
  System Temperatures: cpu: 44.0 C mobo: N/A
  Fan Speeds (RPM): cpu: 3100
Info:
  Processes: 281 Uptime: 16m wakeups: 79 Memory: total: 16 GiB note: est.
  available: 15.37 GiB used: 2.58 GiB (16.8%) Init: systemd v: 253
  default: graphical tool: systemctl Compilers: gcc: 13.1.1 clang: 15.0.7
  Packages: pm: pacman pkgs: 1448 libs: 367 tools: pamac pm: flatpak pkgs: 0
  Shell: Zsh v: 5.9 default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.28

Maybe start here:

And please also provide

mhwd -l -li

How was this attempted? What was the result?

I tried following [SOLVED] Problem with Realtek 8111/8168/8411 | No internet | r8169 / Kernel & Hardware / Arch Linux Forums step d failed

So are the configurations from the other steps in place?

The last command could be changed to

sudo mkinitcpio -P

Though likely you could have simplified this all through mhwd … what was the output of mhwd -l -li ?

sudo mhwd -l -li                                                          ✔  basic  
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2023.03.23               false            PCI
     video-modesetting            2020.01.13                true            PCI
         network-r8168            2016.04.20                true            PCI


Warning: No installed USB configs!
> 0000:01:00.0 (0300:10de:25a0) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2023.03.23               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2023.03.23               false            PCI
          video-nvidia            2023.03.23               false            PCI
    video-nvidia-470xx            2023.03.23               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> 0000:00:02.0 (0300:8086:9a68) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2023.03.23               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2023.03.23               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI

I also edited my post with this.

I undid the blacklist step by deleting /etc/modprobe/rt8169_blacklist.conf

I don’t know what mhwd does sorry

mhwd = manjaro hardware detection … its how drivers are usually handled.

In your case the profile r8168 would have done everything for you instead of trying to follow that forum post.

So … if we are starting over then I would say to try this first:

sudo mhwd -i pci network-r8168

If that doesnt work then we could try some other things.
PS … is this a dual-boot with windoze ?

sudo mhwd -i pci network-r8168                                                                                               ✔  basic  

[sudo] password for soumadeep: 
Warning: no matching device for config 'network-r8168' found!
Warning: a version of config 'network-r8168' is already installed!
Use -f/--force to force installation...

P.S.: And, no - although the laptop came pre-installed with Windows, it has since been completely purged.

I tried this too out of curiosity

sudo mhwd -i pci network-r8169                                                                                 1 ✘  took 4s   basic  
Error: config 'network-r8169' does not exist!

We can try the force to ‘reinstall’ it … though its odd it states no matching device.

sudo mhwd -f -i pci network-r8168

WiFi still doesn’t work.

sudo mhwd -f -i pci network-r8168                                                                                          1 ✘  basic  
Warning: no matching device for config 'network-r8168' found!
> Removing network-r8168...
Sourcing /etc/mhwd-x86_64.conf
Has lib32 support: true
Sourcing /var/lib/mhwd/local/pci/network-r8168/MHWDCONFIG
Processing classid: 0200
checking dependencies...

Packages (2) linux515-r8168-8.050.03-75  linux61-r8168-8.050.03-45

Total Removed Size:  4.07 MiB

:: Do you want to remove these packages? [Y/n] 
:: Processing package changes...
removing linux61-r8168...
removing linux515-r8168...
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Refreshing PackageKit...
> Successfully removed network-r8168
> Installing network-r8168...
Sourcing /etc/mhwd-x86_64.conf
Has lib32 support: true
Sourcing /var/lib/mhwd/db/pci/network_drivers/r8168/MHWDCONFIG
Processing classid: 0200
:: Synchronizing package databases...
 core downloading...
 extra downloading...
 community downloading...
 multilib downloading...
resolving dependencies...
looking for conflicting packages...

Packages (2) linux515-r8168-8.050.03-75  linux61-r8168-8.050.03-45

Total Installed Size:  4.07 MiB

:: Proceed with installation? [Y/n] 
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
:: Processing package changes...
installing linux515-r8168...
>>> The module r8168 conflicts with r8169. You can blacklist it with:
>>>  `echo "blacklist r8169" > /etc/modprobe.d/r8169_blacklist.conf`
installing linux61-r8168...
>>> The module r8168 conflicts with r8169. You can blacklist it with:
>>>  `echo "blacklist r8169" > /etc/modprobe.d/r8169_blacklist.conf`
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Refreshing PackageKit...
linux515-r8168: install reason has been set to 'explicitly installed'
linux61-r8168: install reason has been set to 'explicitly installed'
> Successfully installed network-r8168

What would be the next steps?

What is the state now?

inxi -nazy
Network:
  Device-1: Realtek vendor: ASUSTeK driver: N/A modules: r8169 port: 3000
    bus-ID: 0000:02:00.0 chip-ID: 10ec:8162 class-ID: 0200
  Device-2: Realtek RTL8153 Gigabit Ethernet Adapter driver: r8152 type: USB
    rev: 3.0 speed: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 bus-ID: 4-4.1:3
    chip-ID: 0bda:8153 class-ID: 0000 serial: <filter>
  IF: enp0s20f0u4u1 state: up speed: 1000 Mbps duplex: full mac: <filter>

I just checked, the onboard LAN doesn’t work either. I am connected to a thunderbolt dock with ethernet.

Hmm.
And you tried kernel 5.15 ?
It may be that assumptions of the device/driver are incorrect.
You have the 8153/8152 device using r8152 driver… which seems roughly correct.
But then dmesg output shows 8169 trying to hit RTL8226B, RTL8221B, RTL8125B …
Maybe we can try to find out more about the device …

lspci -k | grep -i net
0000:02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Device 8162 (rev 05)

I used to be on 5.15, and it worked fine. Should I downgrade to it again?

5.15 is supported until the end of 2026 … so if it works there that is certainly an option.
(and of course not ‘downgrade’ as such … you can have multiple kernels installed)

PS
I think you have BIOS updates by the way.

Doesn’t work on 5.15-120-1 either.

Maybe we should remove that driver:

sudo mhwd -r pci network-r8168

WiFi is still not working.

sudo mhwd -r pci network-r8168                                                                                               ✔  basic  
[sudo] password for soumadeep: 
> Removing network-r8168...
Sourcing /etc/mhwd-x86_64.conf
Has lib32 support: true
Sourcing /var/lib/mhwd/local/pci/network-r8168/MHWDCONFIG
Processing classid: 0200
checking dependencies...

Packages (2) linux515-r8168-8.050.03-75  linux61-r8168-8.050.03-45

Total Removed Size:  4.07 MiB

:: Do you want to remove these packages? [Y/n] 
:: Processing package changes...
removing linux61-r8168...
removing linux515-r8168...
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Refreshing PackageKit...
> Successfully removed network-r8168
>>>>>> inxi -Nazy                                                                                                      ✔  took 13s  
Network:
  Device-1: Realtek vendor: ASUSTeK driver: N/A modules: r8169 port: 3000
    bus-ID: 0000:02:00.0 chip-ID: 10ec:8162 class-ID: 0200
  Device-2: Realtek RTL8153 Gigabit Ethernet Adapter driver: r8152 type: USB
    rev: 3.2 speed: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 bus-ID: 4-4.1:3
    chip-ID: 0bda:8153 class-ID: 0000 serial: <filter>

Not sure. :confused:
I found that device being added to the 8169 kernel support:
https://git.zx2c4.com/linux-stable/commit/drivers?id=72f898ca0ab85fde6facf78b14d9f67a4a7b32d1
I also see an r8168-dkms package in the AUR, which also has a patch for 6.1.
Though that is very similar to what the mhwd profile should have done.

Is this the problem?

sudo dmesg | grep r8169                                                                                                  0|1 ✘  basic  
[  620.515379] r8169 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control

I don’t even know the appropriate search terms :frowning: or where to start looking to fix this.

I installed the aur package and reboot. Still not working.