Skip to content

feat(networking): replace custom NetworkManager backend with nmrs - #2068

Merged
wash2 merged 2 commits into
pop-os:masterfrom
cachebag:master
Jul 14, 2026
Merged

wash2 merged 2 commits into
pop-os:masterfrom
cachebag:master

Conversation

@cachebag

@cachebag cachebag commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

As seen in the applets (pop-os/cosmic-applets#1453 and pop-os/cosmic-applets#1392), this PR migrates the hand-rolled NetworkManager backend in cosmic-settings with nmrs.

Specifically, we switch the networking pages to use nmrs 3.4.0 for NetworkManager state, device lists, Wi-Fi operations, VPN imports/activation, and secret-agent handling.

This PR also removes the old cosmic-settings-network-manager-subscription crate, drops the direct dbus-settings NetworkManager dependencies, and deletes the unused nmcli VPN helper. I kept nm-connection-editor for profile creation/editing where the UI still depends on it since it's not very conducive to switch everything, obviously.

I also carry Wi-Fi security metadata through the password flow so SAE/WPA3 personal networks can be activated with SAE key management, and make failed/cancelled auth attempts clear pending connection state

  • I have disclosed use of any AI generated code in my commit messages.
    • If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR.
    • In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment.
  • I understand these changes in full and will be able to respond to review comments.
  • My change is accurately described in the commit message.
  • My contribution is tested and working as described.
  • I have read the Developer Certificate of Origin and certify my contribution under its conditions.

@jklgrasso

jklgrasso commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

This does not build locally. It looks like cosmic-protocols uses an older version of bitflags causing a conflict.

cargo build --release

error: failed to select a version for `bitflags`.
    ... required by package `nmrs v3.4.0`
    ... which satisfies dependency `nmrs = "^3.4.0"` (locked to 3.4.0) of package `cosmic-settings v1.0.12 (/mnt/extra/git/extern-repos/cosmic-settings/cosmic-settings)`
versions that meet the requirements `^2.13.0` are: 2.13.0

all possible versions conflict with previously selected packages.

  previously selected package `bitflags v2.12.1`
    ... which satisfies dependency `bitflags = "^2.9"` (locked to 2.12.1) of package `cosmic-protocols v0.1.0 (https://github.com/pop-os/cosmic-protocols//?rev=d0e95be#d0e95be2)`
    ... which satisfies git dependency `cosmic-protocols` (locked to 0.1.0) of package `cosmic-settings v1.0.12 (/mnt/extra/git/extern-repos/cosmic-settings/cosmic-settings)`

failed to select a version for `bitflags` which could resolve this conflict

@cachebag

cachebag commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@jklgrasso This happened on applets too, and was the case for log. Should be all good now, sorry about that.

mmstick
mmstick previously approved these changes Jul 9, 2026
@jklgrasso

Copy link
Copy Markdown
Contributor

Everything is working as I expect it to. Networking and otherwise. Could you create the PRs for cosmic-applets & cosmic-protocols to do cargo updates? Once those are merged, you can revert the change to the lock file, and all should be good here.

@cachebag

Copy link
Copy Markdown
Contributor Author

@jklgrasso pop-os/cosmic-applets#1453 in applets is pending review right now. pop-os/cosmic-protocols#81 Is open on protocols

@cachebag
cachebag force-pushed the master branch 2 times, most recently from 39e8060 to f9296bf Compare July 10, 2026 18:18
@cachebag

Copy link
Copy Markdown
Contributor Author

Everything is working as I expect it to. Networking and otherwise. Could you create the PRs for cosmic-applets & cosmic-protocols to do cargo updates? Once those are merged, you can revert the change to the lock file, and all should be good here.

pop-os/cosmic-applets#1453 is merged

Switch the networking pages to use nmrs 3.4.0 for NetworkManager
state, device lists, Wi-Fi operations, VPN imports/activation, and
secret-agent handling.

Remove the old cosmic-settings-network-manager-subscription crate,
drop the direct dbus-settings NetworkManager dependencies, and delete
the unused nmcli VPN helper. Keep nm-connection-editor for profile
creation/editing where the UI still depends on it.

Carry Wi-Fi security metadata through the password flow so SAE/WPA3
personal networks can be activated with SAE key management, and make
failed/cancelled auth attempts clear pending connection state
@jklgrasso

Copy link
Copy Markdown
Contributor

Didn't build due to the lock file. It now matches the master branch and builds locally. CI will start building this again in an hour or so.

@jklgrasso jklgrasso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regression testing passed

Checklist

Network & Wireless

Wi-Fi

  • Able to disconnect from and connect to a network.

Bluetooth

  • Bluetooth device connects.
  • Paired device can be disconnected & reconnected.
  • Paired device can be forgotten & connecting again works.

Desktop

Wallpaper

  • Clicking a different wallpaper switches to it immediately
  • Leaving the page and coming back does not change the wallpaper

Appearance

  • Open a COSMIC app and a GNOME app. When switching between Dark and Light mode, the COSMIC app switches immediately, and the GNOME app switches after restarting.
  • Changing the accent color works.
  • Changing the roundness style works and does not affect other aspects of the theme (e.g. color mode).
  • Changing the interface density works.

Panel

  • Enable tiling. "Automatically hide panel" takes effect immediately.
  • Disable tiling; maximize a window. "Automatically hide panel" takes effect immediately.
    • Not a regression

Dock

  • Enable tiling. "Automatically hide dock" takes effect immediately.
  • Disable tiling; maximize a window. "Automatically hide dock" takes effect immediately.
    • Not a regression
  • Changing position on screen works.
  • All Style settings take effect as expected.

Displays

  • Plug in a second display. Displays can be rearranged via dragging.

Sound

TBD after devices/profiles are fixed.

Power & Battery

  • Changing power mode takes effect and is reflected by top panel applet.

Input Devices

Touchpad

  • All click behavior settings work as expected.
  • All scrolling settings work as expected.

Applications

Default Applications

  • Changing the default terminal affects Super-T shortcut.

X11 Applications Compatibility

  • Global Shortcuts in X11 Applications work (in e.g. Discord).

Time & Language

Date & Time

  • Changing time zone works.
  • Toggling 24-hour time takes effect in Settings preview, on top panel, and on the lock screen.
  • Toggling seconds takes effect in Settings preview and on top panel.
  • Changing first day of week takes effect in Calendar applet.
  • Turning date on/off for applet works.

System & Accounts

About

  • Changing hostname works (check terminal prompt).

@jklgrasso
jklgrasso requested a review from mmstick July 14, 2026 15:58
@wash2
wash2 merged commit 99cf076 into pop-os:master Jul 14, 2026
5 of 6 checks passed
@KodeBarista

Copy link
Copy Markdown
Contributor

Perhaps the regression tests should also include importing VPN configurations & testing VPNs after import. This PR may have broken WireGuard configuration import.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants