I am using Lenovo Legion 5 with Intel i7 and RTX 3060 Notebook with dual boot windows 11 and Ubuntu 22.04 with kernal 6.5.0-14-generic
>> sudo lshw -C display
[sudo] password for ahmedelfateh:
*-display
description: VGA compatible controller
product: GA106M [GeForce RTX 3060 Mobile / Max-Q]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:01:00.0
logical name: /dev/fb0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list rom fb
configuration: depth=32 driver=nvidia latency=0 mode=1920x1080 visual=truecolor xres=1920 yres=1080
resources: iomemory:600-5ff iomemory:600-5ff irq:186 memory:60000000-60ffffff memory:6000000000-600fffffff memory:6010000000-6011ffffff ioport:5000(size=128) memory:61000000-6107ffff
*-display
description: VGA compatible controller
product: Alder Lake-P Integrated Graphics Controller
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
logical name: /dev/fb0
version: 0c
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
configuration: depth=32 driver=i915 latency=0 resolution=1920,1080
resources: iomemory:620-61f iomemory:400-3ff irq:184 memory:6203000000-6203ffffff memory:4000000000-400fffffff ioport:6000(size=64) memory:c0000-dffff memory:4010000000-4016ffffff memory:4020000000-40ffffffff
>> lspci -k | grep -EA3 'VGA|3D|Display'
00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P Integrated Graphics Controller (rev 0c)
Subsystem: Lenovo Device 3831
Kernel driver in use: i915
Kernel modules: i915
--
01:00.0 VGA compatible controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1)
Subsystem: Lenovo GA106M [GeForce RTX 3060 Mobile / Max-Q]
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidi
I used this doc to install the driver https://ubuntu.com/server/docs/nvidia-drivers-installation
and tried to run nvidia-smi was not working then tried to run sudo nvidia-bug-report.sh to get the report but something strange happened the external screen worked and the laptop screen went black and wen I tried to restart the laptop the screens went like before external black and the laptop is working and I can see in the setting view the Graphics: Mesa Intel® Graphics (ADL GT2) with X11.
>> nvidia-smi
Sun Jan 14 16:39:14 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.146.02 Driver Version: 535.146.02 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce RTX 3060 ... Off | 00000000:01:00.0 Off | N/A |
| N/A 31C P8 9W / 80W | 0MiB / 6144MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
+---------------------------------------------------------------------------------------+
here is the result of the command, and it will be great if you can help.