How to set nvidia driver for default

I am new here. Recently I have installed the Nvidia driver but can't understand it is used. Because:

lspci -k | grep -EA3 'VGA|3D|Display'
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)
	Subsystem: ASUSTeK Computer Inc. Haswell-ULT Integrated Graphics Controller
	Kernel driver in use: i915
	Kernel modules: i915
02:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 840M] (rev a2)
	Subsystem: ASUSTeK Computer Inc. GM108M [GeForce 840M]
	Kernel driver in use: nvidia
	Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
Mon Mar 25 06:10:18 2024       
| NVIDIA-SMI 535.161.07             Driver Version: 535.161.07   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 840M            Off | 00000000:02:00.0 Off |                  N/A |
| N/A   43C    P8              N/A /  19W |      3MiB /  2048MiB |      0%      Default |
|                                         |                      |                  N/A |
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|    0   N/A  N/A      2092      G   /usr/bin/gnome-shell                          0MiB |

it is off. I need help to set this Nvidia driver as the default graphics for all. How to use both/switch graphics cards anyway. Thanks.

You can use Prime Select in terminal:

sudo prime-select nvidia

1 Like

how to check this worked?



lsmod | grep nvidia

lsmod | grep nvidia
nvidia_uvm           1798144  0
nvidia_drm             94208  2
nvidia_modeset       1314816  2 nvidia_drm
nvidia              56811520  103 nvidia_uvm,nvidia_modeset
drm_kms_helper        274432  3 drm_display_helper,nvidia_drm,i915
drm                   765952  21 drm_kms_helper,drm_display_helper,nvidia,drm_buddy,nvidia_drm,i915,ttm
video                  73728  3 asus_wmi,i915,nvidia_modeset

what does it means ?

It means you are using Nvidia GPU. If you were using Intel, that output would have been blank.

thanks man. can i ask another question?

Sure thing.

  1. when i install zorin first my internal wifi detected and worked too. but after reboot it is disappeared or hidden and show no wifi adapter found. but show in lspci last i checked. it happen most linux os i have tested. another after that it worked little bit stuck, look like suspicious to me someone hacked or maleware but cant identify or confirmed using clamav. any suggestion?

I do not believe that Malware is likely.

What sounds most likely is that at point of install, you are using the Generic Drivers (which work).
After install, the specific drivers for your wifi card are activated and probed by the kernel - but there is a flaw with the driver, and so it does not work.
You could just remain on the generic driver though we do not know off-hand whether that will provide the full speed and performance that a specific driver would.
So you might try installing a new variant of the specific driver, first.

Can you start a new thread and detail your Wifi Card make and model, include the output of

sudo lshw -C network

and describe the trouble you have been having (You could link to your post above) so that members can help troubleshoot it?

Not only this but sometimes internal wifi detected but new wifi name and conf like dir-615 1 and so on. I am using external wiri adapter now.
any hardening technique or tools protect from any cyber attack. Thanks for your time.

In addition to starting a new thread on checking your Wifi cards and drivers, you might consider starting a new Discussion thread in Chat about Zorin covering hardening and security techniques. There are a great many.

run a game and see if it runs better :P

or, run nvidia-smi again and see what else runs using your Nvidia-GPU now :slight_smile:

This is a really really weird thing that never made sense to me, but be sure to disable "Fast Startup"[1] and "Hybrid Sleep" on Windows if you're dual-booting.

Fast Startup can be found and disabled in the settings, Hybrid Sleep can only be disabled using a CMD Command:

powercfg /H

I never understood why and how Windows can break Networking on other operating systems like this, but the only way to fix it was to disable these two features. Yes, this will make Windows boot slower.[2]

  1. Note that when I say "Fast Startup" I mean the option in Windows, NOT the one in your BIOS Configuration screen. ↩︎

  2. but that's only because when these features are enabled your PC never really shuts down. It just saves everything to RAM and then goes to sleep, appearing to be turned off. ↩︎

Windows OS introduced a method of what Microsoft calls "Fast Startup" that gives the appearance of a quicker boot.
This is misleading, however. Windows OS does not boot, nor does it fully shut down.
Instead, it hibernates and when you "boot" the computer, it wakes from hibernation, giving the appearance of a faster "boot".
Since Windows OS is still running the entire time, it retains its lock on the essential hardware including Networking.
This is not a true hibernate setting and it is not made clear in Windows OS whether you are shutting down fully or just setting Windows OS into this hibernation state (it is automatically handled by Fast Boot); even grub can be fooled into thinking that Windows OS is down.

Yeah, but how does that work when I REBOOT the PC???
At that point it is not hibernating anymore :thinking:

Windows Fast startup or Fast Boot is intended to give Windows OS the appearance of booting quickly. It is to their advantage that it hibernates, rather than a Full shutdown and Restart.
Otherwise, every restart would appear to suddenly boot slowly.

But you're right, it is trickier than just "Windows Hibernates every time."
When you click a shutdown option with Fast Startup enabled, Windows saves the kernel session and device drivers to the hiberfil.sys file. This is then loaded on startup so that Windows does not need to init from cold.

But when you reboot the computer, Windows OS is supposed to perform a full shutdown, then reinitialize all drivers and the kernel.
And it often does.
But... not always. I do not know why, either.
Sometimes it starts the process of a full shutdown, then switches to hibernate again part way through during a Restart.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.