Linux
打開蓋子時WiFi切換,忽略設置
每當我打開筆記型電腦的蓋子時,WiFi 就會切換。我正在使用 Manjaro KDE。在節能設置中設置“什麼都不做”沒有幫助。它發生在交流電源和電池上。藍牙不受影響。
這是關於
journalctl
開蓋事件的輸出。Feb 13 01:54:17 sintan-pc systemd-logind[11642]: Lid opened. Feb 13 01:54:17 sintan-pc avahi-daemon[453]: Got SIGHUP, reloading. Feb 13 01:54:17 sintan-pc avahi-daemon[453]: No service file found in /etc/avahi/services. Feb 13 01:54:17 sintan-pc dhcpcd[467]: wlo1: old hardware address: a0:af:bd:4f:d8:5f Feb 13 01:54:17 sintan-pc dhcpcd[467]: wlo1: new hardware address: ea:52:e1:b6:0e:ef Feb 13 01:54:17 sintan-pc plasmashell[1065]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationPopup.qml:116:15: QML QQuickItem: Binding loop detected f> Feb 13 01:54:17 sintan-pc wpa_supplicant[608]: nl80211: deinit ifname=wlo1 disabled_11b_rates=0
另外,關於我的系統的一些其他資訊。
systemd-inhibit --list WHO UID USER PID COMM WHAT WHY MODE ModemManager 0 root 527 ModemManager sleep ModemManager needs to reset devices delay NetworkManager 0 root 474 NetworkManager sleep NetworkManager needs to turn off networks delay UPower 0 root 875 upowerd sleep Pause device polling delay Discord 1000 sintan 3413 Discord sleep Application cleanup before suspend delay PowerDevil 1000 sintan 1140 org_kde_powerde handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch KDE handles power events block Screen Locker 1000 sintan 1083 ksmserver sleep Ensuring that the screen gets locked before going to sleep delay 6 inhibitors listed.
我的
systemd
版本是247.2-1
.inxi -Fazy System: Kernel: 5.10.7-3-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.1 parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 root=UUID=fe64fafd-1c2a-4b55-846f-c264196ff166 rw nomce "acpi_osi=Windows 2018" quiet resume=UUID=4517ac81-4ac6-42a0-8e7a-a5870b5f98df Desktop: KDE Plasma 5.20.5 tk: Qt 5.15.2 wm: kwin_x11 dm: GDM 3.38.2.1, SDDM Distro: Manjaro Linux Machine: Type: Laptop System: HP product: HP Pavilion Laptop 14-bf1xx v: Type1ProductConfigId serial: <filter> Chassis: type: 10 serial: <filter> Mobo: HP model: 83CE v: 59.38 serial: <filter> UEFI: Insyde v: F.31 date: 10/30/2017 Battery: ID-1: BAT1 charge: 35.3 Wh condition: 42.3/42.3 Wh (100%) volts: 13.1/11.6 model: Hewlett-Packard PABAS0241231 type: Li-ion serial: <filter> status: Charging CPU: Info: Quad Core model: Intel Core i7-8550U bits: 64 type: MT MCP arch: Kaby Lake note: check family: 6 model-id: 8E (142) stepping: A (10) microcode: E0 L2 cache: 8 MiB flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 bogomips: 32012 Speed: 700 MHz min/max: 400/1800 MHz Core speeds (MHz): 1: 700 2: 700 3: 700 4: 700 5: 700 6: 700 7: 700 8: 700 Vulnerabilities: Type: itlb_multihit status: KVM: VMX unsupported Type: l1tf mitigation: PTE Inversion Type: mds mitigation: Clear CPU buffers; SMT vulnerable Type: meltdown mitigation: PTI 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 generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling Type: srbds mitigation: Microcode Type: tsx_async_abort status: Not affected Graphics: Device-1: Intel UHD Graphics 620 vendor: Hewlett-Packard driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:5917 Device-2: NVIDIA GM108M [GeForce 940MX] vendor: Hewlett-Packard driver: nvidia v: 460.32.03 alternate: nouveau,nvidia_drm bus ID: 01:00.0 chip ID: 10de:134d Device-3: Chicony HP Wide Vision HD Camera type: USB driver: uvcvideo bus ID: 1-5:4 chip ID: 04f2:b5d6 Display: x11 server: X.Org 1.20.10 compositor: kwin_x11 driver: loaded: modesetting,nvidia display ID: :0 screens: 1 Screen-1: 0 s-res: 1920x1080 s-dpi: 115 s-size: 424x238mm (16.7x9.4") s-diag: 486mm (19.1") Monitor-1: eDP-1 res: 1920x1080 dpi: 158 size: 309x173mm (12.2x6.8") diag: 354mm (13.9") OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.3.3 direct render: Yes Audio: Device-1: Intel Sunrise Point-LP HD Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel alternate: snd_soc_skl bus ID: 00:1f.3 chip ID: 8086:9d71 Sound Server: ALSA v: k5.10.7-3-MANJARO Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Hewlett-Packard driver: r8168 v: 8.048.03-NAPI modules: r8169 port: 3000 bus ID: 02:00.0 chip ID: 10ec:8168 IF: eno1 state: down mac: <filter> Device-2: Intel Wireless 7265 driver: iwlwifi v: kernel port: 3000 bus ID: 03:00.0 chip ID: 8086:095a IF: wlo1 state: up mac: <filter> Drives: Local Storage: total: 1.03 TiB used: 558.98 GiB (53.2%) SMART Message: Unable to run smartctl. Root privileges required. ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM035-1RK172 size: 931.51 GiB block size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s serial: <filter> rev: RSM7 ID-2: /dev/sdb maj-min: 8:16 vendor: SanDisk model: SD8SN8U-128G-1006 size: 119.24 GiB block size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s serial: <filter> rev: 0006 Partition: ID-1: / raw size: 50 GiB size: 48.72 GiB (97.43%) used: 38.9 GiB (79.8%) fs: ext4 dev: /dev/sdb5 maj-min: 8:21 ID-2: /boot/efi raw size: 277 MiB size: 276.4 MiB (99.80%) used: 280 KiB (0.1%) fs: vfat dev: /dev/sdb1 maj-min: 8:17 ID-3: /home raw size: 60.87 GiB size: 59.67 GiB (98.02%) used: 32.17 GiB (53.9%) fs: ext4 dev: /dev/sdb2 maj-min: 8:18 Swap: Kernel: swappiness: 5 (default 60) cache pressure: 50 (default 100) ID-1: swap-1 type: partition size: 8.1 GiB used: 3.33 GiB (41.1%) priority: -2 dev: /dev/sdb3 maj-min: 8:19 Sensors: System Temperatures: cpu: 37.5 C mobo: 29.8 C Fan Speeds (RPM): N/A Info: Processes: 327 Uptime: 1d 21h 20m wakeups: 13 Memory: 7.69 GiB used: 4.69 GiB (61.0%) Init: systemd v: 247 Compilers: gcc: 10.2.0 Packages: 1983 pacman: 1976 lib: 457 flatpak: 1 snap: 6 Shell: fish v: 3.1.2 running in: server inxi: 3.2.02
當我把它放在 Manjaro 論壇上時,這個問題就解決了。解決方案如下:
/etc/NetworkManager/conf.d/90-disable-randomization.conf
使用以下內容製作配置文件 :[device-mac-randomization] wifi.scan-rand-mac-address=no [connection-mac-randomization] ## FOR ETHERNET, OPTIONAL IF YOU USE ONLY WLAN #ethernet.cloned-mac-address=permanent wifi.cloned-mac-address=permanent
然後重啟 NetworkManager.service
systemctl restart NetworkManager.service
(儘管我必須重新啟動才能使其工作。)