No internet connection after removing AppArmor

(GNOME)

So I just wanted to play with AppArmor, but after installing it (from AUR) I realized, that configuring is is too hard, so I decidet to remove it next day. After reboot, I reaized that I don't have connection to the internet (I got only a "question mark" on the WiFi status icon, but everything else was like nothing happen), so then I found a solution from a tutorial to stop and disable AppArmor, so I typed this:

sudo systemctl stop apparmor && sudo systemctl disable apparmor

After that, I had the internet connection again, and removed AppArmor from the Add/Remove Software program, and everything worked fine. After reboot, I got the "question mark" on the WiFi icon again, and I still don't have internet connection (even if I connect a ethernet cable). I tried to remove AppArmor "again", but when I was writing sudo pacman -R apparmor, then it said that AppArmor isn't installed.

I tried to boot from a snapshot from the GRUB bootloader, to try to restore the system from yesterday's backup, but the laptop won't boot up from a snapshot (but I think that this is for another topic, I just wanted to say, that this isn't an option to solve this)

Another fact is, that I don't have configured and profiles or this kind of things in AppArmor, I just installed it, checked the status, looked to the /etc/apparmor.d direcotry and removed it like above.

Do you know how to restore internet connection?

inxi -Faz:

System:    Kernel: 5.14.9-zen2-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0 
           parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=5dc8a390-4d3b-4672-915b-fa9a8143908d 
           rw rootflags=subvol=@ quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 
           systemd.unified_cgroup_hierarchy=1 loglevel=3 
           Desktop: GNOME 40.5 tk: GTK 3.24.30 wm: gnome-shell dm: GDM 40.1 Distro: Garuda Linux 
           base: Arch Linux 
Machine:   Type: Laptop System: LENOVO product: 82GN v: Lenovo Legion 5 17ARH05H serial: <filter> Chassis: 
           type: 10 v: Lenovo Legion 5 17ARH05H serial: <filter> 
           Mobo: LENOVO model: LNVNB161216 v: SDK0R32862 WIN serial: <filter> UEFI: LENOVO v: FSCN14WW 
           date: 08/26/2020 
Battery:   ID-1: BAT0 charge: 56.2 Wh (68.0%) condition: 82.6/80.0 Wh (103.2%) volts: 15.7 min: 15.4 
           model: Celxpert L19C4PC2 type: Li-poly serial: <filter> status: Discharging cycles: 3 
CPU:       Info: 8-Core model: AMD Ryzen 7 4800H with Radeon Graphics bits: 64 type: MT MCP arch: Zen 2 
           family: 17 (23) model-id: 60 (96) stepping: 1 microcode: 8600104 cache: L2: 4 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 92632 
           Speed: 1397 MHz min/max: 1400/2900 MHz boost: enabled Core speeds (MHz): 1: 1397 2: 1393 
           3: 1397 4: 1398 5: 1397 6: 1397 7: 1397 8: 1397 9: 1397 10: 1397 11: 1397 12: 1397 13: 1520 
           14: 1397 15: 1397 16: 1397 
           Vulnerabilities: Type: itlb_multihit status: Not affected 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 
           mitigation: Full AMD retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: NVIDIA TU106M [GeForce RTX 2060 Mobile] vendor: Lenovo driver: nouveau v: kernel 
           bus-ID: 01:00.0 chip-ID: 10de:1f15 class-ID: 0300 
           Device-2: Chicony Integrated Camera type: USB driver: uvcvideo bus-ID: 3-3:2 chip-ID: 04f2:b6c2 
           class-ID: 0e02 serial: <filter> 
           Display: x11 server: X.Org 1.20.13 compositor: gnome-shell driver: loaded: modesetting,nouveau 
           alternate: fbdev,nv,vesa display-ID: :1 screens: 1 
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") s-diag: 582mm (22.9") 
           Monitor-1: eDP-1 res: 1920x1080 hz: 144 dpi: 128 size: 382x215mm (15.0x8.5") 
           diag: 438mm (17.3") 
           OpenGL: renderer: NV166 v: 4.3 Mesa 21.2.3 direct render: Yes 
Audio:     Device-1: NVIDIA TU106 High Definition Audio driver: snd_hda_intel v: kernel bus-ID: 01:00.1 
           chip-ID: 10de:10f9 class-ID: 0403 
           Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor vendor: Lenovo driver: N/A 
           alternate: snd_pci_acp3x, snd_rn_pci_acp3x bus-ID: 05:00.5 chip-ID: 1022:15e2 class-ID: 0480 
           Device-3: AMD Family 17h HD Audio vendor: Lenovo driver: snd_hda_intel v: kernel 
           bus-ID: 05:00.6 chip-ID: 1022:15e3 class-ID: 0403 
           Sound Server-1: ALSA v: k5.14.9-zen2-1-zen running: yes 
           Sound Server-2: JACK v: 1.9.19 running: no 
           Sound Server-3: PulseAudio v: 15.0 running: no 
           Sound Server-4: PipeWire v: 0.3.38 running: yes 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Lenovo driver: r8169 
           v: kernel port: 2000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200 
           IF: eno1 state: down mac: <filter> 
           Device-2: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter vendor: Lenovo 
           driver: rtw_8822ce v: N/A modules: rtw88_8822ce port: 1000 bus-ID: 04:00.0 chip-ID: 10ec:c822 
           class-ID: 0280 
           IF: wlp4s0 state: up mac: <filter> 
Bluetooth: Device-1: Realtek Bluetooth Radio type: USB driver: btusb v: 0.8 bus-ID: 5-3:4 
           chip-ID: 0bda:c123 class-ID: e001 serial: <filter> 
           Report: bt-adapter ID: hci0 rfk-id: 2 state: down bt-service: enabled,running rfk-block: 
           hardware: no software: yes address: <filter> 
Drives:    Local Storage: total: 942.7 GiB used: 445.72 GiB (47.3%) 
           SMART Message: Required tool smartctl not installed. Check --recommends 
           ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: MZALQ512HALU-000L2 size: 476.94 GiB 
           block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> 
           rev: BL2QFXV7 temp: 27.9 C scheme: GPT 
           ID-2: /dev/sda maj-min: 8:0 type: USB vendor: Western Digital model: WD5000LPCX-60VHAT0 
           size: 465.76 GiB block-size: physical: 512 B logical: 512 B type: HDD rpm: 5400 
           serial: <filter> rev: 1.14 scheme: MBR 
Partition: ID-1: / raw-size: 120.93 GiB size: 120.93 GiB (100.00%) used: 59.78 GiB (49.4%) fs: btrfs 
           dev: /dev/nvme0n1p4 maj-min: 259:4 
           ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%) used: 29.8 MiB (11.6%) fs: vfat 
           dev: /dev/nvme0n1p1 maj-min: 259:1 
           ID-3: /home raw-size: 120.93 GiB size: 120.93 GiB (100.00%) used: 59.78 GiB (49.4%) fs: btrfs 
           dev: /dev/nvme0n1p4 maj-min: 259:4 
           ID-4: /var/log raw-size: 120.93 GiB size: 120.93 GiB (100.00%) used: 59.78 GiB (49.4%) 
           fs: btrfs dev: /dev/nvme0n1p4 maj-min: 259:4 
           ID-5: /var/tmp raw-size: 120.93 GiB size: 120.93 GiB (100.00%) used: 59.78 GiB (49.4%) 
           fs: btrfs dev: /dev/nvme0n1p4 maj-min: 259:4 
Swap:      Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: zram size: 15.5 GiB used: 0 KiB (0.0%) priority: 100 dev: /dev/zram0 
Sensors:   System Temperatures: cpu: 36.0 C mobo: N/A gpu: nouveau temp: 31.0 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 348 Uptime: 0m wakeups: 1 Memory: 15.5 GiB used: 1.6 GiB (10.3%) Init: systemd 
           v: 249 tool: systemctl Compilers: gcc: 11.1.0 clang: 12.0.1 Packages: pacman: 1236 lib: 337 
           Shell: fish v: 3.3.1 running-in: gnome-terminal inxi: 3.3.06

Welcome :slight_smile:

You have only one snapshot?
Timeshift or snapper?
Use last working.

2 Likes

Sorry, there's a piece of information I'm missing.
You have no connectivity, right? It's not just a matter of the question mark displayed.
I'm asking this because I see the inxi and it doesn't look like from a live USB.
If so, my only idea would be to use a live USB, chroot into your system, reinstall apparmor and keep the service disabled (if the connectivity was fine in this way).
It's not ideal of course, just an idea to go back to a working state.
Then maybe you could remove it again, checking the dependencies.

2 Likes

Are you sure this has anything to do with AppArmor? Did you update or change anything else at the same time?

The other option, given you changed a core part of the underlying system, things are broken, and snapshots don’t work, is to reinstall Garuda.

6 Likes

This ^^^ seems entirely possible as there was another post regarding this specific adapter a day ago. This is also a very problem prone Realtek driver.

I would suggest installing/reinstalling/rebuilding the rtw88-dkms-git driver from the Chaotic AUR (reboot afterwards).


If your internet is still not working after building/rebuilding the rtw88-dkms-git driver I would suggest testing linux , linux-lts , linux-mainline , and lastly the linux-hardened kernel.


Also, be sure to disable MAC address randomization and then reboot both your router and laptop afterwards. Wifi power saving should also be disabled, as this is a known issue with this adapter. Reboot after performing either of these steps.


You may also want to fully shut down, then remove all power sources (especially if dual booting with Windows) before restarting. As a final step you may want to reset your bios to the factory default (if none of the prior steps produced a positive result).


Good luck.

4 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.