I’ve got a problem using my Lenovo Legion 7 with Linux. I have to use nouveau, because I observe the following issues after switching to official drivers:
In “dynamic” mode my built-in display works fine, but the external monitor can’t be enabled. It is discovered by the system, but is always disabled.
In “discrete” mode both of the screens work fine, but my built-in screen has only one resolution (2560x1600), which is too small. I tried changing it using nvidia-settings, but all the changes reset after a reboot despite saving the x11 conf file.
Thanks for the quick response.
I’ve switched to hybrid mode and installed video-hybrid-amd-nvidia-prime driver.
Unlike previously, this time my external display works fine, but the built-in screen is not even discovered.
I attach the bug-report file
(deleted by the author with comment: no longer relevant)
I’ve followed the hints and restarted my machine.
Now I’m back to the previous state, i.e. my built-in screen works fine, but the external monitor is discovered, but can’t be enabled, so doesn’t work.
Shall I rerun the script with this configuration?
Please set kernel parameter
nvidia-drm.modeset=1
After reboot and login, please run
xrandr --setprovideroutputsource 0 1 && xrandr --auto
If that enables the monitor, you might either add that to autostart or install some optimus manager. https://wiki.archlinux.org/title/NVIDIA_Optimus#Display_managers
To be honest, I’m told to set kernel parameters for the first time, so not sure I know how to do this.
I restarted my machine, in GRUB menu I hit “e” and appended the line you mentioned to the end, then I hit F10.
Actually “toromorrow” is too long. I’ve found the first glitch now.
Some of the apps (e.g. Signal App or GNOME Settings window) need about 10s to process my input (i.e. when I start typing in Signal, I need to wait about 10s before the letters show up).
This happens only when the window is shown on my external display. As soon as I drag it back to my built-in screen, it works normally.
Also, there are no delays in dragging windows. Finally, there are apps that work just fine. E.g. I’ve been typing this post with my Firefox on my external screen.
Yes, as soon as it leaves the external display.
I’ve just installed optimus-manager. After the installation and a reboot it disabled my external screen, but as soon as I executed optimus-manager --switch hybrid everything looks much nicer.
Odd. Actually, I never heard of such an effect. In hybrid mode, the desktop is rendered on the amd gpu and then the picture is just pushed to the nvidia video memory for display. Don’t even know whether this might be an xorg bug or a toolkit one.
The only problem is that I need to execute optimus-manager --switch hybrid manually after every reboot. Without this only my built-in screen is enabled.
Is there a way to set a default mode for optimus-manager?
I use GNOME / GDM and I’ve installed gdm-prime and followed the instructions for GDM.
You can also specify which GPU you want to be used by default when the system boots, by setting startup_mode in the configuration file at /etc/optimus-manager/optimus-manager.conf
You can also specify which GPU you want to be used by default when the system boots, by setting startup_mode in the configuration file at /etc/optimus-manager/optimus-manager.conf
Great, thanks. That works for me.
I’m a bit tired, I miss the crucial parts that are there right in front of me :).
Did you set any xrandr commands? Setting the wrong ones for your mode can lead to odd behaviour and delays.
Everything looks as expected, thanks for the help.
To sum up, in my case it turned out to be needed to:
In BIOS switch my graphics card to “dynamic” (~hybrid) mode.
Remove /etc/X11/xorg.conf.d/90-mhwd.conf and /etc/X11/xorg.conf.
Set kernel parameter: nvidia-drm.modeset=1 (add GRUB_CMDLINE_LINUX="nvidia-drm.modeset=1" to /etc/default/grub/ and run sudo update-grub).
Install optimus-manager and switch it to hybrid mode (this can be achieved either by the qt client, or manually in the app’s config file).
Some of the games I tried failed with error messages failed to initialize nouveau, but I guess that’s a matter of configuring lutris/wine correctly. I don’t have time for this right now and it goes beyond of the scope of the initial problem.