Problem with installing nvidia driver

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
krasimirpetrov

Re: Problem with installing nvidia driver

Post by krasimirpetrov »

This is the output:
Graphics: Card-1: Intel Device 5916 bus-ID: 00:02.0
Card-2: NVIDIA GM108M [GeForce 940MX] bus-ID: 01:00.0
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa) FAILED: nouveau
Resolution: 1920x1080@60.03hz
GLX Renderer: Mesa DRI Intel HD Graphics 620 (Kabylake GT2)
GLX Version: 3.0 Mesa 17.0.7 Direct Rendering: Yes
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Problem with installing nvidia driver

Post by roblm »

That test was successful. You are now using the Intel GPU.

Now use this command to switch back to the Nvidia GPU and log out and back in:

Code: Select all

sudo prime-select nvidia && sudo mv /etc/X11/xorg.conf.old /etc/X11/xorg.conf
When you get back to the desktop, use this command again: inxi -Gx
krasimirpetrov

Re: Problem with installing nvidia driver

Post by krasimirpetrov »

Output:
Graphics: Card-1: Intel Device 5916 bus-ID: 00:02.0
Card-2: NVIDIA GM108M [GeForce 940MX] bus-ID: 01:00.0
Display Server: X.Org 1.18.4 driver: nvidia
Resolution: 1920x1080@60.03hz
GLX Renderer: GeForce 940MX/PCIe/SSE2
GLX Version: 4.6.0 NVIDIA 390.67 Direct Rendering: Yes
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Problem with installing nvidia driver

Post by roblm »

That test was also successful. You are back to using the Nvidia GPU.

You can’t use the NVIDIA X Server Settings tool on the PRIME Profiles page to switch GPUs anymore, and you can’t use the NVIDIA Prime applet in the System Tray to switch.

To make switching GPUs easier, you can create two desktop scripts. Right click on the desktop and select Create New Document > Empty Document. The name can be INTEL. Open the file and add these lines:

Code: Select all

#!/bin/sh
sudo prime-select intel && sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.old
Click “Save” and close the file. Right click on it and select Properties > Permissions. Mark the checkbox next to “Allow executing file as program”. Click on the icon and go to /usr/share/linuxmint/mintdrivers/icons and select the intel.svg icon.

When you click on the desktop script, choose the option “Run in Terminal”. Then Logout and back in.

If you don't see that message, then open the File Manager. Click on Edit > Preferences > Behavior. Under “Executable Text Files”, mark the checkbox next to “Ask each time”.

Then create a second desktop script for switching back to the Nvidia GPU. Name it NVIDIA. Add these lines to it:

Code: Select all

#!/bin/sh
sudo prime-select nvidia && sudo mv /etc/X11/xorg.conf.old /etc/X11/xorg.conf

Click “Save” and close the file. Right click on it and select Properties > Permissions. Mark the checkbox next to “Allow executing file as program”. Click on the icon and go to /usr/share/linuxmint/mintdrivers/icons and select the nvidia.svg icon.

There is also a method to enable you to run the two scripts without typing your password each time. This is convenient for users with long passwords that need to switch GPUs often, but it involves editing another configuration file. Tell me if you want to allow that.

gpu.png
Last edited by roblm on Fri Jun 29, 2018 6:41 pm, edited 1 time in total.
krasimirpetrov

Re: Problem with installing nvidia driver

Post by krasimirpetrov »

Hey, thanks for help!
I created files and everything works!
I have one more question.
When is it necessary to switch between intel and nvidia?

And again - thanks for help! Without your help, I would not be able to deal with the problem. Thanks!
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Problem with installing nvidia driver

Post by roblm »

krasimirpetrov wrote: Fri Jun 29, 2018 4:32 pm I have one more question. When is it necessary to switch between intel and nvidia?
The Intel GPU should be used most of the time because it uses less power, so this saves battery life and there's less chance of overheating problems. Switch to the Nvidia GPU when you need more graphics processing power. This can be certain programs, video or 3D games that run slower or the picture quality is worse. Of course this will drain the battery quicker.

Also, the Nvidia GPU is needed when connecting an external monitor to an output on the laptop that is internally connected to the Nvidia GPU. If there is a VGA output, then it is usually connected to the Intel GPU, but HDMI and DisplayPort outputs are connected to the Nvidia GPU most of the time. These outputs are slowly being replaced by a single USB-C output but I don’t know what GPU it is connected to.
krasimirpetrov

Re: Problem with installing nvidia driver

Post by krasimirpetrov »

Thanks for information and help. I am very grateful to you.

I have one more problem.

When I'm sleeping the computer,when I use nvidia, and try to wake it up the screen stays black and I need to restart it to get it right.
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Problem with installing nvidia driver

Post by roblm »

krasimirpetrov wrote: Sat Jun 30, 2018 1:53 am I have one more problem. When I'm sleeping the computer,when I use nvidia, and try to wake it up the screen stays black and I need to restart it to get it right.
Other users are also reporting getting a black screen with no response after resuming from suspend, when using the Nvidia GPU. This ongoing topic in the Nvidia Linux Graphics Forum discusses it and no good solution has been found yet. Many of the users have ASUS laptops as you do. The problem affects many different Linux distros and nvidia drivers, including the 390.67 driver you’re using and is also occurring in Ubuntu 18.04, which Mint 19 is based on. Two users said the 4.17.2 kernel works. Suspend usually works when the Intel GPU is used.
https://devtalk.nvidia.com/default/topi ... gt-940mx-/

Nvidia is working on the problem because forum moderator Sandipt in post 37 says:
We are tracking this issue in internal bug 2060048

The problem has been going on for years, as seen in this older topic:
https://devtalk.nvidia.com/default/topi ... dia-370-/1

In that topic, some users reported the nvidia-381.22 driver worked.

Can you suspend and resume when using the Intel GPU?
krasimirpetrov

Re: Problem with installing nvidia driver

Post by krasimirpetrov »

When I use intel I no have problems - everything is work normally.
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Problem with installing nvidia driver

Post by roblm »

I don’t have a laptop, but I just tried suspending on my desktop PC with Cinnamon 18.3 and the nvidia-384.130 driver installed. It would not resume unless I pressed the power button and released it right away and then pressed a key several times. Try this method out with the Nvidia GPU enabled.


Also, could you edit your 10th post. I gave you the wrong command to use for the Xorg.0.log file and the entire long file was posted. Other users viewing this topic will have to scroll through a lot of lines.

Use this command in the Terminal and copy the output: cat /var/log/Xorg.0.log |egrep -i "nvidia|modeset"

In the Mint forum reply window, remove all the lines in your 10th post. Then click the </> button at the top. Press Ctrl+V to paste the lines you just copied into a code display window.
krasimirpetrov

Re: Problem with installing nvidia driver

Post by krasimirpetrov »

I edited my post. Thank you!
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Problem with installing nvidia driver

Post by roblm »

You didn’t mention if you tried the method I used to resume from suspend, from my previous post.

There should be a lot more output from using the cat /var/log/Xorg.0.log |egrep -i "nvidia|modeset" command. There are no Nvidia lines.

EDITED: I know what happened. The Nvidia GPU was not enabled when you used that command.
krasimirpetrov

Re: Problem with installing nvidia driver

Post by krasimirpetrov »

Yes, I used intel then, apologize for that.
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Problem with installing nvidia driver

Post by roblm »

Thanks for making the change. Actually it was more my fault for not reminding you to switch.

You still didn’t mention if you tried the method I used to resume from suspend.

It seems to me that if you’re using the Intel GPU most of the time, then the suspend problem would not be that inconvenient. When using the Nvidia GPU, you could just switch to the Intel GPU first before suspending. The problem is when you are in the middle of doing some work. Then logging out and back in would close all your programs. I assume you want to be able to just close the laptop lid to suspend, which would save all your desktop settings?

The methods other users have tried to solve the suspend problem are:

1. Try different video drivers. The older nvidia-381.22 driver helped some users, but it will have to be downloaded from Nvidia's website. Hopefully Nvidia will release a newer version soon that corrects the problem for all users
2. Try different kernels. I already mentioned that 2 users stated the 4.17.2 kernel worked.
3. Try a newer version of the operating system, like Mint 19, or a different edition such as MATE or Xfce or a different distro such as Ubuntu or Fedora.
3. Test different commands that affect the operation of the kernel (called kernel parameters)
4. Update the BIOS, if possible.

Before attempting any major change, be sure to back up your Mint installation with Timeshift or another program such as Clonezilla.

If you want to test methods 1 and 2, then let me know.
krasimirpetrov

Re: Problem with installing nvidia driver

Post by krasimirpetrov »

Hi.

Yesterday, I happened to have some things that totally spoiled the system and installed it directly Linux Mint 19.

In the 19th version everything went - I chose the 390 driver from the driver manager and everything worked right - I can switch between the intel and nvidia and put him to sleep without any problem, so I did not try anything.

For now everything is working properly and I am very happy that I actually have a working Linux system. Now I'm just getting used to it.

Thanks for help! Cheers!
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Problem with installing nvidia driver

Post by roblm »

I didn’t more strongly recommend trying to use Mint 19 because it’s based on Ubuntu 18.04. With Mint 19, the method to change GPUs has changed. Other users are saying the newer method is not working as well. This topic in the Nvidia Linux Graphics forum discusses that:
https://devtalk.nvidia.com/default/topi ... -solution/

The gpu-manager no longer creates the xorg.conf file. It’s now slower to switch GPUs and a reboot is needed, instead of logging out and back in. Other reported problems are suspend not working and the battery drains faster. The author of that topic reports he has a workaround.

When you switch GPUs, is it slower now and is rebooting required?
krasimirpetrov

Re: Problem with installing nvidia driver

Post by krasimirpetrov »

Yes, really switching is a bit slower - it takes about 30-40 seconds, at least for me and require restart.
And yes - when I use the nvidia continue to be unable to wake up - a black screen and require reboot.

How can I handle this problem? I also tried with a 396 driver - without success.
Locked

Return to “Graphics Cards & Monitors”