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

dell xps: consider enabling AC power supply "fix" #87

Closed
colemickens opened this issue Dec 8, 2018 · 11 comments
Closed

dell xps: consider enabling AC power supply "fix" #87

colemickens opened this issue Dec 8, 2018 · 11 comments

Comments

@colemickens
Copy link
Member

I'm not fully sure of all of the implications, but the last cause of problems with CPU scaling on my XPS 13 9370 was tracked down to weird combinations of my USB Type C Hub and various Type C power supplies that I have around.

Using msr-tools and executing sudo wrmsr -a 0x1FC 2 "fixes" this problem.

I don't fully understand the implications of this, so I'm not going to send a PR right away, but I thought I'd offer it for consideration (and as a potential warning to others in the future).

Also, in the interest of potentially helping other XPS users, the Nov 2018 firmware update has been a big improvement to performance and consistency.

@lukateras
Copy link
Member

I think writing to CPU registers shouldn't brick anything.

Have you tried to upgrade BIOS/EC to their latest versions? Do you update microcode during boot (probably irrelevant)?

@lukateras
Copy link
Member

Ah, it would seem that this only happens with non-OEM charging supplies: https://superuser.com/questions/1160735/stop-dell-from-throttling-cpu-with-power-adapter

@colemickens
Copy link
Member Author

@yegortimoshenko yeah, per my note at the bottom, I did just update everything that I could get to from Linux and Windows (BIOS, LCD, SSD, the works). However, as you found, this is still useful with non-OEM powersupplies (or it seems, OEM powersupplies when used through some types of USB Hubs).

My hesitation is that Dell might have a legitimate (safety?) reason for shipping with this default configuration.

@Moredread
Copy link
Contributor

@colemickens how did you notice the problem? Where did you find the fix?

@colemickens
Copy link
Member Author

@Moredread I noticed the problem because I recently added my CPU Frequency to my i3bar and observed that when I utilized power through the USB Hub, the CPU Frequency would immediately scale to 10% (aka, 400Mhz on my processor). Turns out, that's rather noticeable...

Found the fix by googling "Dell" "AC" "cpu scaling", or something along those lines. There were strong indicators that the combination of hardware (cpu, power, hub, Dell HW) were interacting poorly.

@colemickens
Copy link
Member Author

@Moredread
Copy link
Contributor

Moredread commented Feb 15, 2019

I'm using https://github.com/erpalma/throttled, packaged in my nur repo at https://github.com/Moredread/nur-packages/blob/master/pkgs/throttled/default.nix and https://github.com/Moredread/nur-packages/blob/master/modules/lenovo-throttling-fix/default.nix for fixing throttling issues due to wrong temperature values.

I didn't find that msr address in the source, but maybe it already is handled. For temperature throttling the fix needs to be applied periodically or at least after each sleep wake up, which that tool handles.

@Moredread
Copy link
Contributor

If it look interesting to you I might try to get it added before 19.03

@colemickens
Copy link
Member Author

@Moredread As I understand it, the most important fix performed by throttled is already incorporated by this repo and is already included in the XPS 13 9370 configuration already. See here and compare: https://github.com/NixOS/nixos-hardware/blob/master/common/pc/laptop/cpu-throttling-bug.nix#L14 with: https://github.com/erpalma/throttled/blob/master/lenovo_fix.py#L461

However, it looks that thermald more stuff. Do you know conclusively if the other things it does are necessary on the XPS 13?

Either way, this particular thread is for a different, somewhat related issue that corresponds with certain combinations of chargers/docks and certain Dell laptops and is independent from temperature throttling. If we think thermald is useful beyond just resetting the temperature trigger threshold, maybe we should have a new PR/Issue to discuss it.

@Mic92
Copy link
Member

Mic92 commented Jun 13, 2021

We have both throttled and thermald. 13-9370 profile also enables it.

@Mic92 Mic92 closed this as completed Jun 13, 2021
@colemickens
Copy link
Member Author

(This was about a different MSR controlled behavior than the one that those two tools handle. But it's probably a safety mechanism and I no longer have that laptop, so we can leave this closed.)

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

No branches or pull requests

4 participants