-
-
Notifications
You must be signed in to change notification settings - Fork 879
system76: add Oryx Pro support #1701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| # System76 Oryx Pro | ||
|
|
||
| ## Supported Models | ||
|
|
||
| This configuration supports System76 Oryx Pro laptops with the following specifications: | ||
|
|
||
| - **CPU**: Intel Alder Lake-P series (12th gen) | ||
| - **iGPU**: Intel Iris Xe Graphics | ||
| - **dGPU**: NVIDIA GeForce RTX 3070 Ti Laptop (GA104 - Ampere architecture) | ||
| - **Graphics**: Hybrid graphics with NVIDIA Optimus PRIME | ||
| - **External Display**: HDMI output connected to NVIDIA GPU | ||
|
|
||
| ## Configuration Details | ||
|
|
||
| ### NVIDIA PRIME Setup | ||
|
|
||
| This configuration uses **PRIME Sync Mode** which: | ||
|
|
||
| - Keeps the NVIDIA GPU active at all times | ||
| - Enables HDMI output (required since HDMI is connected to NVIDIA GPU) | ||
| - Provides stable external display support | ||
| - Uses more power but eliminates switching delays | ||
| - Works well with Wayland desktop environments | ||
|
|
||
| ### Key Features | ||
|
|
||
| - **Open Source NVIDIA Kernel Modules**: Enabled by default (recommended for RTX 30 series) | ||
| - **Production NVIDIA Drivers**: Uses the stable production branch (~550.x series) | ||
| - **Wayland Support**: Includes environment variables for proper Wayland+NVIDIA operation | ||
| - **System76 Firmware**: Enables System76-specific hardware support | ||
|
|
||
| ### Bus IDs | ||
|
|
||
| - **Intel iGPU**: `PCI:0:2:0` | ||
| - **NVIDIA dGPU**: `PCI:1:0:0` | ||
|
|
||
| ## Usage | ||
|
|
||
| Add this configuration to your `configuration.nix`: | ||
|
|
||
| ```nix | ||
| { | ||
| imports = [ | ||
| <nixos-hardware/system76/oryp> | ||
| ]; | ||
| } | ||
| ``` | ||
|
|
||
| ## Known Issues and Solutions | ||
|
|
||
| ### High Refresh Rate Display Flickering | ||
|
|
||
| If you experience external monitor flickering with high refresh rate displays (144Hz), reduce the refresh rate to 60Hz: | ||
|
|
||
| ```bash | ||
| # Set laptop display to 60Hz | ||
| kscreen-doctor output.eDP-1.mode.2 | ||
|
|
||
| # Set external monitor to 60Hz | ||
| kscreen-doctor output.HDMI-A-1.mode.15 | ||
| ``` | ||
|
|
||
| Alternatively, switch to X11 for better high refresh rate stability: | ||
|
|
||
| ```nix | ||
| services.displayManager.defaultSession = "plasmax11"; | ||
| ``` | ||
|
|
||
| ### Power Management | ||
|
|
||
| For better battery life when not using external displays, you can switch to **Offload Mode**: | ||
|
|
||
| ```nix | ||
| hardware.nvidia.prime = { | ||
| offload.enable = true; | ||
| sync.enable = false; | ||
| }; | ||
| ``` | ||
|
|
||
| Note: Offload mode may not support HDMI output depending on hardware wiring. | ||
|
|
||
| ## Verification | ||
|
|
||
| After applying the configuration and rebooting, verify the setup: | ||
|
|
||
| ```bash | ||
| # Check NVIDIA driver status | ||
| nvidia-smi | ||
|
|
||
| # Verify OpenGL renderer | ||
| glxinfo | grep "OpenGL renderer" | ||
|
|
||
| # Check display configuration | ||
| kscreen-doctor -o | ||
| ``` | ||
|
|
||
| ## References | ||
|
|
||
| - [System76 Oryx Pro Specifications](https://system76.com/laptops/oryx) | ||
| - [NixOS NVIDIA Wiki](https://nixos.wiki/wiki/Nvidia) | ||
| - [NVIDIA PRIME Documentation](https://wiki.archlinux.org/title/PRIME) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| { lib, config, ... }: | ||
|
|
||
| { | ||
| imports = [ | ||
| ../../common/cpu/intel | ||
| ../../common/gpu/nvidia/prime.nix | ||
| ../../common/pc/laptop | ||
| ../../common/pc/laptop/ssd | ||
| ]; | ||
|
|
||
| # System76 Oryx Pro with RTX 3070 Ti | ||
| # This configuration is for laptops with: | ||
| # - Intel Alder Lake-P CPU with Iris Xe iGPU | ||
| # - NVIDIA GeForce RTX 3070 Ti Laptop GPU (GA104 - Ampere) | ||
| # - Hybrid graphics with HDMI output connected to NVIDIA GPU | ||
|
|
||
| services.xserver.videoDrivers = [ "nvidia" ]; | ||
|
|
||
| hardware = { | ||
| # Enable graphics support | ||
| graphics.enable = lib.mkDefault true; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the nvidia module already does this? |
||
|
|
||
| nvidia = { | ||
| # Modesetting is required for Wayland support | ||
| modesetting.enable = lib.mkDefault true; | ||
|
|
||
| # Use production driver (recommended for stability) | ||
| package = lib.mkDefault config.boot.kernelPackages.nvidiaPackages.production; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We usually don't set this for laptops. |
||
|
|
||
| # Use open source kernel modules (recommended for RTX 30 series) | ||
| open = lib.mkDefault true; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do have nvidia generation specific profiles that enable this setting. |
||
|
|
||
| # Enable nvidia-settings GUI | ||
| nvidiaSettings = lib.mkDefault true; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't think this is needed. It sounds more like personal preference. |
||
|
|
||
| # PRIME configuration for hybrid graphics | ||
| prime = { | ||
| # Use sync mode for external display support via HDMI | ||
| # Note: This uses more power but enables HDMI output | ||
| sync.enable = lib.mkDefault true; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So when you had this disabled, hdmi wouldn't work?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The way the Oryx Pro works is annoying, if the GPU is off (using integrated graphics only) it won't actually pass-through the ports attached to the GPU to the rest of the system. This is an issue with Pop! OS as well (external displays only work in hybrid/compute mode, and not on integrated mode). |
||
|
|
||
| # Bus IDs for Intel and NVIDIA GPUs | ||
| # These are standard for Oryx Pro models with this configuration | ||
| intelBusId = "PCI:0:2:0"; | ||
| nvidiaBusId = "PCI:1:0:0"; | ||
| }; | ||
|
|
||
| # Power management for better battery life | ||
| powerManagement = { | ||
| enable = lib.mkDefault true; | ||
| finegrained = lib.mkDefault false; # Disabled in sync mode | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| # Wayland-specific NVIDIA environment variables for better compatibility | ||
| environment.sessionVariables = { | ||
| # Fix cursor issues on Wayland | ||
| WLR_NO_HARDWARE_CURSORS = "1"; | ||
| # NVIDIA-specific variables for proper rendering | ||
| __GLX_VENDOR_LIBRARY_NAME = "nvidia"; | ||
| GBM_BACKEND = "nvidia-drm"; | ||
| LIBVA_DRIVER_NAME = "nvidia"; | ||
| }; | ||
|
|
||
| # Additional kernel parameters for NVIDIA stability | ||
| boot.kernelParams = [ | ||
| "nvidia-drm.modeset=1" | ||
| "nvidia-drm.fbdev=1" | ||
| "nvidia.NVreg_PreserveVideoMemoryAllocations=1" | ||
| ]; | ||
|
Comment on lines
+56
to
+71
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you add these settings based on your testing or where they proposed? |
||
|
|
||
| # System76 firmware support | ||
| hardware.system76.enableAll = lib.mkDefault true; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the nvidia module does this.