NVIDIA driver and "suspend session" problem [LM 19]

Screen resolution, 3D Acceleration, nVidia, ATI
Forum rules
Before you post please read this
zangetsu
Level 1
Level 1
Posts: 35
Joined: Thu Nov 24, 2016 6:12 am
Location: Turin, Italy

NVIDIA driver and "suspend session" problem [LM 19]

Post by zangetsu » Mon Aug 20, 2018 5:27 am

I am on LM 19 XFCE edition. I start by saying that with the same laptop but with LM 18 KDE edition I never had this problem:
My laptop has got a NVIDIA 920M GPU in "Driver Manager" I found and installed nvidia-driver-390 version 390.48-0ubuntu3. Installation and reboot went fine and all nvidia stuffs were installed.
From NVIDIA settings app I switched to intel GPU and even this went fine.

The only big problem I found is that after I suspend the session, the session cannot be restored because:
  • With intel GPU:
    appear a fast series of error messages that are hard to read because are too fast but I read something like this fifo: nouveau ERROR 20[] and I am unable to do something
  • With NVIDIA GPU:
    monitor remains black and I am unable to do something
In both cases I have to turn off the laptop by pressing the power button :|

The problem does not occur If I switch back to xserver-xorg-video-nouveau GPU driver...
I have the last 4.15 kernel version and I experienced the problem with all 4.15 kernel versions.

What should I do? :?: LM 19 release notes talks only about boot problem with NVIDIA GPU but this is another kind of problem.
Last edited by zangetsu on Mon Aug 27, 2018 3:19 pm, edited 1 time in total.

User avatar
Pjotr
Level 20
Level 20
Posts: 10775
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: NVIDIA driver and "suspend session" problem [LM 19 XFCE]

Post by Pjotr » Mon Aug 20, 2018 5:58 am

Please generate an overview of your system like this:
- Launch a terminal window (this is how to launch a terminal window);
- make the terminal window full screen, to avoid chopped lines;
- Copy/paste this command into the terminal:

Code: Select all

inxi -Fxz
(if you type: the letter F is a capital letter)

Press Enter.

Copy/paste the output in your next message.
Tip: 10 things to do after installing Linux Mint 19 Tara
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

zangetsu
Level 1
Level 1
Posts: 35
Joined: Thu Nov 24, 2016 6:12 am
Location: Turin, Italy

Re: NVIDIA driver and "suspend session" problem [LM 19 XFCE]

Post by zangetsu » Mon Aug 20, 2018 6:20 am

Here is my system overview :)

Code: Select all

System:    Host: ninosanta-X555UJ Kernel: 4.15.0-32-generic x86_64 bits: 64 gcc: 7.3.0
           Desktop: Xfce 4.12.3 (Gtk 2.24.31) Distro: Linux Mint 19 Tara
Machine:   Device: laptop System: ASUSTeK product: X555UJ v: 1.0 serial: N/A
           Mobo: ASUSTeK model: X555UJ v: 1.0 serial: N/A
           UEFI: American Megatrends v: X555UJ.203 date: 09/04/2015
Battery    BAT0: charge: 11.6 Wh 58.4% condition: 19.9/37.3 Wh (53%) model: ASUSTeK ASUS status: Charging
CPU:       Dual core Intel Core i7-6500U (-MT-MCP-) arch: Skylake rev.3 cache: 4096 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 10368
           clock speeds: max: 3100 MHz 1: 500 MHz 2: 500 MHz 3: 500 MHz 4: 500 MHz
Graphics:  Card-1: Intel HD Graphics 520 bus-ID: 00:02.0
           Card-2: NVIDIA GK208M [GeForce 920M] bus-ID: 01:00.0
           Display Server: x11 (X.Org 1.19.6 ) drivers: modesetting (unloaded: fbdev,vesa)
           Resolution: 1920x1080@60.00hz
           OpenGL: renderer: Mesa DRI Intel HD Graphics 520 (Skylake GT2)
           version: 4.5 Mesa 18.0.5 Direct Render: Yes
Audio:     Card Intel Sunrise Point-LP HD Audio driver: snd_hda_intel bus-ID: 00:1f.3
           Sound: Advanced Linux Sound Architecture v: k4.15.0-32-generic
Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: d000 bus-ID: 02:00.0
           IF: enp2s0 state: down mac: <filter>
           Card-2: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter driver: ath9k bus-ID: 03:00.0
           IF: wlp3s0 state: up mac: <filter>
Drives:    HDD Total Size: 1000.2GB (13.9% used)
           ID-1: /dev/sda model: ST1000LM024_HN size: 1000.2GB
Partition: ID-1: / size: 916G used: 130G (15%) fs: ext4 dev: /dev/sda2
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 40.0C mobo: N/A
           Fan Speeds (in rpm): cpu: 2500
Info:      Processes: 280 Uptime: 1:52 Memory: 1142.9/7876.1MB Init: systemd runlevel: 5 Gcc sys: 7.3.0
           Client: Shell (bash 4.4.191) inxi: 2.3.56 

User avatar
roblm
Level 9
Level 9
Posts: 2657
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA driver and "suspend session" problem [LM 19 XFCE]

Post by roblm » Mon Aug 20, 2018 2:03 pm

The suspend problem on laptops with Optimus technology, when the Nvidia GPU is enabled, has not been solved. This topic in the Nvidia Linux Graphics forum discusses that issue and has been going on for over a year:
https://devtalk.nvidia.com/default/topi ... t-940mx-/1

Some of the moderators on that forum are directly involved in the development of new Nvidia drivers. Asus laptops are mostly affected. After a long investigation, the conclusion by one of the moderators on page 7 says:
We have investigated this issue and found this is System BIOS bug.


So unless Asus releases a BIOS update that addresses this problem, you’re stuck with trying to use a workaround method.

Here is what you can try:

1. The easiest solution is to go back to Mint 18 KDE.

2. If you don’t need to use the Nvidia GPU, then don’t install the Nvidia driver and just use the Intel GPU.

3. If you sometimes need to use the Nvidia GPU, then try using bumblebee instead of nvidia-prime. This is the most difficult method but I can give you instructions if you want to test that method. It worked when I tested it. You lose some performance but gain a longer battery life and less chance for overheating.

4. When the Nvidia GPU is enabled and you want to suspend, then you will need to switch to the Intel GPU first and use a workaround that I’ve found but I don’t know if it will work on your laptop. You will need to use this command and post the output, with the Intel GPU selected: xed /etc/default/grub

poncho524
Level 1
Level 1
Posts: 6
Joined: Fri Aug 03, 2018 1:04 pm

Re: NVIDIA driver and "suspend session" problem [LM 19 XFCE]

Post by poncho524 » Thu Aug 23, 2018 7:24 pm

I have the same problem on a Dell Precision with the Intel/Nvidia setup.
I went back to LM 18.3. Seems like kernel 4.15 breaks something, or possibly exposes a problem in Nvidia drivers.

So its not just ASUS.

zangetsu
Level 1
Level 1
Posts: 35
Joined: Thu Nov 24, 2016 6:12 am
Location: Turin, Italy

Re: NVIDIA driver and "suspend session" problem [LM 19 XFCE]

Post by zangetsu » Sat Aug 25, 2018 12:50 pm

roblm wrote:
Mon Aug 20, 2018 2:03 pm
The suspend problem on laptops with Optimus technology, when the Nvidia GPU is enabled, has not been solved. This topic in the Nvidia Linux Graphics forum discusses that issue and has been going on for over a year:
https://devtalk.nvidia.com/default/topi ... t-940mx-/1

Some of the moderators on that forum are directly involved in the development of new Nvidia drivers. Asus laptops are mostly affected. After a long investigation, the conclusion by one of the moderators on page 7 says:
We have investigated this issue and found this is System BIOS bug.


So unless Asus releases a BIOS update that addresses this problem, you’re stuck with trying to use a workaround method.

Here is what you can try:

1. The easiest solution is to go back to Mint 18 KDE.

2. If you don’t need to use the Nvidia GPU, then don’t install the Nvidia driver and just use the Intel GPU.

3. If you sometimes need to use the Nvidia GPU, then try using bumblebee instead of nvidia-prime. This is the most difficult method but I can give you instructions if you want to test that method. It worked when I tested it. You lose some performance but gain a longer battery life and less chance for overheating.

4. When the Nvidia GPU is enabled and you want to suspend, then you will need to switch to the Intel GPU first and use a workaround that I’ve found but I don’t know if it will work on your laptop. You will need to use this command and post the output, with the Intel GPU selected: xed /etc/default/grub
For the moment I don't really need to use Nvidia GPU so, the 2nd solution could be okay. What makes me doubts it's the fact that after I switched back to the nouveau driver there is still the tray icon with "Intel" written on it and if I click on it Nvidia X Server Settings' window will open. However, what did I do with all those switches from one to another GPU/driver? Some mess? Is it right? Am I using Intel GPU with nouveau? Is there something useless that am I using? Is there something else -maybe that was installed with Nvidia driver- that I need to remove that apt did not removed?

Secondly, why on LM 18 was everything good if BIOS was the same? With futures Kernel updates will there be any hope?

Thirdly, here is /etc/default/grub content:

Code: Select all

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.runpm=0"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
poncho524 wrote:
Thu Aug 23, 2018 7:24 pm
I have the same problem on a Dell Precision with the Intel/Nvidia setup.
I went back to LM 18.3. Seems like kernel 4.15 breaks something, or possibly exposes a problem in Nvidia drivers.

So its not just ASUS.
Do you thinks that will futures kernel updates fix the problem?

User avatar
roblm
Level 9
Level 9
Posts: 2657
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA driver and "suspend session" problem [LM 19 XFCE]

Post by roblm » Sat Aug 25, 2018 2:43 pm

zangetsu wrote:
Sat Aug 25, 2018 12:50 pm
For the moment I don't really need to use Nvidia GPU so, the 2nd solution could be okay. What makes me doubts it's the fact that after I switched back to the nouveau driver there is still the tray icon with "Intel" written on it and if I click on it Nvidia X Server Settings' window will open.
If Nvidia Settings looks like the picture below, with most of the categories removed, then that’s normal with no Nvidia driver installed:

prime-profiles-empty.png

zangetsu wrote:
Sat Aug 25, 2018 12:50 pm
Secondly, why on LM 18 was everything good if BIOS was the same? With futures Kernel updates will there be any hope?
I know, it doesn’t make sense. Yes, it’s possible a future kernel update could solve the problem.


If you want to test the 4rth option, then reinstall the Nvidia driver. The nouveau kernel module will need to be disabled. Use this command to rename nouveau.ko to nouveau.koxxx

Code: Select all

sudo mv /lib/modules/`uname -r`/kernel/drivers/gpu/drm/nouveau/nouveau.ko /lib/modules/`uname -r`/kernel/drivers/gpu/drm/nouveau/nouveau.koxxx
To reverse:

Code: Select all

sudo mv /lib/modules/`uname -r`/kernel/drivers/gpu/drm/nouveau/nouveau.koxxx /lib/modules/`uname -r`/kernel/drivers/gpu/drm/nouveau/nouveau.ko
Suspend will only work with the Intel GPU selected.

zangetsu
Level 1
Level 1
Posts: 35
Joined: Thu Nov 24, 2016 6:12 am
Location: Turin, Italy

Re: NVIDIA driver and "suspend session" problem [LM 19 XFCE]

Post by zangetsu » Sat Aug 25, 2018 3:30 pm

roblm wrote:
Sat Aug 25, 2018 2:43 pm
If Nvidia Settings looks like the picture below, with most of the categories removed, then that’s normal with no Nvidia driver installed:


prime-profiles-empty.png
Thanks. It looks exactly like that :D
roblm wrote:
Sat Aug 25, 2018 2:43 pm
If you want to test the 4rth option, then reinstall the Nvidia driver. The nouveau kernel module will need to be disabled. Rename nouveau.ko to nouveau.koxxx

Suspend will only work with the Intel GPU selected.
I have only a doubt...let me see if I understood: with the 4rth option, the nouveau kernel module need to be disabled exploiting the rename stuff for all the time that I will use Nvidia driver and it will need to be enabled only when I will chose to come back to nouveau driver. Is it correct?

User avatar
roblm
Level 9
Level 9
Posts: 2657
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA driver and "suspend session" problem [LM 19 XFCE]

Post by roblm » Sat Aug 25, 2018 3:34 pm

zangetsu wrote:
Sat Aug 25, 2018 3:30 pm
I have only a doubt...let me see if I understood: with the 4rth option, the nouveau kernel module need to be disabled exploiting the rename stuff for all the time that I will use Nvidia driver and it will need to be enabled only when I will chose to come back to nouveau driver. Is it correct?
Yes.

User avatar
Arch_Enemy
Level 6
Level 6
Posts: 1150
Joined: Tue Apr 26, 2016 3:28 pm

Re: NVIDIA driver and "suspend session" problem [LM 19 XFCE]

Post by Arch_Enemy » Sat Aug 25, 2018 3:45 pm

If you look at the bug reports, the 4.15.x series doesn't play well with the nVidia driver, particularly with Mint 19. I haven't had much of a problem with it except sometimes stuttering video clips and slow booting (also a problem with 4.15), but overall the video performance is acceptable.

You probably have to drop to an earlier kernel to get the nVidia stuff to work, or remove it and use Nouveau. The only problem is you give up some acceleration, but if it's causing other issues it may be the best route.
I have travelled 35629424162.9 miles in my lifetime

One thing I would suggest, create a partition a ~28G partition as /. Partition the rest as /Home.
When the system fails, reinstall and use the exact same username and all your 'stuff' comes back to you.

maccabbeo
Level 1
Level 1
Posts: 28
Joined: Fri May 24, 2013 3:32 am

Re: NVIDIA driver and "suspend session" problem [LM 19 XFCE]

Post by maccabbeo » Sun Aug 26, 2018 4:24 am

Hi to all.

I have the same issues on my ASUS VivoBook S after recently installed Mint 19: I'm not able to resume after suspend. I had no issues on Mint 18.

So, I'm following this thread in order to be updated in case there's some update announcing any solution.

Here it is some info regarding my system.

EDIT: switching to Intel drivers makes the suspend function work like a charm.

Thanks,
Regards.

Code: Select all

inxi -Fxz
System:    Host: mano-X510UNR Kernel: 4.15.0-33-generic x86_64 bits: 64 gcc: 7.3.0
           Desktop: MATE 1.20.1 (Gtk 3.22.30-1ubuntu1) Distro: Linux Mint 19 Tara
Machine:   Device: laptop System: ASUSTeK product: X510UNR v: 1.0 serial: N/A
           Mobo: ASUSTeK model: X510UNR v: 1.0 serial: N/A
           UEFI: American Megatrends v: X510UNR.301 date: 09/25/2017
Battery    BAT0: charge: 25.6 Wh 68.9% condition: 37.2/42.1 Wh (88%) model: ASUSTeK ASUS status: Discharging
CPU:       Quad core Intel Core i7-8550U (-MT-MCP-) arch: Kaby Lake rev.10 cache: 8192 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 15936
           clock speeds: max: 4000 MHz 1: 799 MHz 2: 801 MHz 3: 807 MHz 4: 802 MHz 5: 807 MHz 6: 804 MHz
           7: 804 MHz 8: 906 MHz
Graphics:  Card-1: Intel UHD Graphics 620 bus-ID: 00:02.0
           Card-2: NVIDIA GP108M [GeForce MX150] bus-ID: 01:00.0
           Display Server: x11 (X.Org 1.19.6 ) drivers: modesetting,nvidia (unloaded: fbdev,vesa,nouveau)
           Resolution: 1920x1080@60.03hz
           OpenGL: renderer: GeForce MX150/PCIe/SSE2 version: 4.6.0 NVIDIA 390.48 Direct Render: Yes
Audio:     Card Intel Sunrise Point-LP HD Audio driver: snd_hda_intel bus-ID: 00:1f.3
           Sound: Advanced Linux Sound Architecture v: k4.15.0-33-generic
Network:   Card: Intel Wireless 8265 / 8275 driver: iwlwifi bus-ID: 02:00.0
           IF: wlp2s0 state: up mac: <filter>
Drives:    HDD Total Size: 1000.2GB (10.1% used)
           ID-1: /dev/sda model: TOSHIBA_MQ04ABF1 size: 1000.2GB
Partition: ID-1: / size: 633G used: 87G (15%) fs: ext4 dev: /dev/sda5
           ID-2: swap-1 size: 8.47GB used: 0.00GB (0%) fs: swap dev: /dev/sda6
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 50.0C mobo: N/A gpu: 0.0:53C
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 226 Uptime: 36 min Memory: 1977.7/7859.1MB Init: systemd runlevel: 5 Gcc sys: 7.3.0
           Client: Shell (bash 4.4.191) inxi: 2.3.56 

zangetsu
Level 1
Level 1
Posts: 35
Joined: Thu Nov 24, 2016 6:12 am
Location: Turin, Italy

Re: NVIDIA driver and "suspend session" problem [LM 19 XFCE]

Post by zangetsu » Mon Aug 27, 2018 3:18 pm

maccabbeo wrote:
Sun Aug 26, 2018 4:24 am
EDIT: switching to Intel drivers makes the suspend function work like a charm.
Even if do you install Nvidia driver? Or when are you under nouveau driver? Because in the first case I can't freely suspend and happens what I said in the OP... Instead, in the second case I am okay too.

User avatar
roblm
Level 9
Level 9
Posts: 2657
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA driver and "suspend session" problem [LM 19]

Post by roblm » Mon Aug 27, 2018 3:29 pm

zangetsu,

I just want to make sure there is no confusion. With option 4, you can still install the Nvidia driver and switch to the Nvidia GPU whenever there is a need for more graphics processing power, for example, in more graphics intensive games. However, if you want to suspend, then you will need to switch to the Intel GPU, reboot and then suspend.

zangetsu
Level 1
Level 1
Posts: 35
Joined: Thu Nov 24, 2016 6:12 am
Location: Turin, Italy

Re: NVIDIA driver and "suspend session" problem [LM 19]

Post by zangetsu » Mon Aug 27, 2018 4:37 pm

roblm wrote:
Mon Aug 27, 2018 3:29 pm
zangetsu,

I just want to make sure there is no confusion. With option 4, you can still install the Nvidia driver and switch to the Nvidia GPU whenever there is a need for more graphics processing power, for example, in more graphics intensive games. However, if you want to suspend, then you will need to switch to the Intel GPU, reboot and then suspend.
Yes, roblm, I have understood that and in the next days I will test it :D thanks for the help! @maccabbeo's post made me curious because I would like to know whether he need to disable nouveau kernel module or not before he puts his laptop to suspend with the Intel GPU i.e. whether is he using the 4th option or not?

maccabbeo
Level 1
Level 1
Posts: 28
Joined: Fri May 24, 2013 3:32 am

Re: NVIDIA driver and "suspend session" problem [LM 19 XFCE]

Post by maccabbeo » Tue Aug 28, 2018 2:59 am

zangetsu wrote:
Mon Aug 27, 2018 3:18 pm
Even if do you install Nvidia driver? Or when are you under nouveau driver? Because in the first case I can't freely suspend and happens what I said in the OP... Instead, in the second case I am okay too.
I've just switched to Intel driver from the Nvidia server settings GUI (I mean the one on the panel, just next to the battery and clock icons). No need to change other settings or remove modules... just switched from there.

zangetsu
Level 1
Level 1
Posts: 35
Joined: Thu Nov 24, 2016 6:12 am
Location: Turin, Italy

Re: NVIDIA driver and "suspend session" problem [LM 19]

Post by zangetsu » Tue Aug 28, 2018 6:42 am

zangetsu wrote:
Mon Aug 27, 2018 4:37 pm
[...] In the next days I will test it :D [...]
@roblm, thank you for the help. I just tested your fix and It works very well! :D
A simple question: what if, in future, will I update the kernel? Will the new kernel require the deactivation of Nouveau module?
maccabbeo wrote:
Tue Aug 28, 2018 2:59 am
I've just switched to Intel driver from the Nvidia server settings GUI (I mean the one on the panel, just next to the battery and clock icons). No need to change other settings or remove modules... just switched from there.
You're a lucky guy! :lol:

User avatar
roblm
Level 9
Level 9
Posts: 2657
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA driver and "suspend session" problem [LM 19]

Post by roblm » Tue Aug 28, 2018 8:09 am

zangetsu wrote:
Tue Aug 28, 2018 6:42 am
A simple question: what if, in future, will I update the kernel? Will the new kernel require the deactivation of Nouveau module?
You should enable nouveau.ko before installing any new kernel, to test if suspend now works. Be sure to reboot after disabling or enabling nouveau.ko.


One thing I would check is how power management is affected with nouveau.ko disabled. I suggest installing powertop with the command sudo apt install powertop
The laptop should be running on battery, not AC power. Start the program with the command sudo powertop
Wait about 1 minute for a steady reading at idle and check the battery discharge rate. This should be checked with nouveau.ko enabled and disabled.

My results from testing were 15 watts battery discharge rate in Intel Mode at idle. I was using a wired internet connection, so wireless was turned off, the keyboard backlight was off, the screen brightness was at 75% and no other programs running.

After disabling nouveau.ko, there was a 13 W battery discharge rate. After using some commands to power off the Nvidia card completely, the discharge rate dropped to as low as 5.7 W, but mostly at 7. This is comparable to the results you would get using bumblebee.

This bug report deals with problems with power management users have reported with Ubuntu 18.04, which Mint 19 is based on:
https://bugs.launchpad.net/ubuntu/+sour ... ug/1765363

The author of that topic reports over 20 W power consumption.

zangetsu
Level 1
Level 1
Posts: 35
Joined: Thu Nov 24, 2016 6:12 am
Location: Turin, Italy

Re: NVIDIA driver and "suspend session" problem [LM 19]

Post by zangetsu » Thu Aug 30, 2018 5:50 am

roblm wrote:
Tue Aug 28, 2018 8:09 am
You should enable nouveau.ko before installing any new kernel, to test if suspend now works. Be sure to reboot after disabling or enabling nouveau.ko.
Thanks
roblm wrote:
Tue Aug 28, 2018 8:09 am
One thing I would check is how power management is affected with nouveau.ko disabled. I suggest installing powertop with the command sudo apt install powertop
The laptop should be running on battery, not AC power. Start the program with the command sudo powertop
Wait about 1 minute for a steady reading at idle and check the battery discharge rate. This should be checked with nouveau.ko enabled and disabled.

My results from testing were 15 watts battery discharge rate in Intel Mode at idle. I was using a wired internet connection, so wireless was turned off, the keyboard backlight was off, the screen brightness was at 75% and no other programs running.

After disabling nouveau.ko, there was a 13 W battery discharge rate.
Wi-Fi connected, 20% brightness, no other programs running. My discharge rates are:
  • 9.93W with nouveau.ko enabled
  • 9.33W with nouveau.ko disabled
roblm wrote:
Tue Aug 28, 2018 8:09 am
After using some commands to power off the Nvidia card completely, the discharge rate dropped to as low as 5.7 W, but mostly at 7. This is comparable to the results you would get using bumblebee.
May I know which these commands are? Because I noticed that on my laptop LM 19 causes a bigger battery drain than LM18

roblm wrote:
Tue Aug 28, 2018 8:09 am
This bug report deals with problems with power management users have reported with Ubuntu 18.04, which Mint 19 is based on:
https://bugs.launchpad.net/ubuntu/+sour ... ug/1765363

The author of that topic reports over 20 W power consumption.
I am safe, for the moment...I hope

User avatar
roblm
Level 9
Level 9
Posts: 2657
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA driver and "suspend session" problem [LM 19]

Post by roblm » Thu Aug 30, 2018 8:03 pm

zangetsu wrote:
Thu Aug 30, 2018 5:50 am
May I know which these commands are? Because I noticed that on my laptop LM 19 causes a bigger battery drain than LM18
You will need to install bbswitch-dkms first; bbswitch is a kernel module used to power on and off the Nvidia card on Optimus systems. It was automatically installed with nvidia-prime on previous versions of Mint. Use the command
sudo apt install bbswitch-dkms

Then use these commands to enable bbswitch and turn off the Nvidia card:
sudo modprobe bbswitch && sudo tee /proc/acpi/bbswitch <<<OFF

Check the battery discharge rate using powertop.


If that works, then create a script named .nvidia-off in HOME by right clicking in the empty space and selecting Create Document > Empty File (the dot makes it a hidden file). Add these lines:

Code: Select all

#!/bin/sh
modprobe bbswitch && echo "OFF" > /proc/acpi/bbswitch
Right click on the script and select Properties > Permissions and mark the checkbox next to Allow this file to run as a program.


Create a desktop launcher by right clicking on the desktop and selecting Create launcher. The name can be NVIDIA OFF. For the Command, type: sudo sh /home/your-user-name/.nvidia-off. Mark the checkbox next to Run in Terminal. If you want the Nvidia icon, then click on the icon and go to /user/share/icons/Mint-X/apps/48 and select nvidia-settings.png.

Right click on the launcher and select Properties > Permissions and mark the checkbox next to Allow this file to run as a program.
Last edited by roblm on Sat Sep 01, 2018 3:54 pm, edited 2 times in total.

zangetsu
Level 1
Level 1
Posts: 35
Joined: Thu Nov 24, 2016 6:12 am
Location: Turin, Italy

Re: NVIDIA driver and "suspend session" problem [LM 19]

Post by zangetsu » Fri Aug 31, 2018 10:32 am

Very helpful and detailed instructions, thank you. After those commands the battery discharge rate dropped down to about 7W :D

I'd like to suggest for the previous post to edit the command string sudo sh /home/yourUsername/.nvidia-off and substitute it with sudo sh ~/.nvidia-off because some forum user in future could be do a simple cut and paste of that and surely they will have a different username

Last thing, at least for a while :lol:
-After having disabled it, what if do I want to enable again nvidia card without a system reboot? Will something like modprobe bbswitch && echo "ON" > /proc/acpi/bbswitch work? :?:

Post Reply

Return to “Graphics Cards & Monitors”