Closed lucidtyper closed 8 months ago
Have you tried PopOS, the last time I checked. It has a option to switch graphics cards easily from hybrid to discrete and so on. I think you could edit the Xorg config files to only use AMD card. This generally comes down to using prime-select (as far as I know, it can be used with amd and nvidia combo too, not just intel).
Link: https://www.linuxbabe.com/desktop-linux/switch-intel-nvidia-graphics-card-ubuntu
PS: I don't use Gnome...
Yeah, about two weeks ago. At the moment I have Manjaro on my computer with the optimus-manager package from the AUR. Just changed it to integrated only and it does the trick. I'll try to look for that file and make it use the AMD card...
EDIT: I've been looking on the Arch wiki and tried to google it, but I couldn't solve it.
Okay, so I found by chance a package in the community repo from arch that allows modifying the value of the backlight without sudo brightnessctl
. The way I am using it at the moment is by typing in a terminal this: brightnessctl -d amdgpu_bl0 s +25%
and brightnessctl -d amdgpu_bl0 s 25%-
. I'm planning to replace the brightness shortcuts made by Gnome to these.
Edit: btw, I didn't ask about this... do you have this issue in KDE?
Okay, so I found by chance a package in the community repo from arch that allows modifying the value of the backlight without sudo
brightnessctl
. The way I am using it at the moment is by typing in a terminal this:brightnessctl -d amdgpu_bl0 s +25%
andbrightnessctl -d amdgpu_bl0 s 25%-
. I'm planning to replace the brightness shortcuts made by Gnome to these.Edit: btw, I didn't ask about this... do you have this issue in KDE?
Nope. It's GNOME specific.
EDIT: Maybe you are using Wayland???
Damn it, I really don't consider myself a KDE person. I mean, I could try again with KDE until this is fixed but I'm way too attached to GNOME.
And, no. It happens both Wayland and Xorg.
Oh, btw, this always happens when I install the propietrary Nvidia driver, 'cause I like to have the optimus-manager thing for battery life. I don't have this problem if I stay with Nouveau. I'm considering removing the Nvidia driver and leaving Nouveau. Have you used it before? Does it take a lot of battery?
Nouveau is good. But it's reverse engineered so you can except what kind of implementation the team has. Either way they are doing a really good job for a reverse engineered driver.
But I never used it, maybe on the initial setup. I would say it was decent but with NVIDIA graphics card turned on the battery life always sucks tbh. (One hack I use is that I turn on hybrid mode and blacklist all nvidia drivers to get the maximum juice out of the device.)
Hmmm, I'm interested in doing that hack... If you don't mind, could you share it? Lately I have been trying to have my laptop's battery duration to the maximum, and I got like 10 hours with Fedora 35 Workstation and optimus-manager. I don't know what I did wrong on my Arch install when installing optimus-manager... (yep, during this week I distro-hopped again and I think I'm going to stay here a while).
Anyway, if it's not a problem, I would really appreciate that you could share that hack.
Nope. It's GNOME specific.
I've just installed KDE desktop on my arch setup. It's still happening :astonished: :sleepy: Maybe I should do a fresh install...
Your Arch Setup might have left something off. I have no clue though. Can you try Garuda linux live boot with KDE. It has everything preinstalled to test (like the optimus manager). Garuda linux is based off of arch.
Indeed, I didn't remember that Garuda had the optimus manager thing preinstalled, even though I tried it last summer. Let me get the ISO and try real quick...
EDIT: I've tried DR4GONIZED KDE version and it didn't work :-/ I don't even know anymore... perhaps could be the kernel version or something...
Okay. Try appending this to your kernel params -> https://github.com/antony-jr/lenovo-legion5-15arh05-scripts/blob/main/XOrgConfigurationNvidia/nvidia.txt
Nope, tried it again and not working... :(
It works but after appending one more line. "acpi_backlight=video". the function keys works in gnome but the slider does not work. I also have the same model Legion RYZEN 7 & 1650ti
It works but after appending one more line. "acpi_backlight=video". the function keys works in gnome but the slider does not work. I also have the same model Legion RYZEN 7 & 1650ti
@iitzrohan Cool.
Nope, tried it again and not working... :(
@MrLinuxOsu Sad to hear that, But I think the issue is some silly configuration being wrong. Also make sure you update your BIOS from the Lenovo Vantage software in Windows (by dual booting or virtualization).
Damn, that's weird. Let me check boot real quick on Windows... Wait, maybe could it be the Secure Boot option? I think I have that turned off, but it doesn't hurt checking it...
Damn, that's weird. Let me check boot real quick on Windows... Wait, maybe could it be the Secure Boot option? I think I have that turned off, but it doesn't hurt checking it...
FYI arch does not support secure boot out of the box. It might not boot if you have not configured it to use secure boot. (Need to generate self signed certificates)
Nothing on Vantage, but from Windows Update (it was something from Lenovo but it didn't specified). Anyways, I already checked the BIOS and Secure Boot is disabled. I'm running out of options here. I'll download an Ubuntu or better a Fedora ISO.
Greetings!
Maybe this will help you out.
Similar hardware, Legion 5 17ACH6 on which I'm running Kubuntu 22.04 and... have no such issues. Just upgraded from 21.10 on which I had no issues either. I'm guessing it's due to the fact I'm usually running one of the latest kernels (currently v5.17.5) which for Ubuntu-based distros are easily obtainable from https://kernel.ubuntu.com/~kernel-ppa/mainline/
But wait, there is more! I have also the latest linux-firmware (currenttly 20220329) package, again for Ubuntu: https://packages.ubuntu.com/search?suite=all&arch=amd64&searchon=names&keywords=linux-firmware (on 21.10 I had to install package from newer distribution) You can of course use the latest version from git directly, but I found upgrading 1 package much more convenient than dealing with everything manually and having potential issues with other packages.
And I do have:
GRUB_CMDLINE_LINUX="amdgpu.backlight=0"
But I'm not sure if it's still required.
One more thing worth mentioning will be HDMI output using NVIDIA card, so you need that GPU enabled first - before knowing that, I caught myself thinking HDMI port was broken. I have used either prime-select
or NVIDIA control panel for that.
Good luck!
I had everything working fine in Ubuntu 20.04.1 LTS with kernel 5.15 oem and Nvidia 495 drivers, upgraded to latest 22.04 LTS and despite the kernel remaining the same I lost control of the backlight again, updated kernel to 5.17 oem and tried swapping Nvidia driver versions in "additional drivers" (this solved it the first time), yet the problem remains. I have the BIOS in discrete mode (hybrid hangs ubuntu on load) and all the extra options in GRUB command line default and xorg config. It's very tiring to get this thing working without messing it up with the next click on an update.
edit: running fine with 22.04.2 and kernel 5.19.0-32, minor wifi and CUDA mishaps after returning from sleep, also during first install run the screen with Legion logo is corrupted
Has anyone found a solution? On Ubuntu 22.10 Kernel 5.19, after installing the proprietary NVIDIA driver, everything works (even the external monitor) except for screen brightness.
Has anyone found a solution? On Ubuntu 22.10 Kernel 5.19, after installing the proprietary NVIDIA driver, everything works (even the external monitor) except for screen brightness.
I thought brightness control issue was resolved in the kernel long ago. It's still working with no workarounds in my latest version of openSUSE tumbleweed. Maybe you have a different Legion laptop version?
EDIT: Make sure you are using on dedicated graphics mode and not hybrid graphics mode.
Has anyone found a solution? On Ubuntu 22.10 Kernel 5.19, after installing the proprietary NVIDIA driver, everything works (even the external monitor) except for screen brightness.
I thought brightness control issue was resolved in the kernel long ago. It's still working with no workarounds in my latest version of openSUSE tumbleweed. Maybe you have a different Legion laptop version?
EDIT: Make sure you are using on dedicated graphics mode and not hybrid graphics mode.
So there is no chance for the screen brightness control to work in hybrid mode on Gnome?
Has anyone found a solution? On Ubuntu 22.10 Kernel 5.19, after installing the proprietary NVIDIA driver, everything works (even the external monitor) except for screen brightness.
I thought brightness control issue was resolved in the kernel long ago. It's still working with no workarounds in my latest version of openSUSE tumbleweed. Maybe you have a different Legion laptop version?
EDIT: Make sure you are using on dedicated graphics mode and not hybrid graphics mode.
So there is no chance for the screen brightness control to work in hybrid mode on Gnome?
You can, but this is simpler. Also hybrid graphics works poorly for external monitor.
EDIT: also make sure you are using xorg
Greetings everyone.
After dissappearing for more than one year (sorry), I gave another run to Linux, since lately I have a little more time. I just found out that, using kernel version 6.6 and upwards, the issue with the brightness on Gnome has been solved (on both Switchable and Dedicated graphics mode). No need to tweak any file or use any hack whatsoever. I have tested it with three distros that ship the Gnome DE or similar (Pop_OS! with Cosmic DE with kernel 6.6, Manjaro+Gnome 45.4 on 6.6 and Fedora+Gnome 45.3 with 6.7). And all these three OS, the HDMI glitches and sometimes brightness doesn't work until the non-free NVIDIA driver is installed or told the OS to use hybrid mode (using envycontrol).
So... Yeah. I think this is solved haha.
@lucidtyper Thanks for testing. I've been running Linux since the day I got the laptop. The linux support will improve overtime for this laptop hopefully, but it's been made painfully clear that I should never buy NVIDIA graphics card, AMD CPU + AMD dGPU would be a good combo, but I got Nvidia specifically for CUDA programming.
Hello Antony.
I've been having this issue for around a month. After trying a lot of things, including the
amdgpu.backlight=0
, on almost all the distros I use (Manjaro, Arch, Fedora and Ubuntu, all of them with GNOME desktop) I've been having this issue with the brightness.Today I've seen with the
watch -n 0 cat /sys/class/backlight/nvidia_0/brightness
that the gnome control panel is changing the brightness of the nvidia card, not the amd one... Thus, if I try to change the amdgpu_bl0 one from 255 to 128 for example, it would change (I also noticed i had to do it with nano, I couldn't do it withsudo echo 100 > /sys/class/backlight/amdgpu_bl0/brightness
). I don't know if there's a way to tell the OS to modify the value from amdgpu and not from nvidia...Sorry if all of what I said didn't make any sense. English is not my mother tongue.
Have a nice week.