Repository navigation
Create /dev/nvidia-modeset at boot on NVIDIA machines - #16379
omarchybot wants to merge 3 commits into
Conversation
nvidia-utils' 60-nvidia.rules runs only `nvidia-modprobe -c0 -u`, so nothing creates the modeset node until something on the host opens the NVIDIA driver for display. On a hybrid laptop whose panel hangs off the iGPU that may never happen, and games under umu's Steam Runtime container or Flatpak then fail Vulkan presentation: the container cannot run the setuid helper, and Flatpak only binds the node if it existed when the sandbox was built. Install the rule the reporter proved on their machine, gated like the packaged one so a GPU bound to vfio-pci is left alone. The setup leaf replays the bind because an image's first boot runs it after coldplug; the migration replays it on every run so a retry after a failed udevadm still creates the node. Fixes #15975 Co-Authored-By: Maciej Szostak <[email protected]> Co-Authored-By: Codex Medium <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
[Medium impact] The change is limited to NVIDIA display setup and apps that need its device node. Restore the migration's required test coverage before merging. Findings
SummaryCreates
Reviews (3) · Last reviewed commit: "Drop the migration's test, per the rule ..." · Reviewed by Greptile |
The migration replayed udev on every run, so each further user on a machine re-triggered every NVIDIA display controller and waited on udevadm settle for a repair that had already landed. agents/skills/migrations.md asks a machine-wide repair to detect that it is done and no-op, as 1791134093.sh does. The node existing is that state; while it is missing, a retry still replays the bind. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Reviewed as a pull request at its new head, What was checked, on a disposable worker VM (no NVIDIA GPU). Pushed: Second opinion. Codex Medium and muse-spark-1.3-contributor (via pi, thinking high) reviewed it in two rounds. muse-spark raised the replay-on-every-run problem fixed above. Codex suggested matching the rule on PCI Separately, #16302 proposes removing migration tests and telling contributors not to add new ones. If it lands first, this PR's test will go against that rule. What it waits on: @szoniu. The head moved after you were asked on #15975 to test |
|
Tested Method. I didn't use Results:
|
docs/testing.md and agents/skills/migrations.md on quattro now say a migration gets no suite test: it runs once per machine and is frozen once it ships. The test file only exercised the migration, and OMARCHY_NVIDIA_MODESET_NODE existed only so it could, so the migration checks /dev/nvidia-modeset directly again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks for testing this on the G16, @szoniu. Your result covers the rule, the migration, its retry guard and boot timing on real hardware, which no worker here can do. One change pushed, What was checked, on a disposable worker VM (no NVIDIA GPU). Second opinion. Codex Medium and muse-wonder (pi, thinking high) reviewed this commit and the whole pull request against current Waiting on @szoniu. A hardware fix is marked verified only against the head commit named in full, and the head has moved. Steps 2 and 3 of your method, run from a checkout at |
| if [[ ! -e /dev/nvidia-modeset ]]; then | ||
| sudo udevadm control --reload | ||
| sudo udevadm trigger --action=bind --subsystem-match=pci --attr-match=vendor=0x10de --attr-match='class=0x03*' | ||
| sudo udevadm settle |
There was a problem hiding this comment.
Required migration test removed
The PR removes the dedicated test while this migration is still being changed. The migration guide requires keeping that test for an unfinished privileged udev repair. Restore coverage for the hardware guards, retry path, and no-op when /dev/nvidia-modeset already exists before merging.
File Used: agents/skills/migrations.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Tested Starting point: I removed the rule and rebooted.
|
|
@szoniu’s confirmation names the full current head, On a disposable worker without an NVIDIA GPU, Greptile’s request to restore the migration test cites the guide from the old branch. Current GPT-6 High in Codex reviewed this, with second opinions from Opus 5.5 High and muse-wonder via pi, thinking high. Both found nothing outstanding and agreed that the hardware confirmation covers this head; independence from this review is not guaranteed. No code changes were needed in this run. The hardware confirmation is recorded as |
nvidia-utils' 60-nvidia.rules runs only `nvidia-modprobe -c0 -u`, so nothing creates the modeset node until something on the host opens the NVIDIA driver for display. On a hybrid laptop whose panel hangs off the iGPU that may never happen, and games under umu's Steam Runtime container or Flatpak then fail Vulkan presentation: the container cannot run the setuid helper, and Flatpak only binds the node if it existed when the sandbox was built. Install the rule the reporter proved on their machine, gated like the packaged one so a GPU bound to vfio-pci is left alone. The setup leaf replays the bind because an image's first boot runs it after coldplug; the migration replays it only while the node is missing, so a retry after a failed udevadm still creates it and another user's run is a no-op. Fixes omacom#15975 Upstream: omacom#16379 (open), its three commits efd6483, dcdd06b and 1768b56 squashed, taken as is. Backport to v4.5.0-rc2: install/hardware/nvidia.sh ends in our patch 0012's hybrid branch (no early load on hybrids), so the rule's install and the bind replay go after that if/else instead of after the heredoc; the lines are upstream's. Co-Authored-By: Maciej Szostak <[email protected]> Co-Authored-By: Codex Medium <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
… boot (omacom/omarchy#16379) On a hybrid whose panel is on the iGPU (the G16), nothing ever runs `nvidia-modprobe -m`, so /dev/nvidia-modeset is missing after boot and games in umu's Steam Runtime container or Flatpak can't present: WoW under GE-Proton drew only a black window (vkCreateSwapchainKHR -13), and every Play click left another invisible Wow.exe holding about 1.3 GB of VRAM. Patch 0029 carries upstream's open fix as is: a udev rule that runs `nvidia-modprobe -m` when an NVIDIA display controller binds to nvidia and the node is missing, installed by install/hardware/nvidia.sh and by its migration on existing NVIDIA machines. On our tree the install lines sit after 0012's hybrid branch in nvidia.sh. docs/deltas.md, NOTES.md and UPSTREAM_PRS record it; it drops once an Omarchy release ships #16379. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… boot (omacom/omarchy#16379) (#428) * omarchy + omarchy-settings 4.5.0-3.102: create /dev/nvidia-modeset at boot (omacom/omarchy#16379) On a hybrid whose panel is on the iGPU (the G16), nothing ever runs `nvidia-modprobe -m`, so /dev/nvidia-modeset is missing after boot and games in umu's Steam Runtime container or Flatpak can't present: WoW under GE-Proton drew only a black window (vkCreateSwapchainKHR -13), and every Play click left another invisible Wow.exe holding about 1.3 GB of VRAM. Patch 0029 carries upstream's open fix as is: a udev rule that runs `nvidia-modprobe -m` when an NVIDIA display controller binds to nvidia and the node is missing, installed by install/hardware/nvidia.sh and by its migration on existing NVIDIA machines. On our tree the install lines sit after 0012's hybrid branch in nvidia.sh. docs/deltas.md, NOTES.md and UPSTREAM_PRS record it; it drops once an Omarchy release ships #16379. Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs: why /dev/nvidia-modeset comes and goes on the G16, and the manual confirmation (0029) HDMI-A-1 is on the RTX, so a boot that uses HDMI gets the node from NVIDIA's KMS path; undocked or docked on DP alone nothing creates it, and 0026's desktop pins keep even a host vulkaninfo off NVIDIA's ICD. Record vkd3d-proton's swapchain error, and that the next WoW launch drew its window ten seconds after nvidia-modprobe -m (docked, no HDMI). The test now runs in that failing setup. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: rdoupe <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
On hybrid NVIDIA laptops
/dev/nvidia-modesetdoes not exist after boot, even thoughnvidia_modesetis loaded early through/etc/mkinitcpio.conf.d/nvidia.conf. Games under umu's Steam Runtime container (omarchy-install-gaming-battlenet) and Flatpak apps then fail Vulkan presentation (VK_ERROR_UNKNOWN, DXVK'sFailed to query present modes: -13) and show a black screen until something on the host happens to open the NVIDIA driver.The node is never created at boot because nothing asks for it. The
60-nvidia.rulesshipped bynvidia-utils615.78.08 runs onlynvidia-modprobe -c0 -u, and the one innvidia-580xx-utils580.196.07 runs barenvidia-modprobeand-c0 -u. Neither passes-m, which is what loadsnvidia-modesetand makes its device file. On a machine where NVIDIA drives the panel, something on the host evidently creates it at login; where the panel hangs off the iGPU, nothing does. The container cannot repair that itself, because the setuid helper does not work inside it, and Flatpak only binds the node into a sandbox if it existed when the sandbox was built.This installs
/etc/udev/rules.d/61-nvidia-modeset.rules, the rule the reporter proved on their machine. It matches exactly what the packaged rule matches (an NVIDIA display controller bound to thenvidiadriver), so a GPU handed tovfio-pciby supergfxctl is left alone, andTEST!="/dev/nvidia-modeset"makes it a no-op once the node exists, including if Arch packaging ever adds-mitself.install/hardware/nvidia.shinstalls it for new installs. It then replays the GPU's bind event, because an image build defers this leaf to the machine's first boot, which runs after coldplug; in the ISO chroot the replay fails quietly, asinstall/post-install/udev.shalready does.udevadmstill creates the node.The real fix belongs in Arch's
nvidia-utilsrule; until it does, this rule is the narrow way to carry it. Whether it makes a game present has to be confirmed on the reporter's hardware, since workers have no NVIDIA GPU.Fixes #15975