mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-07-12 18:19:42 -07:00
fix four minor gaps: rtl8188eus udev rule, bfq scope, hostname, tsadc
Found during the live multi-device SSH sweep; none break a single device but
each is a real defect:
- linux-drivers/RTL8188EUS 99-rtl8188eus.rules: the RUN line used single `$`
for its shell vars, which udev parses as its own specifier ("invalid
substitution type") and rejects the whole rule, so the rtl8xxxu->8188eu
rebind never ran (the dongle stayed on the better driver only by probe-order
luck). Double them to `$$`.
- linux 10-bfq-sched.rules: `KERNEL=="mmcblk[0-9]*"` matched partitions too,
whose queue/* knobs do not exist, spamming the boot log with ~15 ENOENT
write failures. Gate on SUBSYSTEM=="block", DEVTYPE=="disk".
- hostname: system.cfg shipped `system.hostname=@DEVICENAME@` -> "RK3326" (the
SoC name, identical on every unit), so two ArchR consoles on one LAN collide
on NetBIOS/mDNS registration (nmbd "Failed to register my name"). Set the
base name to "archr" and append a short per-device machine-id suffix in
network-base-setup so each device is unique.
- tsadc: r3xs.dtsi and eeclone.dts enabled tsadc without
rockchip,hw-tshut-mode/-polarity, so the driver logged "Missing tshut ...
using default" on every boot. Spell out the defaults (CRU reset, active-low);
behaviour unchanged. DTS compiles clean (eeclone + soysauce).
The "GO-Super Gamepad" joypad name on the Soysauce was investigated and is
intentional (soysauce.dts sets joypad-name with a matching retroarch config),
so it is left as-is.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -798,6 +798,14 @@
|
||||
|
||||
&tsadc {
|
||||
status = "okay";
|
||||
/*
|
||||
* Explicit hardware thermal-shutdown config (CRU self-reset on
|
||||
* over-temp, active-low) matching the driver defaults, to silence the
|
||||
* "Missing tshut mode/polarity property" boot warning. No behaviour
|
||||
* change.
|
||||
*/
|
||||
rockchip,hw-tshut-mode = <0>;
|
||||
rockchip,hw-tshut-polarity = <0>;
|
||||
};
|
||||
|
||||
&u2phy {
|
||||
|
||||
@@ -471,6 +471,15 @@
|
||||
|
||||
&tsadc {
|
||||
status = "okay";
|
||||
/*
|
||||
* Spell out the hardware thermal-shutdown config the driver otherwise
|
||||
* warns about ("Missing tshut mode/polarity property, using default"):
|
||||
* CRU self-reset on over-temp, active-low. These match the driver
|
||||
* defaults already in use, so behaviour is unchanged; this just makes
|
||||
* the config explicit and silences the boot warning.
|
||||
*/
|
||||
rockchip,hw-tshut-mode = <0>;
|
||||
rockchip,hw-tshut-polarity = <0>;
|
||||
};
|
||||
|
||||
&u2phy {
|
||||
|
||||
@@ -179,7 +179,7 @@ system.autohotkeys=1
|
||||
system.automount=1
|
||||
system.battery.warning=0
|
||||
system.battery.warning_threshold=25
|
||||
system.hostname=@DEVICENAME@
|
||||
system.hostname=archr
|
||||
system.language=en_US
|
||||
enable.turbo-mode=1
|
||||
system.cpugovernor=ondemand
|
||||
|
||||
@@ -31,6 +31,10 @@ LABEL="rtl8188eus_swap"
|
||||
# mesmo tempo); depois carrega 8188eu, que vai bindar pela alias
|
||||
# table. ${BUSNUM} e ${DEVNUM} são fornecidos por udev e identificam
|
||||
# o device USB sem ambiguidade.
|
||||
RUN+="/usr/bin/sh -c 'busid=$(basename %p); for drv in /sys/bus/usb/drivers/rtl8xxxu; do [ -e \"$drv/$busid\" ] && echo \"$busid\" > \"$drv/unbind\" 2>/dev/null; done; modprobe 8188eu 2>/dev/null'"
|
||||
# udev parses `$` in RUN as its own specifier prefix, so shell variables
|
||||
# must be doubled (`$$` -> literal `$`). The previous single-`$` form made
|
||||
# udev reject the whole rule ("invalid substitution type"), so the rebind
|
||||
# never ran and the dongle was left on rtl8xxxu by luck of probe order.
|
||||
RUN+="/usr/bin/sh -c 'busid=$$(basename %p); for drv in /sys/bus/usb/drivers/rtl8xxxu; do [ -e \"$$drv/$$busid\" ] && echo \"$$busid\" > \"$$drv/unbind\" 2>/dev/null; done; modprobe 8188eu 2>/dev/null'"
|
||||
|
||||
LABEL="rtl8188eus_end"
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
ACTION=="add|change", KERNEL=="mmcblk[0-9]*", ATTR{queue/scheduler}="bfq"
|
||||
ACTION=="add|change", KERNEL=="mmcblk[0-9]*", ATTR{queue/iosched/low_latency}="1"
|
||||
ACTION=="add|change", KERNEL=="mmcblk[0-9]*", ATTR{queue/read_ahead_kb}="2048"
|
||||
ACTION=="add|change", KERNEL=="mmcblk[0-9]*", ATTR{queue/nr_requests}="128"
|
||||
ACTION=="add|change", KERNEL=="mmcblk[0-9]*", ATTR{queue/rq_affinity}="2"
|
||||
# Tune the I/O scheduler on the whole SD/eMMC disks. The queue/* knobs live
|
||||
# on the disk, not its partitions, so we gate on DEVTYPE=="disk": matching
|
||||
# `mmcblk[0-9]*` alone also hit mmcblk1p1/p2/p3 and spammed the boot log with
|
||||
# "Failed to write ATTR{.../queue/scheduler}: No such file or directory".
|
||||
ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="mmcblk[0-9]*", ATTR{queue/scheduler}="bfq"
|
||||
ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="mmcblk[0-9]*", ATTR{queue/iosched/low_latency}="1"
|
||||
ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="mmcblk[0-9]*", ATTR{queue/read_ahead_kb}="2048"
|
||||
ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="mmcblk[0-9]*", ATTR{queue/nr_requests}="128"
|
||||
ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="mmcblk[0-9]*", ATTR{queue/rq_affinity}="2"
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
#!/bin/sh
|
||||
. /etc/profile
|
||||
HOSTNAME=$(get_setting system.hostname)
|
||||
# Make the hostname unique per device. Multiple ArchR consoles on one LAN
|
||||
# otherwise share a name and collide on NetBIOS / mDNS registration (nmbd
|
||||
# "Failed to register my name ..."). Append a short, stable suffix derived
|
||||
# from the per-device machine-id (the same id the gadget uses for its
|
||||
# serial). Skip if no machine-id is available yet.
|
||||
MID="$(cat /storage/.cache/systemd-machine-id 2>/dev/null)"
|
||||
[ -z "${MID}" ] && MID="$(cat /etc/machine-id 2>/dev/null)"
|
||||
[ -n "${MID}" ] && HOSTNAME="${HOSTNAME}-$(echo "${MID}" | cut -c1-4)"
|
||||
echo ${HOSTNAME} >/proc/sys/kernel/hostname
|
||||
hostnamectl --transient hostname ${HOSTNAME}
|
||||
avahi-set-host-name ${HOSTNAME}
|
||||
|
||||
Reference in New Issue
Block a user