Fix sway+nvidia confirmation dialog (#4481)#4485
Merged
svartkanin merged 2 commits intoarchlinux:masterfrom Apr 28, 2026
Merged
Fix sway+nvidia confirmation dialog (#4481)#4485svartkanin merged 2 commits intoarchlinux:masterfrom
svartkanin merged 2 commits intoarchlinux:masterfrom
Conversation
Two bugs in the Sway+Nvidia driver confirmation: 1. The boolean was inverted - confirming "yes, I'm okay with issues" reverted the driver to the previous choice instead of keeping it. 2. The warning triggered for any Nvidia driver, including the open-source nouveau driver which is officially supported by Sway. Add GfxDriver.is_nvidia_proprietary() and is_nvidia_nouveau() methods so the warning fires only for nvidia-open-dkms (proprietary userspace).
Collaborator
|
But |
svartkanin
reviewed
Apr 28, 2026
| ).show() | ||
|
|
||
| if result.get_value(): | ||
| if not result.get_value(): |
Collaborator
There was a problem hiding this comment.
allow_skip is set to false so the user has to make a choice. You can just
return result.get_value()
Contributor
Author
There was a problem hiding this comment.
Collapsed the Sway+Nvidia confirmation handling into return driver if result.get_value() else preset since allow_skip=False guarantees a boolean. If you had a different shape in mind for the result.get_value() simplification, happy to iterate.
- Drop is_nvidia_nouveau() helper. It is not called anywhere yet; can be re-added when a consumer lands. - Collapse the Sway+Nvidia confirmation result handling into a single expression now that allow_skip=False guarantees a boolean answer.
svartkanin
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4481.
The Sway+Nvidia confirmation dialog had two bugs:
Inverted boolean. When the user confirmed "yes, I'm okay with issues", the code reverted the driver to the previous selection instead of keeping the chosen Nvidia driver. The user got the opposite of what they confirmed.
False-positive warning for nouveau. The warning triggered for any Nvidia driver, including NvidiaOpenSource (nouveau), which is the open-source Mesa driver officially supported by Sway. Users selecting nouveau got a misleading warning that they were about to break their Sway setup.
This PR adds two methods on GfxDriver:
The Sway warning now uses is_nvidia_proprietary() instead of is_nvidia(), so nouveau users no longer see it. The boolean check is also flipped so confirming "yes" actually keeps the driver.
is_nvidia_nouveau() is added for symmetry and future use (e.g. when other Wayland compositors get similar checks).