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

Feature.asus zephyrus g16 gu605 my backlight and keyboard rules #1308

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

relief-melone
Copy link

Description of changes
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

Relief Melone added 3 commits November 3, 2024 23:36
- ssd -> laptop/ssd
- added more fn keys
- enabled modesetting
- added home and end fn keys
- modesetting enabled by default
- using laptop and laptop/ssd now
@Moraxyc
Copy link

Moraxyc commented Jan 7, 2025

It seems that brightness adjustment works fine when running on dGPU only. However, I haven’t tested this personally (currently on vacation, will try it when I get back). If anyone can test and confirm this, perhaps we should add a lib.mkIf to add these kernel parameters only when using gGPU hybrid mode.

reference: https://www.ehmiiz.se/blog/linux_asus_g16_2024/

@relief-melone
Copy link
Author

would also lite to test it out. would prefer to test it with an up do date nixpkgs commit though and the current one has issues with my printer as well as some nvim features.
would want to wait for the next publish here

@Mic92
Copy link
Member

Mic92 commented Jan 11, 2025

@Moraxyc still on vacation?

@Moraxyc
Copy link

Moraxyc commented Jan 11, 2025

I tried to use only dgpu without adding these kernel parameters, and the backlight control was normal. So the answer is that we should determine whether to add these kernel parameters based on whether only dgpu is working. However, I don't know how to switch to dgpu-only state in nxios configurations. I entered the bios to switch manually, and the following content seems to be useless

    specialisation.dgpu-only.configuration = {
      disabledModules = [
        # Containing `boot.kernelParams = [];`
        ./brightness.nix
      ];
      system.nixos.tags = [ "dgpu-only" ];
      services.xserver.exportConfiguration = true;

      services.xserver = {
        videoDrivers = lib.mkForce [ "nvidia" ];
      };

      hardware = {
        nvidia = {
          powerManagement.enable = lib.mkForce false;
          modesetting.enable = true;
          prime = {
            offload.enable = lib.mkForce false;
            sync.enable = true;
          };
        };
      };
    };

@Mic92
Copy link
Member

Mic92 commented Jan 19, 2025

@Moraxyc So should we merge this?

@Moraxyc
Copy link

Moraxyc commented Jan 20, 2025

@relief-melone Please add a comment to show that these parameters are used to enable backlight control when the dGPU is working in hybrid mode.

After this, I think we can get the PR merged.

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.

3 participants