apt install keyd
Id needs to fit or your touchpad will be broken ... use keyd monitor to check.
/etc/keyd/default.conf
[ids]
0000:0000:af5c732c
[meta]
# function keys
f1 = back
f2 = forward
f3 = f5
f4 = f11
# M-f8 means to send Meta+F8
f5 = M-f8
f6 = brightnessdown
f7 = brightnessup
f8 = mute
f9 = volumedown
f10= volumeup
# Arrow keys
left = home
right = end
up = pageup
down = pagedown
backspace = delete
Use the german keyboard variant for US keyboards (in GUI its called German(US)). Enables the right Alt key for ÖÄÜ and ß (S) also Euro is sane on E now.
/etc/X11/xorg.conf.d/germanlayout.conf
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbModel" "pc105"
Option "XkbLayout" "de"
Option "XkbVariant" "us"
# not needed, default works fine: Option "XkbOptions" "lv3:ralt_switch"
EndSection
/etc/X11/xorg.conf.d/touchpad.conf
Section "InputClass"
Identifier "system-touchpad"
MatchIsTouchpad "on"
Driver "libinput"
# this together with buttonareas got me best of both worlds, needs more testing
Option "Tapping" "on"
#Option "ClickMethod" "clickfinger"
Option "ClickMethod" "buttonareas"
# this to true turns it into touchscreen scrolling
Option "NaturalScrolling" "false"
EndSection
Try disabling powersave:
/etc/NetworkManager/conf.d/99-mwifex.conf
[connection]
wifi.powersave = 2
[device]
wifi.scan-rand-mac-address=false
Try disabling driver options:
/etc/modprobe.d/mwifiex.conf
options mwifiex_pcie power_save=0
options mwifiex_pcie disable_hw_scan=1
options mwifiex_pcie roam_off=1
updateinitramfs -u
and reboot.
In my case getting wifi stable was fixing the chip to only use 2.4 Ghz networks.
If you use network manager it will react to a closed lid and try to sleep even though the system itself is not configured to sleep:
/etc/NetworkManager/conf.d/99-ignoresleep.conf
[main]
no-auto-default=*
ignore-carrier=1
sleep = false
sleep-delay=0
/etc/systemd/logind.conf
HandleLidSwitch=ignore
#HandleLidSwitchDocked=ignore # already default
# Inhibitors are other programs using systemd-inhibit to prevent sleep, etc.
# normally loginctl would ignore these on a lid close action and still sleep, so this =no disables this
LidSwitchIgnoreInhibited=no
if you want more rabbithole you can do a systemd-inhibit --list
and check whats interfering with logind
apt install iwd iwgtk
Remove NetworkManager and just use the integrated iwd management
sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager
sudo apt purge network-manager -y
sudo systemctl enable systemd-networkd --now
sudo systemctl enable systemd-resolved --now
/etc/iwd/main.conf
[General]
EnableNetworkConfiguration=true
NameResolvingService=systemd
Scan for wifi:
iwctl
[iwd]# device list
[iwd]# station wlan0 scan
[iwd]# station wlan0 get-networks
[iwd]# station wlan0 connect "YourSSID"
or just use iwgtk
Change the preferred connection:
/var/lib/iwd/ssid.psk
[Settings]
AutoConnect=true
According to Arch this is the only way to prefer a network
Without networkmanager you need a service that runs this on start, etc.
/etc/systemd/system/wlan-always-on@.service
[Unit]
Description=Keep wireless device %i from sleeping.
After=network.target
[Service]
ExecStart=/usr/sbin/iw %i set power_save off
[Install]
WantedBy=default.target
systemctl enable —now wlan-always-on@wlan0.service