You are not logged in.

#1 2016-06-01 17:19:13

ryzion
Member
Registered: 2012-03-20
Posts: 95

[Solved] Disable nvidia gpu on MSI GS40 (skylake, maxwell)

Hi there

I'm trying to disable my Nvidia GPU completely since I don't need it on my arch installation. What I tried so far:

- disabling the GPU via acpi_call: this one works, but acpi_call freezes my system while suspending. This issue is resolved as soon as I blacklist or uninstall the module (unloading won't work)
- bumblebee: X won't start, apparently due to recent Nvidia driver changes

Tested on 4.5.4-1 and 4.7

Did anyone came across this topic and has a solution/another idea to pursue?

Last edited by ryzion (2016-06-01 22:16:36)

Offline

#2 2016-06-01 22:08:26

cmellwig
Member
Registered: 2016-06-01
Posts: 2

Re: [Solved] Disable nvidia gpu on MSI GS40 (skylake, maxwell)

The GPU needs to be turned on again before suspending the machine.

Offline

#3 2016-06-03 21:55:31

matthew_TKA
Member
From: Texas
Registered: 2016-06-02
Posts: 34
Website

Re: [Solved] Disable nvidia gpu on MSI GS40 (skylake, maxwell)

@ryzion Do you mind elaborating on the solution you chose?  I have the exact same laptop and would be interested to know. 

I have been working on writing up an Arch Linux Install doc which I will want to create a wiki page for as soon as I'm happy with the results.  I have it working pretty well installed on the nvme running i3 and a few extras but the hybrid graphics situation isn't solved yet sad.

I actually wanted to use bbswitch with bumblebee in the end, but that just freezes X on boot as you have noted.  There is no log files generated as well when this happens sad.  I even tried installing bumblebee from bumblebee-git with the same results.  I was hoping it would work as it contains this pull request:

https://github.com/Bumblebee-Project/Bumblebee/pull/762

I had found that uninstalling bbswitch fixes the freeze, but this isn't ideal for power savings.  I figured I could manually toggle the card which I assume is what you are doing now?

Thanks!

Last edited by matthew_TKA (2016-06-03 22:36:11)


MSI GS40 6QE PHANTOM
Website

Offline

#4 2016-06-03 23:06:47

cmellwig
Member
Registered: 2016-06-01
Posts: 2

Re: [Solved] Disable nvidia gpu on MSI GS40 (skylake, maxwell)

bumblebee probably won't work until version 4 is released. Just disable Nvidia Graphics via acpi_call until then. I'd be happy to share the configurations/scripts I've used:

Turn off GPU on startup:

gpu.service

[Unit]
Description=GPUOff

[Service]
Type=simple
ExecStart=/home/crm/.bin/gpu_off.sh

gpu.timer

[Unit]
Description=Disables gpu

[Timer]
# Time to wait after booting before activation
OnBootSec=20
Unit=gpu.service

[Install]
WantedBy=multi-user.target

Turn on GPU before suspend:

root-suspend.service:

[Unit]
Description=User suspend actions
Before=sleep.target

[Service]
Type=simple
ExecStart=/home/crm/.bin/gpu_on.sh
ExecStartPost=/usr/bin/sleep 1

[Install]
WantedBy=sleep.target
#+END_SRC

Turn off GPU after resume:

root-resume.service:

[Unit]
Description=User resume actions
After=suspend.target

[Service]
Type=simple
ExecStart=/home/crm/.bin/gpu_off.sh

[Install]
WantedBy=suspend.target

acpi_call scripts (you'll probably have to change m string):

gpu_on.sh:

#!/bin/bash

if lsmod | grep -q acpi_call; then

	m="\_SB.PCI0.PEG0.PEGP._ON"

	echo $m > /proc/acpi/call
	result=$(cat /proc/acpi/call)
	case "$result" in
		Error*)
			echo "failed"
			;;
		*)
			echo "works!"
			# break # try out outher methods too
			;;
	esac

else
	echo "The acpi_call module is not loaded, try running 'modprobe acpi_call' or 'insmod acpi_call.ko' as root"
	exit 1
fi

gpu_off.sh:

#!/bin/bash

if lsmod | grep -q acpi_call; then

	m="\_SB.PCI0.PEG0.PEGP._OFF"

	echo $m > /proc/acpi/call
	result=$(cat /proc/acpi/call)
	case "$result" in
		Error*)
			echo "failed"
			;;
		*)
			echo "works!"
			# break # try out outher methods too
			;;
	esac

else
	echo "The acpi_call module is not loaded, try running 'modprobe acpi_call' or 'insmod acpi_call.ko' as root"
	exit 1
fi

There are some brightness issues in linux 4.5 that will be fixed in 4.7 though.

Offline

#5 2016-06-03 23:32:30

matthew_TKA
Member
From: Texas
Registered: 2016-06-02
Posts: 34
Website

Re: [Solved] Disable nvidia gpu on MSI GS40 (skylake, maxwell)

Thanks @cmellwig for the speedy reply!

I'll definitely give that a try.

Just out of curiosity, are you referring to a particular source commit or just anticipating a fix in V 4?

There was a similar forum post where somebody mentioned V 4 after referencing the pull request I noted above.  I verified I was testing against that change and it didn't resolve the issue.


EDIT: Just in case someone else comes along.  The Wiki does include some information on powering down the GPU with acpi_call.  I had also ran into other posts similar to this one where people had issues due to not enabling the GPU before shutdown so I appreciate the configuration you provided @cmellwig. smile

Also note some people would advise against running the "discovery" script so do at your own risk.

Last edited by matthew_TKA (2016-06-04 00:12:06)


MSI GS40 6QE PHANTOM
Website

Offline

#6 2016-06-12 23:44:10

matthew_TKA
Member
From: Texas
Registered: 2016-06-02
Posts: 34
Website

Re: [Solved] Disable nvidia gpu on MSI GS40 (skylake, maxwell)

Just in case someone else comes here with the same issue I had.   I have found a work around for my situation for now that I describe on the first post of this thread.


MSI GS40 6QE PHANTOM
Website

Offline

Board footer

Powered by FluxBB