 Hello, I'm Denshi. Now, before I begin with this video, you might know I made a video called Manjaro image WD AutoConfig, essentially talking about some scripts I made to automatically configure Nvidia Optimus drivers on laptops running Manjaro that have Nvidia dedicated graphics in them. Now, many people have had absolutely no issues with these scripts. They've been able to run them and they did what they needed to do. They installed the drivers, they configured them and they rebooted their system and everything worked. However, there have been a growing number of people who had issues with the scripts and I want to address that in this video by explaining a relatively, you know, a far far better way of getting all of this done. In fact, I'll be discontinuing the Manjaro MHWD AutoConfig scripts. I'll be deleting those off GitLab and that video won't be privated, but I will put a little link to this video explaining how to actually do things a little bit better. Now, what am I talking about? I'm talking about a piece of software named Optimus Manager. Now, what is Optimus Manager? Now, I talked about these Optimus laptops. Nvidia Optimus, what is that? Well, essentially, I've already touched on this in the MHWD video, but I'll explain it again. In laptops that have Nvidia dedicated graphics cards, so like many gaming laptops out there, normally what you do is you have a processor. So normally an Intel processor and the processors display output. So the, you know, because all Intel processors come with, well, not all of them, but all of the ones that you'd find in laptops come with integrated graphics. That's what's wired to the display. Your Nvidia graphics card isn't wired to the display. It's wired to the motherboard and it can essentially pass through its graphics. So all the frames it renders to the processor's integrated graphics and then to the display. It's essentially a way to get around having to power the Nvidia graphics cards when you don't actually need them. So essentially you'd be able to use the laptop using only Intel graphics without having to power on the Nvidia graphics, even just for an output. It's a power saving, you know, technique. And obviously, you know, it's sort of annoying to deal with, but it's there for a reason. But in this video, I'm going to be explaining how you in Manjaro, whether it be KDE or other versions of Manjaro, will be able to essentially take it and install this program named Optimus Manager along with the Nvidia drivers and switch between these two modes of rendering the whole computer with Nvidia graphics and rendering the whole computer with only Intel graphics. Now, this is only for arch-based Linux distributions and in this video I'm touching upon installing it on Manjaro. There are a couple of differences. On Arch Linux, it's a little bit simpler, but that's not what I'm talking about. If you use Arch Linux, you probably already know how to configure all of this. So anyway, let's begin by not installing Optimus Manager. The first thing we actually have to do is do something completely different. We have to run, actually, I'm going to minimize Firefox here, so it doesn't distract us. I'm going to, there you go, minimize. We're going to install a program named Yeh. Now, what is Yeh? You probably have already used Yeh. Yeh is a package manager that also manages packages not only from the repositories, the main Manjaro repositories, but also the AUR, the Arch user repository. And that's where Optimus Manager is located so we can install it. So we need Yeh for this. However, Yeh is also useful just as a package manager because typing in a sudo pacman-s is longer than typing in Yeh-s, which is the Yeh install command. So anyway, before you do anything, make sure you've updated your system. So Yeh-syu, you run that and make sure your entire system is updated. That's quite important. You also now want to install the actual NVIDIA drivers. Now, how do we do this? We do Yeh-s, NVIDIA, the NVIDIA package group. We're going to press Enter, and it's going to give us all these options. Now, you're probably wondering which one do I choose with these. Well, it's pretty simple. If you don't know which one to choose, press Ctrl-C to cancel the command, Ctrl-L to clear, and we're going to type in this command called Uname, and it gives us the wrong one, sorry, Uname-A. And Uname-A gives us information on the system, including this number over here, the kernel. Our kernel is 5.6. So going back to that Yeh NVIDIA command, you'll notice there's like Linux 4, Linux 5.6. We want to install this one. Linux 5.6 NVIDIA 4.40. 4.40 is the latest package at the moment when it comes to NVIDIA drivers. There is 4.50, but that's only really in arch Linux circles because Manjaro hasn't pushed it to their repositories yet because you know it's a relatively new driver. But at the moment, Linux 5.6 NVIDIA 4.40 XX is the latest NVIDIA driver available on Manjaro for the current kernel that it's using. Unless you install a newer kernel, you should be using this at the moment. In the future, obviously, you'd be using Linux 5.8 or Linux 5.7 or something, and NVIDIA 4.50 or even 4.60 or 4.70 or whatever they come up with, NVIDIA 500 or something, I don't know. But just keep in mind the Uname-A command to check your kernel number. So that's this number 5.7 or 5.6 or whatever. And keep in mind checking this number to make sure it's the newest number. So at the moment with Manjaro, it's 4.40. Soon, eventually, it'll be 4.50, then maybe 4.60 in the future. But at the moment, we have to specify 35 because that's the number associated with this. So 35, sorry, not 25. 35 here at the Enter number prompt. Press Enter. And it's gonna ask you again, it should still be 35. Here we are, 35. So just type in 35 again. This is simply, I believe, for the Utils or something. Press Enter. And as you can see, it's gonna install the package. So press Enter again and it's installing. It should also install the Utils. I don't know why it's not doing that. Here it should automatically do that normally. But there you go. It's running a build hook just for kernel stuff. Ignore that. Anyway, so that's what you gotta do. You gotta wait for this to be done. So there you go. You've installed the NVIDIA drivers. Now we actually have to configure them. Now the first thing you'd actually want to do is something quite interesting. If you're using Manjaro KDE, if you're not using Manjaro KDE, don't do this step. You're going to, also if you're using GNOME, you're going to have to do these steps. I'm not gonna cover that because I'm not using GNOME. But if you are using GNOME, do this stuff. Manjaro KDE users, we have to go into this file called stdm.com in the Etsy folder and comment out display command and display stop command. So we're gonna copy paste this, so Ctrl C. We're going to open up our terminal. And first of all, I'm going to install Vim. Vim is a text editor. So press yay dash. So type in yay dash s Vim. I'm gonna have all these commands linked in the description along with Optimus Manager linked in the description so you can look at it. And the steps. So we have to install Vim. We're gonna do sudo vim and then that file enter. And if you go down here, you see I've already commented these out. But essentially you'd find that they were like this. So you'd find display stop command and display command were not commented out. You want to press the I key? Press type in a number symbol or a hashtag or a pound sign or whatever you call it before these lines. Then press escape colon WQ or right quit and press enter. And then you're done. You've fixed that issue. Now we want to install Optimus Manager. Now you type in yay dash s Optimus dash manager. And if you want the little gooey icon, you can type in Optimus Manager QT. That's the KDE one. I don't know about GNOME. You can check the GitHub, the GitHub page, the GitLab page on that. So GitHub page actually. So type that command, press enter. And as you can see, it has a little bit. It might have a little bit of an error. So it might give, see, cannot find the strip binary. If you're getting that error, do yay dash s base devil. You're going to need that. So just press enter at this, press enter at that. And as you can see, it's installing all those packages. And as you can see, all the packages are installed. What these packages are are things you need to build things from the AUR. And since Optimus Manager and Optimus Manager QT are installed from the AUR, you needed those base devil packages. So obviously, once again, all these commands are in the description. You can essentially run these and it will do things for you. So press enter it here. And press enter at that. Press enter again. Just press enter all the time. Unless it prompts you for your password. In that case, type in your password. And as you can see, it's building the QT interface because it's building from source. It shouldn't take long if you have a relatively modern CPU. And there you go. We've installed Optimus Manager QT as well. Now, what do we do now? Well, you see, there's something called a daemon. If you're a new user to Linux, you probably don't know what a daemon is. It's essentially a service that runs in the background and we need to enable this service which manages Optimus Manager itself. So system CTL enable Optimus Manager. So type that command. Obviously, sudo it. Press enter and it's enabled. Now we have to reboot. This is important. So you're going to type in the command reboot and press enter and you're going to reboot. So I'm just going to stop the recording and I'm going to come back once, you know, I'm rebooted. Now that we restarted, the daemon is running. So we can activate Optimus Manager just by searching for it and, you know, pressing enter. And then it will show up over here, this little Intel icon. Right click on it. Click on settings and if you want to do things like launch the icon automatically on startup, change the icons for things if you wish. I'm going to set my startup mode to Nvidia. That's pretty much it. You can change your DPI if you wish, all this stuff. The only thing I really think is important is making sure you set launch startup to on and set your startup mode to what you actually want it to be. So press OK. See, as you can see, it saves it now. And now I'm going to stop recording. I'm going to right click on this and I'm going to click switch to Nvidia. I'm going to have to stop recording for that because it actually halts my Xorg sessions. That's the actual, you know, what draws the windows on the screen and I can't be recording with OBS while that's happening. So I'm going to do that and I'm going to, you know, come back to you. OK, so as you can see, the little icon in the corner is changed to Nvidia. A little note, when you try to click switch on Nvidia, if it gives you a little notification saying, oh, power consumption may go up or something like that, right? You can just press OK. As long as you have a relatively modern graphics card, that should be perfectly fine because all modern graphics cards by Nvidia have all that power stuff sorted. And in fact, it actually says that you will also be prompted to log back in because it restarts your Xorg session. Just type in your password and you'll log in. And if everything goes according to plan, as I've set it up here, you know, you should be now running off the invader graphics card. But how do we actually check that? Well, let's open up our terminal and we're going to type in this command, GLXINFO, then the pipe grep-ivender. Now, all this does is, you know, GLXINFO is a command to give information about a bunch of like devices relating to stuff in your computer. And grep, we're going to pipe that input. Inputs to send that input to a command called grep, which essentially searches the file for vendor information. We're going to press enter. And as you can see, it says, Nvidia Corporation, Nvidia Corporation because it's now running off the invader graphics card. So if I want to switch back to Intel, I can just right click on this and the switch to Intel. The only things that I really didn't cover in this video were setting up on GDM on GNOME because things are a little different. On XFCE, in fact, you don't have to deal with any of that weird like VIM stuff, which I was talking about before. All the commands for installing and configuring will be linked in the description. And, you know, I once again, I apologize for anyone who had issues with my scripts. From now on, I recommend doing this Nvidia driver stuff this way because it's normally just better. And yeah, a couple of tips. Don't install Nvidia DKMS because some people do this. They go and, you know, open up the terminal and they try to install this package called Nvidia DKMS. Don't do that. You shouldn't do that. You shouldn't do that. You should install the Nvidia package and then select the, you know, now it's going to update it for me, but essentially select the correct Nvidia drivers. Be sure to, that's an important, another important note. Be sure to enable that daemon. Always be sure that command is very crucial. Once you've installed Optimus Manager, run that sudo systemctl enable Optimus Manager command. That's key to getting all of this to work. And of course, if you're a Manjaro KDE user, remember to sudo vim etsy scdm.conf and remember to comment out these two lines. Make sure there's a little hashtag or number symbols or pound signs before the display command and display stop command things because Manjaro messes with this kind of stuff. You don't have to do this on Arch, but this isn't an Arch tutorial. So yeah, I hope you enjoyed my video on all of this stuff. And I guess goodbye.