Hi guys! Just like most people with Nvidia cards I’m having a terrible time setting things up.
First of all, here’s the output of
Graphics: Device-1: Intel TigerLake-H GT1 [UHD Graphics] vendor: Acer Incorporated ALI driver: i915 v: kernel arch: Gen-12.1 process: Intel 10nm built: 2020-21 ports: active: eDP-1 empty: DP-1,DP-2 bus-ID: 0000:00:02.0 chip-ID: 8086:9a68 class-ID: 0300 Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] vendor: Acer Incorporated ALI driver: nvidia v: 525.89.02 alternate: nouveau,nvidia_drm non-free: 525.xx+ status: current (as of 2023-02) arch: Turing code: TUxxx process: TSMC 12nm FF built: 2018-22 bus-ID: 0000:01:00.0 chip-ID: 10de:1f9d class-ID: 0300 Device-3: Quanta HD User Facing type: USB driver: uvcvideo bus-ID: 3-9:3 chip-ID: 0408:a061 class-ID: 0e02 Display: x11 server: X.Org v: 21.1.7 compositor: Picom v: git-b700a driver: X: loaded: intel,nvidia unloaded: modesetting alternate: fbdev,nouveau,nv,vesa dri: i965 gpu: i915 display-ID: :0 screens: 1 Screen-1: 0 s-res: 2560x2160 s-dpi: 96 s-size: 676x570mm (26.61x22.44") s-diag: 884mm (34.81") Monitor-1: HDMI-1-0 pos: top-left res: 2560x1080 hz: 60 dpi: 97 size: 673x284mm (26.5x11.18") diag: 730mm (28.76") modes: N/A Monitor-2: eDP1 pos: primary,bottom-r res: 1920x1080 hz: 144 dpi: 143 size: 340x190mm (13.39x7.48") diag: 389mm (15.33") modes: N/A API: OpenGL v: 4.6 Mesa 22.3.5 renderer: Mesa Intel UHD Graphics (TGL GT1) direct-render: Yes
As you can see, I have that optimus setup with integrated Intel graphics and a dedicated nvidia GTX1650.
I had to set the nvidia driver to be loaded early setting the nvidia-drm.modeset=1 in the /etc/kernel/cmdline. Doing so made the driver load correctly, my external monitor was detected and worked perfectly, but my main screen resolution changed. The lightdm resolution was wrong too. After the login I could set the right resolution using arandr (curiously the right resolution was the only option). I saved the display setup to the monitor.sh script and it worked, but one thing I couldn’t fix: the lightdm resolution after boot.
If I logout, the lightdm screen will be in the right resolution (1920x1080), but if I reboot, it will be in 640x480. If I remove the kernel parameter to load the nvidia driver earlier, the lightdm screen will be ok but my monitor will not work and the driver will be “N/A” in the inxi -Ga output.
Any help will be appreciated.
tl;dr: I have to load the nvidia driver early to make it work but it breaks the lightdm resolution after boot.