1
0
mirror of https://github.com/home-assistant/operating-system.git synced 2025-12-20 02:18:37 +00:00
Commit Graph

2764 Commits

Author SHA1 Message Date
Andrej Friesen
3dcf6bd9ee Enable Pressure Stall Information PSI (#4279)
Enable Pressure Stall Information PSI for more accurate detection of resource shortages.

The psi feature identifies and quantifies the disruptions caused by CPU, memory or IO  resource shortages and the time impact it has on complex workloads or even entire systems.

- https://facebookmicrosites.github.io/psi/docs/overview
- https://www.kernel.org/doc/html/latest/accounting/psi.html
2025-09-08 17:36:20 +02:00
dependabot[bot]
837baa288c Bump actions/github-script from 7 to 8 (#4285)
Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 16:39:07 +02:00
dependabot[bot]
36b9606172 Bump actions/setup-python from 5 to 6 (#4284)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 16:39:00 +02:00
dependabot[bot]
8bd52361b9 Bump actions/stale from 9.1.0 to 10.0.0 (#4283)
Bumps [actions/stale](https://github.com/actions/stale) from 9.1.0 to 10.0.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v9.1.0...v10.0.0)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: 10.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 16:38:53 +02:00
Jan Čermák
39ff0117ba Merge branch 'main' into dev 2025-09-08 16:04:04 +02:00
Jan Čermák
d60618a55f Bump OS to release version 16.2 16.2 2025-09-08 11:34:12 +02:00
Jan Čermák
8f22412cf8 Revert "Revert kernel patch breaking 6.12.43 build for Tinker (#4257)" (#4277)
This reverts commit 194b9146f4.

Stable commit eb0abacdd3fce5a19fffc1c8bd0be6ffffeb59d8 in v6.12.44 does the
same.
2025-09-03 10:58:18 +02:00
Jan Čermák
700ff773ab Linux: Update kernel to 6.12.44 (#4268)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.44
2025-09-01 18:21:45 +02:00
Jan Čermák
a258295568 Bump OS to pre-release version 16.2.rc2 16.2.rc2 2025-09-01 18:17:51 +02:00
Jan Čermák
71be6037d1 Fix broken outgoing connections caused by upstream kernel regression (#4267)
Upstream commit [1] caused regression in IPv4 routing which can cause some
routes becoming broadcast even though they should be routed as unicast, e.g.:

 # ip route get 1.1.1.1
 broadcast 1.1.1.1 via 192.168.122.1 dev enp0s3 src 192.168.122.204 uid 0
     cache <local,brd>

It's not entirely clear yet why it happens but this behavior seems to be
triggered for instance when the SSDP integration sends the broadcast packet on
HA startup. While this behavior is not described in the regression report [1],
the commit cherry-picked from Linux master fixes the problems for us as well.

Patches moved to version-specific folder, as this one shouldn't be applied on
Raspberry Pi targets.

[1] https://lore.kernel.org/all/20250710142714.12986-1-oscmaes92@gmail.com/
[2] https://lore.kernel.org/stable/20250822165231.4353-4-bacs@librecast.net/

Fixes #4265

(cherry picked from commit 78bda4bd10)
2025-09-01 18:17:36 +02:00
Jan Čermák
78bda4bd10 Fix broken outgoing connections caused by upstream kernel regression (#4267)
Upstream commit [1] caused regression in IPv4 routing which can cause some
routes becoming broadcast even though they should be routed as unicast, e.g.:

 # ip route get 1.1.1.1
 broadcast 1.1.1.1 via 192.168.122.1 dev enp0s3 src 192.168.122.204 uid 0
     cache <local,brd>

It's not entirely clear yet why it happens but this behavior seems to be
triggered for instance when the SSDP integration sends the broadcast packet on
HA startup. While this behavior is not described in the regression report [1],
the commit cherry-picked from Linux master fixes the problems for us as well.

Patches moved to version-specific folder, as this one shouldn't be applied on
Raspberry Pi targets.

[1] https://lore.kernel.org/all/20250710142714.12986-1-oscmaes92@gmail.com/
[2] https://lore.kernel.org/stable/20250822165231.4353-4-bacs@librecast.net/

Fixes #4265
2025-09-01 18:16:11 +02:00
Jan Čermák
44108a5493 Bump OS to development version 16.3.dev0 2025-08-28 16:53:58 +02:00
Jan Čermák
94fe13f6bb Bump OS to pre-release version 16.2.rc1 16.2.rc1 2025-08-28 15:47:21 +02:00
Jan Čermák
194b9146f4 Revert kernel patch breaking 6.12.43 build for Tinker (#4257)
Revert patch added to 6.12.43 which breaks the build of CAN_TI_HECC module
present in Tinker config. While it's quite unlikely anyone would be using it,
so we could just simply disable the module, this seems to be a better solution.
2025-08-28 12:20:22 +02:00
Jan Čermák
9d110c12f3 Revert "Rework /usr/sbin/hassos-supervisor script (#4248)" (#4256)
This reverts commit 22fe9b19ee.

There are major issues when OS has no internet connectivity - in such case the
script doesn't go the expected happy path after the rework and eventually
removes the Docker image, essentially bricking offline installations.

Since there is no immediate benefit for HAOS and such change turns out to be
high risk considering the planned release, leave it to be implemented later.
2025-08-27 18:12:54 +02:00
J. Nick Koston
5872864bc5 buildroot: Update BlueZ to 5.83 with connection abort fix (#4250)
Update the buildroot submodule to include:
- BlueZ 5.83 (from 5.79)
- Patch to fix device removal on LE connection abort (upstream PR #1521)

This fixes Bluetooth stability issues where devices get removed from D-Bus
during connection retries, preventing reconnection attempts.

Fixes: https://github.com/bluez/bluez/issues/1489
2025-08-27 18:12:38 +02:00
Jan Čermák
b35be67236 Linux: Update kernel to 6.12.43 (#4255)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.43
2025-08-27 14:37:48 +02:00
@RubenKelevra
d59053301e sysctl: disable TCP slow start after idle (#4239)
This knob controls whether Linux throws away its congestion
window (cwnd) after a connection has been idle for at least one
retransmission timeout (RTO). With a value of 0, Linux keeps the
cwnd it had before the idle period and can send that amount
immediately when the application resumes writing (still bounded
by the receiver's advertised window and by pacing).

With slow start after idle enabled (the default), Linux allows
only about 10 MSS (~14 KiB) in the first burst after idle. Even
when a connection stays open to web clients, a short idle forces
multiple round trips to ramp back up.

On Wi-Fi, local connections often have very low RTTs, which drives
the RTO down. Between page navigations the connection is considered
idle by Linux. If the next request happens during a transient
latency spike on the Wi-Fi link, the sender starts with a tiny
cwnd and must grow it over many RTTs, so the spike causes outsized
and visible loading delays.

For devices behind typical Internet uplinks, the higher RTT makes
the initial ramp-up feel even slower until the window regains size.
However, here the connection does take longer to drop to idle, for
Linux standards. So the connection is less likely to be considered
idle between navigations.

This change does not affect flows with very small receive windows
(e.g. many microcontrollers), which are limited by the peer's
advertised window rather than the sender's cwnd.

Example RTOs on low jitter, low loss connections:

Defaults:
TCP_RTO_MIN = 200 ms
TCP_RTO_MAX = 120 s
low-jitter path so rttvar_us = 200 ms
HZ = 1000 or 250 or 100 (depending on the kernel settings)

*31 ms average RTT*

- SRTT ≈ 31 ms; RTTVAR ≈ 200 ms → Sum = 231 ms
- 'usecs_to_jiffies(231000)' = 231 jiffies (HZ 1000) -> RTO ≈ 231 ms
- If 'HZ = 250' (4 ms tick), ceil(231/4)=58 jiffies -> 232 ms RTO
- If 'HZ = 100' (10 ms tick), ceil(231/10)=23 jiffies -> 240 ms RTO

*178 ms average RTT*

- HZ=1000 (1 ms tick): 378 ms RTO
- HZ=250 (4 ms tick): ceil(378/4)=95 -> 380 ms RTO
- HZ=100 (10 ms tick): ceil(378/10)=38 -> 380 ms RTO

*292 ms average RTT*

- HZ=1000 (1 ms tick): 492 ms RTO
- HZ=250 (4 ms tick): ceil(492/4)=123 -> 492 ms RTO
- HZ=100 (10 ms tick): ceil(492/10)=50 -> 500 ms RTO

Any loss or jitter will increase those RTO values.
2025-08-26 19:37:48 +02:00
@RubenKelevra
870baa96be sysctl: Enable linear RTO for thin TCP streams (#4238)
Set net.ipv4.tcp_thin_linear_timeouts=1 to switch retransmission
timeout (RTO) backoff from exponential to linear for 'thin' TCP flows.
This reduces tail latency for API-style connections that typically have
very few packets in flight, improving recovery from sporadic loss without
changing anything for larger TCP transfers.

Kernel definition: A flow is considered thin when 'tp->packets_out < 4'
and while not in the initial slow start.

See tcp_stream_is_thin(tp) in include/net/tcp.h.
2025-08-26 19:23:14 +02:00
Viacheslav Bocharov
22fe9b19ee Rework /usr/sbin/hassos-supervisor script (#4248)
* Rework /usr/sbin/hassos-supervisor script:
- remove hardcoded url for image
- add get image url from updater.json/internet
- add SUPERVISOR_CHANNEL defaults to stable

Signed-off-by: Viacheslav Bocharov <adeep@lexina.in>

* Fix small catches in hassos-supervisor

Signed-off-by: Viacheslav Bocharov <adeep@lexina.in>

* Update buildroot-external/rootfs-overlay/usr/sbin/hassos-supervisor

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

---------

Signed-off-by: Viacheslav Bocharov <adeep@lexina.in>
Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2025-08-25 18:00:18 +02:00
J. Nick Koston
62747cd622 bluetooth: Increase TemporaryTimeout to 195 seconds (#4249)
Increase the BlueZ temporary device timeout from the default 30s to 195s.
This prevents devices from being removed from D-Bus during connection
retries, especially when multiple connection attempts are queued.

The 195s timeout aligns with Home Assistant's Bluetooth stack behavior
for ESPHome proxies and prevents the 'device removal spiral' that occurs
when devices timeout during sequential connection attempts.
2025-08-25 13:44:00 +02:00
Jan Čermák
45985ad4a3 Generate list of built-in containers in GH build summary (#4247)
Add list of hassio components from version.json that are built-in in the data
partition to the GH step summary. For landingpage, get the latest stable
release at the time of the build, as it's what should be published as
homeassistant:landingpage by that time.

Closes #4242
2025-08-21 00:22:02 +02:00
Jan Čermák
71d222ad91 Add checkbox for running test in GH build workflow (#4246)
Currently when we run a build with limited set of boards that doesn't include
OVA, the test job fails because the OVA artifact is missing. Add a checkbox for
running tests and ensure that OVA artifact is built if it's enabled.
2025-08-21 00:19:48 +02:00
Marat Radchenko
effe4d3e73 Fix scripts/enter.sh so it is usable on macOS (#4243)
* Fix scripts/enter.sh so it is usable on macOS

Also, stop requiring `sudo` for actions that do not need it

Tested by building generic_x86_64 target on a macOS machine

Signed-off-by: Marat Radchenko <marat@slonopotamus.org>

* Update scripts/enter.sh

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

---------

Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2025-08-20 10:24:36 +02:00
Jan Čermák
419d40012f Fix missing rpi-rf-mod overlay on Yellow (#4244)
Before update to Buildroot 2025.02, the overlays directory on Yellow was
created by rpi-firmware in a condition added confusingly in firmware bump [1].
However, this got lost during Buildroot update, and since Yellow doesn't copy
overlays from the rpi-firmware repo, the directory was never created and the
rpi-rf-mod.dtbo couldn't be copied there in pre-image build hook.

To make things more robust, create the overlays directory for rpi targets
conditionally in the hook instead of relying on rpi-firmware to create it.

[1] f1af1a0bf7

Fixes #4233
2025-08-20 09:56:52 +02:00
Jan Čermák
1915f2194b Linux: Update kernel to 6.12.42 (#4241)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.42
2025-08-18 17:05:53 +02:00
Jan Čermák
06b55a62db Bump Buildroot to 2025.02.5 (#4235)
* buildroot b73c8daa24...6230ff1cbf (1):
  > Merge tag '2025.02.5' into 2025.02.x-haos
2025-08-15 15:33:48 +02:00
Jan Čermák
4e000b8a7e Enable publishing of dev builds to R2 without bumping version (#4232)
* Enable publishing of dev builds to R2 without bumping version

We currently can only use Github artifacts for on-demand builds from feature
branches. However, downloading of these requires authentication and it's tricky
to update a device if we need feedback from user testing. On the other hand, we
never want to publish to the dev channel from anything else than from the dev
branch. Restrict version bump to builds from release channels or from the dev
branch only.

* Use YYYYMMDD dev suffix only for published dev branch

For feature builds, or for builds that should not be published, use timestamp
suffix instead of YYYYMMDD. That way feature builds won't collide with dev
releases.
2025-08-15 10:43:35 +02:00
Jan Čermák
17d811a78f Backport patches for Raspberry Pi dwc2 driver (#4231)
Raspberry Pi Linux update to 6.12.34 broken some USB devices, mostly USB-Serial
converters connected to Yellow, but there are reports of some other peripherals
connected to RPi boards too.

This is a known RPi upstream issue [1] fixed by a PR [2] that's not been merged
to RPi stable kernel yet. Applying patches from this PR fixes the issues.

Fixes #4228, refs #4229

[1] https://github.com/raspberrypi/linux/issues/6941
[2] https://github.com/raspberrypi/linux/issues/6936
2025-08-14 17:33:51 +02:00
Jan Čermák
a722bdfd94 Merge branch 'main' into dev 2025-08-13 18:17:08 +02:00
Jan Čermák
7243db762e Make system timezone setting persistenly configurable (#4224)
To make system timezone configurable, we need to have /etc/localtime
writable, and it must be possible to atomically create a symlink from
this place, which means the whole parent folder must be writable. We
don't have /etc writable and can't use the usual bind mount for this.

Latest Systemd v258 has patch that allows setting an environment
variable that sets where the localtime should be written. This can be
persisted in the overlay partition, with a symlink from /etc/localtime
leading there, finally pointing to the actual zoneinfo file. If the
symlink doesn't exist, create it by hassos-overlay script (it's not
really needed as UTC is the default, but Systemd does the same if you
change from non-UTC timezone back to UTC).

Also disable BR2_TARGET_LOCALTIME, so /etc/localtime and /etc/timezone
(the latter is only informative and non-standard) are not written by the
tzdata package build.
2025-08-13 18:15:57 +02:00
Jan Čermák
1078620de9 Bump OS to release version 16.1 16.1 2025-08-12 16:48:03 +02:00
dependabot[bot]
69ff24a59a Bump actions/download-artifact from 4 to 5 (#4222)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-11 21:08:24 +02:00
dependabot[bot]
756404816d Bump docker/login-action from 3.4.0 to 3.5.0 (#4220)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-11 20:52:08 +02:00
dependabot[bot]
38ea463d5f Bump actions/checkout from 4 to 5 (#4221)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-11 20:19:38 +02:00
Jan Čermák
cbcf9ae34e Migrate docs to developers.home-assistant.io (#4215)
* Migrate docs to developers.home-assistant.io

Move all documentation (except the kernel.md, for which it makes sense to be
kept here) to developers.home-assistant.io.

Just bluetooth.md was intentionally not preserved, as the information value was
low and it was out of date anyway.

See home-assistant/developers.home-assistant#2748

* Fix reference links
2025-08-07 11:35:02 +02:00
Jan Čermák
4c09ceb656 Prevent root from running the enter.sh helper script (#4216)
* Prevent root from running the enter.sh helper script

Since configure doesn't like being ran as root, check in the enter.sh script
that the user running it is not UID/GID 0. The script itself takes care of
running what needs to be executed privileged with explicit sudo commands.

Fixes #4214

* Reword the error message


Co-authored-by: Stefan Agner <stefan@agner.ch>
2025-08-06 17:27:44 +02:00
Jan Čermák
e7f314273d Bump OS to development version 16.2.dev0 2025-08-04 16:39:38 +02:00
Jan Čermák
3c41e4b2dc Bump OS to pre-release version 16.1.rc1 16.1.rc1 2025-08-04 15:56:59 +02:00
Jan Čermák
3d3efd2f55 Fix rpi-eeprom-update when device boots from NVMe (#4205)
* Fix rpi-eeprom-update when device boots from NVMe

The boot partition detection doesn't work correctly if the device boots from
NVMe. Also the mounting step is unnecessary in HAOS as we can assume the boot
partition to be always mounted.

Fix the issues by modifying the bootfs detection logic to always use /mnt/boot.
However, still fail in case when flashrom can't be used (usually on CM4). On
CM5, or on Pi 5 booted from NVMe, update process works without further changes
because the firmware can be flashed directly from the running system using
flashrom.

Fixes #4157

* Fix typo in patch commit message
2025-08-04 11:44:10 +02:00
Jan Čermák
6207807003 Bump to latest default FW version (2025-05-08) in rpi-eeprom-update (#4208)
Make rpi-eeprom-update install latest default FW version when
`rpi-eeprom-update -a` is executed.
2025-08-04 11:43:10 +02:00
Jan Čermák
a7bef75516 RaspberryPi: Update kernel to 6.12.34 - stable_20250702 (#4206)
* RaspberryPi: Update kernel to 6.12.34 - stable_20250702

* Update rpi-firmware to match kernel 6.12.34

* buildroot 141bf1f9fa...b73c8daa24 (1):
  > package/rpi-firmware: update to 7022a89 (for stable_20250702)
2025-08-04 11:26:25 +02:00
Jan Čermák
0d84f0d861 Suppress new warnings from shellcheck v0.11.0 (#4207)
Shellcheck v0.11.0 added new warnings which raise false positive on the trap
function in the OTA hook script. Suppress also that warning.
2025-08-04 11:14:15 +02:00
Jan Čermák
32033293b6 Linux: Update kernel to 6.12.41 (#4200)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.41
2025-08-04 10:03:53 +02:00
Jan Čermák
c39ceed37e Update genimage to avoid unbootable RPi 5 images when flashed from Windows (#4199)
Update genimage so the images are not mangled (by the primary GPT relocated)
when flashed from Windows. Otherwise, boot media flashed from Windows isn't
compatible with bootloader older than 2024-10-10.

This is a regression of #3437. The Buildroot update in #4027 updated genimage
to v18, yet the downstream patch that was later replaced by a different one in
upstream was not merged to that version yet and the patch was incorrectly
removed. In v19 there's another fix in the offset calculation logic that sets
the first usable LBA again to a value that prevents Windows from mangling the
image.

* buildroot 01604756d2...141bf1f9fa (1):
  > package/genimage: bump version to 19

Fixes #4160
2025-08-04 10:03:41 +02:00
Jan Čermák
8fa0cb1b58 Update to Docker v28.3.3 and containerd v2.1.4 (#4198)
* buildroot 9366ce5635...01604756d2 (3):
  > package/docker-cli: bump version to v28.3.3
  > package/docker-engine: bump version to v28.3.3
  > package/containerd: bump version to v2.1.4
2025-07-31 23:15:31 +02:00
Jan Čermák
7e1e8b6f5d Fix systemd-journal-gatewayd 100% CPU issue when watching logs (#4197)
When follow request for logs is issued that points to/beyond the end of logs, a
busy loop in systemd-journal-gatewayd can be triggered which manifests as
systemd-journal-gatewayd consuming 100% CPU. Since threads are used for each
request, the logs may still work but the CPU will be hogged until the restart
of systemd-journal-gatewayd, Supervisor, or the whole system.

Backport the patch submitted upstream that addresses this issue.

Fixes #4190
2025-07-31 11:06:59 +02:00
Jan Čermák
10e401e2f6 Linux: Update kernel to 6.12.40 (#4196)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.40
2025-07-31 11:06:49 +02:00
Michal Šimek
9ccda43197 Enable driver for Xilinx AMS adc sensor (#4192)
Sensor is used for chip monitoring to ensure device is operating in good
condition.
2025-07-24 12:09:04 +02:00
Jan Čermák
c84729fae3 Generate Virtual Disk Image (VDI) for aarch64 build (#4187)
As there is VirtualBox available for aarch64 on Apple Macs, provide OS images
also in the native VirtualBox format, which also grants the ability to resize
existing disk images, unlike VMDK.

Fixes #4171 & fixes #4172
2025-07-24 11:55:00 +02:00