I’m on Arch, where it’s very easy to downgrade any package to an older version using “sudo downgrade ”. If your using Arch as well, you can simply install the downgrade package using yay or paru.
Someone mentioned Geento. With Geento, it’s different, but still possible, so you don’t have to rely solely on what’s still in your cache. I asked Gemini; the answer is below. However, since Gemini is sometimes just as clueless as the German government, please do your own research before following the instructions below. It might come in handy at some point in the future. But since, as you mentioned, it works with your current package, I’d suggest not changing your current system, leaving it as is, and simply waiting until KDE fixes the issue.
Many thanks in advance to the KDE team for your work—I’m looking forward to the fix. KDE has improved a lot in recent years and is great. Keep up the good work! But here’s what Gemini said:
Here is a complete, step-by-step guide on how to perform package downgrades in Gentoo Linux, tailored for setups running Niri + Noctalia (or any other packages).
Because Gentoo compiles from source and relies on Git repositories, downgrading isn’t a single automated click like yay downgrade, but it is very manageable using Portage’s local overlay system.
Method 1: The Quick Way (If the old version is still in your Portage tree)
If Portage still has the older version available in your local repository snapshot, you can target it directly and prevent Portage from updating it back during your next system upgrade.
Step 1: Install the specific older version
Use the exact package atom (specifying the version with =) to emerge the older version:
Bash
sudo emerge =category/package-version
# Example:
sudo emerge =gui-apps/niri-0.4.1
Step 2: Mask the newer version to prevent accidental upgrades
To stop emerge -uDN @world from upgrading the package back to the broken version, mask anything newer than your desired version.
-
Open (or create) your package mask file:
Bash
sudo nano /etc/portage/package.mask
-
Add a line locking it to or below your version:
Plaintext
>gui-apps/niri-0.4.1
-
Save and exit (Ctrl+O, Enter, Ctrl+X).
Method 2: The Robust Way (Using a Local Overlay for removed versions)
If Gentoo has completely removed the old version from the official tree, you will need to fetch the old recipe (ebuild) from Git history and host it in a local overlay so Portage can see it permanently.
Step 1: Create a local overlay directory
If you don’t have one set up yet, create a custom local repository (e.g., named my-overlay):
-
Create the directory structure:
Bash
sudo mkdir -p /usr/local/portage/gui-apps/niri
-
Tell Portage where your local overlay is by creating /etc/portage/repos.conf/local.conf:
Ini, TOML
[my-local-overlay]
location = /usr/local/portage
priority = 50
auto-sync = no
Step 2: Extract the old ebuild from Git history
-
Navigate to your Gentoo repository:
Bash
cd /var/db/repos/gentoo
-
Search the Git log for niri to find a commit hash where the older version existed:
Bash
git log --oneline -- gui-apps/niri
-
Once you find a suitable commit hash (e.g., a1b2c3d4), extract that specific version of the ebuild and its files into your local overlay:
Bash
git checkout <commit-hash> -- gui-apps/niri/
cp -r gui-apps/niri /usr/local/portage/gui-apps/
-
Switch your main Gentoo repo back to the latest branch:
Bash
git checkout master
# or git checkout main (depending on your branch)
Step 3: Update Manifest and Emerge
Because you copied an old ebuild into your local overlay, you need to generate a new Manifest file for it:
-
Navigate to your local overlay package folder:
Bash
cd /usr/local/portage/gui-apps/niri
-
Run ebuild to generate the Manifest:
Bash
sudo ebuild niri-<old-version>.ebuild manifest
-
Emerge your downgraded version:
Bash
sudo emerge =gui-apps/niri-<old-version>
-
Don’t forget to mask newer versions in /etc/portage/package.mask (as shown in Method 1) so updates don’t overwrite your downgrade.