Skip to content

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

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

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

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

@Mic92 Mic92 marked this pull request as draft February 6, 2025 04:05
@Mic92
Copy link
Member

Mic92 commented Feb 6, 2025

Please undraft when the change is done.

@phanirithvij
Copy link
Member

friendly ping @relief-melone

@Mic92 Mic92 force-pushed the feature.asus-zephyrus-g16-GU605MY_backlight_and_keyboard_rules branch from f86003f to 1754cdf Compare April 29, 2025 05:46
@Mic92 Mic92 marked this pull request as ready for review April 29, 2025 05:46
@Mic92
Copy link
Member

Mic92 commented Apr 29, 2025

@Mergifyio queue

Copy link
Contributor

mergify bot commented Apr 29, 2025

queue

🛑 The pull request has been removed from the queue default

The pull request #1308 has been manually updated.

You can take a look at Queue: Embarked in merge queue check runs for more details about the failure.

@Mic92
Copy link
Member

Mic92 commented Apr 29, 2025

@Mergifyio queue

Copy link
Contributor

mergify bot commented Apr 29, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at f1e52a0

mergify bot added a commit that referenced this pull request Apr 29, 2025
@mergify mergify bot merged commit f1e52a0 into NixOS:master Apr 29, 2025
3 checks passed
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.

4 participants