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 Dell XPS 13 9340 and Meteor Lake #1134

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ See code for all available configurations.
| [Dell XPS 13 9300](dell/xps/13-9300) | `<nixos-hardware/dell/xps/13-9300>` |
| [Dell XPS 13 9310](dell/xps/13-9310) | `<nixos-hardware/dell/xps/13-9310>` |
| [Dell XPS 13 9333](dell/xps/13-9333) | `<nixos-hardware/dell/xps/13-9333>` |
| [Dell XPS 13 9340](dell/xps/13-9340) | `<nixos-hardware/dell/xps/13-9340>` |
| [Dell XPS 13 9343](dell/xps/13-9343) | `<nixos-hardware/dell/xps/13-9343>` |
| [Dell XPS 13 9350](dell/xps/13-9350) | `<nixos-hardware/dell/xps/13-9350>` |
| [Dell XPS 13 9360](dell/xps/13-9360) | `<nixos-hardware/dell/xps/13-9360>` |
Expand Down
17 changes: 17 additions & 0 deletions common/gpu/intel/meteor-lake/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{pkgs, lib, config, ...}: let inherit(lib) mkDefault mkIf; in {
imports = [ ../. ];

# only needed to support the i915 driver, can be found using `nix-shell -p pciutils --run "lspci -nn" | grep -oP "VGA.*:\K[0-9a-f]{4}"`
options.hardware.intelgpu.deviceID = lib.mkOption { description = "Intel GPU to probe"; };

config = {
# i915 is buggy on meteor lake, xe should be the default
hardware.intelgpu.driver = mkDefault "xe";

Choose a reason for hiding this comment

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

I have a Dell Latitude 7450 with an Intel Core Ultra 7 165U.
In my tests so far the Xe driver, while providing the best experience right at boot (correct resolutions etc.), was very unstable.
Everytime I watched a video either with MPV or in the browser the device crashed after max. 10 minutes.
I'm currently running the i915 driver and so far it has been working fine.

Therefore I'm not sure it is fair to say that i915 is buggy on Meteor Lake. However I'm not the best when it comes to hardware.

Choose a reason for hiding this comment

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

Interesting. I found the i915 driver to be unusably buggy on an XPS9340, while the xe driver works fine. I'll look more into it and see if there's some other factor.

Copy link

Choose a reason for hiding this comment

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

I'm currently using the Dell Precision 5390 with an Intel Core Ultra 7 165H with this patch and also the Xe driver and haven't noticed any issues so far. But I'm using this system only for 2 days.

Choose a reason for hiding this comment

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

Hm interesting, that is a very similar CPU.
My setup is here, AFAIK I’m not doing something exotic but maybe miss something obvious.
https://git.2li.ch/Nebucatnetzer/nixos/src/branch/new-notebook/systems/capricorn/default.nix

I tried it again yesterday and Xe failed reproducible when watching a video with the same config except for the force_probe.
Which looked like this: https://git.2li.ch/Nebucatnetzer/nixos/commit/edeac6d6922c29e78126386c563e976e79cff23c

@Sh3Rm4n is suspend working for you? If so are you using an encrypted drive?

Copy link

Choose a reason for hiding this comment

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

I'm using an encrypted drive and haven't explicitly checked suspend so far, but I think it is currently not working correctly. I'll recheck again.

Choose a reason for hiding this comment

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

I just see this, the boot is because I killed the system.

Jan 22 20:56:19 capricorn systemd[1]: Starting System Suspend...
Jan 22 20:56:19 capricorn systemd-sleep[14013]: Successfully froze unit 'user.slice'.
Jan 22 20:56:19 capricorn systemd-sleep[14013]: Performing sleep operation 'suspend'...
Jan 22 20:56:19 capricorn kernel: PM: suspend entry (s2idle)
Jan 22 20:56:19 capricorn kernel: Filesystems sync: 0.009 seconds
-- Boot 412e6ed5b57b47d3a8552a5e9d53befb --

Choose a reason for hiding this comment

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

I have a Dell Latitude 7450 with an Intel Core Ultra 7 165U. In my tests so far the Xe driver, while providing the best experience right at boot (correct resolutions etc.), was very unstable. Every time I watched a video either with MPV or in the browser the device crashed after max. 10 minutes. I'm currently running the i915 driver and so far it has been working fine.

Therefore I'm not sure it is fair to say that i915 is buggy on Meteor Lake. However I'm not the best when it comes to hardware.

Just to be sure I tested this PR and the settings from nixos-hardware explicitly and I'm seeing the same behaviour.
In addition I have to force_probe the Xe driver otherwise the notebook doesn't detect my external monitor.

Choose a reason for hiding this comment

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

What just came to my mind.
Are you guys using X11 or Wayland or wouldn't that make a difference?

Copy link

Choose a reason for hiding this comment

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

I use plasma with wayland

Choose a reason for hiding this comment

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

Solved the suspend problem by removing the webcam option.
Sorry for the detour.


# xe driver requires newer kernel
boot.kernelPackages = mkIf(config.hardware.intelgpu.driver=="xe")( mkDefault pkgs.linuxPackages_latest );

# workaround that gets the i915 driver working, for those that wish to use it
boot.kernelParams = mkIf(config.hardware.intelgpu.driver=="i915")[ "i915.force_probe=${config.hardware.intelgpu.deviceID}" ];
};
}
16 changes: 16 additions & 0 deletions dell/xps/13-9340/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{ pkgs, lib, ... }: let inherit(lib) mkDefault; in {
imports = [
../../../common/cpu/intel
../../../common/pc/laptop
../../../common/pc/ssd
../../../common/gpu/intel/meteor-lake
];

# Allows for updating firmware via `fwupdmgr`.
services.fwupd.enable = mkDefault true;

# This will save you money and possibly your life!
services.thermald.enable = mkDefault true;

hardware.intelgpu.deviceID = "7d55";
}