nixos-hardware icon indicating copy to clipboard operation
nixos-hardware copied to clipboard

Add system76 galp5-1650

Open ahoneybun opened this issue 1 year ago • 9 comments

Description of changes

Adds the system76 galp5 (1650 version in this case)

Things done
  • [x] Tested the changes in your own NixOS Configuration
  • [x] Tested the changes end-to-end by using your fork of nixos-hardware and importing it via <nixos-hardware> or Flake input

ahoneybun avatar Sep 15 '24 00:09 ahoneybun

The NVIDIA driver is loaded with this configuration:

[sudo] password for aaronh: 
  *-display                 
       product: i915drmfb
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 01
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 resolution=1920,1080
       resources: irq:184 memory:83000000-83ffffff memory:90000000-9fffffff ioport:1000(size=64) memory:c0000-dffff memory:892000000-898ffffff memory:8a0000000-97fffffff
  *-display
       physical id: 0
       bus info: pci@0000:23:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: iomemory:80-7f iomemory:80-7f irq:183 memory:81000000-81ffffff memory:880000000-88fffffff memory:890000000-891ffffff ioport:4000(size=128) memory:82000000-8207ffff

Though system76-power graphics does not seem to work:

[aaronh@garrus:~]$ system76-power graphics daemon returned an error message: "The name com.system76.PowerDaemon was not provided by any .service files"

I have the hardware.system76.enableAll enabled in my configuration:

https://gitlab.com/ahoneybun/nix-configs/-/blob/main/hosts/x86_64/garrus/configuration.nix?ref_type=heads

I'll add add the system76 generic part as well of nixos-hardware to test.

ahoneybun avatar Sep 15 '24 00:09 ahoneybun

Yep I needed that for the system76-power service!

[aaronh@garrus:~]$ system76-power graphics
nvidia

though I don't think this works on NixOS anyway:

[aaronh@garrus:~]$ system76-power graphics integrated
setting graphics to integrated
daemon returned an error message: "failed to execute update-initramfs command: No such file or directory (os error 2)"

ahoneybun avatar Sep 15 '24 00:09 ahoneybun

I think this might be that NixOS has version 1.1.23 of system76-power. I don't think this not working would be a blocking to add this system since the gaze18 was not blocked though.

ahoneybun avatar Sep 15 '24 03:09 ahoneybun

@Mic92 I just copied the config from the gaze18 so if we need to address things here I can make a PR for that model as well.

ahoneybun avatar Sep 18 '24 12:09 ahoneybun

@Mic92 I just copied the config from the gaze18 so if we need to address things here I can make a PR for that model as well.

Likely yes.

Mic92 avatar Sep 18 '24 13:09 Mic92

If I remove those options then rebuild and reboot nvidia-smi does not work so I think it is needed.

ahoneybun avatar Sep 18 '24 14:09 ahoneybun

Alright @Mic92 I was incorrect and with the current changes nvidia-smi shows that the NVIDIA driver is loaded though system76-power graphics now reports this:

[aaronh@garrus:~]$ system76-power graphics compute

so I think it is needed for NVIDIA mode at least but with Compute it should be similar to Hybrid.

ahoneybun avatar Sep 18 '24 15:09 ahoneybun

Alright so I think compute is because I'm in the 6.6 kernel now and before I was in the 6.10 kernel series. I can't build 6.11 with the system76-module which is why I'm back in 6.6.

ahoneybun avatar Sep 18 '24 15:09 ahoneybun

Alright with the current state of this PR puts the system in PRIME Offload Mode which I think is a good middle ground. You can use the NVIDIA GPU when needed and is pretty close to system76-power's Hybrid mode.

ahoneybun avatar Sep 19 '24 21:09 ahoneybun

@mergify queue

Mic92 avatar Sep 27 '24 11:09 Mic92

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at d830ad47cc992b4a46b342bbc79694cbd0e980b2

mergify[bot] avatar Sep 27 '24 11:09 mergify[bot]