antony-jr / lenovo-legion5-15arh05-scripts

Simple scripts and guides to work around with issues on running linux in Lenovo Legion 5 15ARH05 version.
MIT License
133 stars 13 forks source link

Switch Power Modes with fn+Q #4

Closed pm4rcin closed 2 years ago

pm4rcin commented 3 years ago

Hi, I'm glad I discovered your repo and have a question. I have the same model but with GTX1650 and Ryzen 5 4600H. I'm about to do a fresh install since it was a bit bloated. :D and have a question: How do you switch power modes with fn+Q on linux because I can't find any information on repo? Did I mention that I use Arch btw?

EDIT: Oh and also could you check if backlight regulation of November Arch ISO works for you? Because for me it doesn't. I tried on Arch with 5.14.16 but no luck without amdgpu.backlight=0. Also there was a race between systemd and amdgpu which produced errors. But after loading amdgpu module first in mkinitcpio error was gone but still without boot parameter backlight values have changed but it didn't change the backlight.

antony-jr commented 3 years ago

How do you switch power modes with fn+Q on linux because I can't find any information on repo? Did I mention that I use Arch btw?

Fn + Q works for me out of the box under openSUSE Tumbleweed (I have listed this under what works in the README). Since you are on Arch Linux, there is some specific you are not installing.

Oh and also could you check if backlight regulation of November Arch ISO works for you? Because for me it doesn't. I tried on Arch with 5.14.16 but no luck without amdgpu.backlight=0. Also there was a race between systemd and amdgpu which produced errors.

I will try Manjaro, Garuda(since both are derived from arch) and Arch later if I have time and report back. You should try openSUSE TW, it is rolling like arch but much stable. It installs all the essential packages for you. Live boot is a bit slow under openSUSE though. Try the live boot and see if the Fn + Q and backlight works out of the box under openSUSE TW.

pm4rcin commented 3 years ago

fn+Q works as expected on TW Live KDE so I'll probably have to ask how maintainers did that. Regarding backlight only when I add the parameter it works. Without it only values change and not screen backlight.

antony-jr commented 3 years ago

Regarding backlight only when I add the parameter it works. Without it only values change and not screen backlight.

This is concerning. Are you sure you booted the system with hybrid graphics mode. If you boot the system in discrete graphics mode, this is expected and can be resolved with a simple Xorg config.

You can switch the modes in the firmware setup (F2 I think).

pm4rcin commented 3 years ago

Yes, just checked that it's hybrid.

antony-jr commented 3 years ago

I'm creating a openSUSE TW live usb. I will test this in my hardware and report back. I can't test Manjaro at the moment since it only has linux 5.13.

Also do you know the linux version of the live openSUSE TW instance? (uname -r)

pm4rcin commented 3 years ago

5.14.14-2-default

antony-jr commented 3 years ago

Seems very unusual or I falsely marked the issue as resolved. I need to do more testing. But the weird thing is that my current openSUSE Tumbleweed instance has working backlight control without the amdgpu.backlight = 0.

pm4rcin commented 3 years ago

Have you had the same kernel when you were testing? Can't you temporarily revert your packages to the day you've tested?

antony-jr commented 3 years ago

I have the same version even now. 5.14.14-2-default. Let me do a live boot. It can be hardware specific. Since the display panels we use may differ a lot. Like is it a 60hz or 120hz screen. is it oled? So there is a lot of variations.

pm4rcin commented 3 years ago

120hz VA (not oled)

antony-jr commented 3 years ago

@pm4rcin Tested with Garuda Linux (latest iso at the time of writing), the brightness and hybrid graphics works out of the box without the amdgpu.backlight = 0 kernel param. The Fn + Q also works under Garuda linux. I'm going to test the openSUSE TW latest ISO next.

Kernel version tested, v5.14.14-zen-1-1

antony-jr commented 3 years ago

I can confirm that the brightness control works in openSUSE TW too with linux 5.14.14-2-default. I think you are having a hardware specific issue. Better report it upstream at https://gitlab.freedesktop.org/drm/amd until then use the workaround amdgpu.backlight = 0.

pm4rcin commented 2 years ago

Everything works on arch 5.15.5 even fn+Q. And btw regarding the fn+ESC I've tested it on Windows before and it had the same problem. Only when I set it with Lenovo Vantage the light turned on so it could be BIOS bug.

Johnreidsilver commented 2 years ago

Can you confirm through nvidia-smi -q -d PERFORMANCE and nvidia-smi -q -d POWER that the SW Power Cap is active and the wattage that you are reaching? I'm on Ubuntu 20.04.3 with kernel 5.14.0-1010-oem and although the LED color changes with fn+Q the power limit is always 80W, should go up to 120W on this RTX 3060. My BIOS is set to GPU discrete mode.