Skip to content
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

Add system76 galp5-1650 #1126

Merged
merged 1 commit into from
Sep 27, 2024
Merged

Add system76 galp5-1650 #1126

merged 1 commit into from
Sep 27, 2024

Conversation

ahoneybun
Copy link
Contributor

Description of changes

Adds the system76 galp5 (1650 version in this case)

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

@ahoneybun ahoneybun changed the title Add galp5-1650 feat: add galp5-1650 Sep 15, 2024
@ahoneybun
Copy link
Contributor Author

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
Copy link
Contributor Author

ahoneybun commented Sep 15, 2024

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
Copy link
Contributor Author

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 ahoneybun changed the title feat: add galp5-1650 Add system76 galp5-1650 Sep 15, 2024
README.md Show resolved Hide resolved

hardware.graphics = {
enable = lib.mkDefault true;
enable32Bit = lib.mkDefault true;
Copy link
Member

Choose a reason for hiding this comment

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

I am bit unsure if this is actually hardware configuration and not just about playing old games, which not everyone does:

Suggested change
enable32Bit = lib.mkDefault true;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm pretty sure Steam will need it in general as it needs 32bit even if you have modern games.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, but than if we enable the module everywhere, should we not just do it in one place? i.e. nvidia.nix?

boot.initrd.kernelModules = [ "nvidia" ];

hardware.graphics = {
enable = lib.mkDefault true;
Copy link
Member

Choose a reason for hiding this comment

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

Is this not enabled by the nividia module?

@Mic92 Mic92 mentioned this pull request Sep 18, 2024
2 tasks
@ahoneybun
Copy link
Contributor Author

@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.

@Mic92
Copy link
Member

Mic92 commented Sep 18, 2024

@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.

@ahoneybun
Copy link
Contributor Author

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

@ahoneybun
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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.

@Mic92
Copy link
Member

Mic92 commented Sep 27, 2024

@mergify queue

Copy link
Contributor

mergify bot commented Sep 27, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at d830ad4

mergify bot added a commit that referenced this pull request Sep 27, 2024
@mergify mergify bot merged commit d830ad4 into NixOS:master Sep 27, 2024
5 checks passed
@ahoneybun ahoneybun deleted the add-galp5-nvidia branch September 27, 2024 12:20
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.

2 participants