You are not logged in.

#1 2016-06-12 21:04:08

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

Best way to load a module AFTER X loads

UPDATE: See my second post for the updated solution once again using bbswitch only this time not crashing.  I still may need to find a decent way to automate it unless I can get it to auto load and not barf on X login.

Ok Ok hear me out here.  I know this is not ideal and very hacky, but it is the only solution I have currently to disable my discrete GPU and greatly increase my battery life on my MSI GS40 hybrid graphics laptop.

So I found that I can load only the graphics drivers from the PRIME wiki page.  In my case: xf86-video-nouveau AND xf86-video-intel.  Then I also install mesa and mesa-libgl as per the Intel Graphics wiki.

I then need to blacklist nvidia and nouveau with an added modprob.conf file in /etc/modprobe.d/:

blacklist nvidia
blacklist nouveau

Run a "mkinitcpio -p linux" and profit.

Then when I log into X I can disable my discrete GPU by loading the nouveau module:

sudo modprobe nouveau

It takes a few seconds but my indicator light changes and my battery life greatly increases.  I also no longer have the noisy fan every few seconds.

So my question is.  What is the best way to automate the modprobe call above after X has already started?  (if I do not blacklist nouveau it will hang on boot with no logs)


Note: I have already tried PRIME (as per the advice in the wiki linked previously), Bumblebee (bbswitch hangs X on boot), and every combination of not installing/not installing nvidia/intel graphics drivers.  I have also tried numerous other workarounds people have posted with similar issues, short of raw APCI calls.

Thanks!

Last edited by matthew_TKA (2016-06-13 22:14:38)


MSI GS40 6QE PHANTOM
Website

Offline

#2 2016-06-13 22:21:47

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

Re: Best way to load a module AFTER X loads

UPDATE

Previously I was having issues with bbswitch with bumblebee as X would hang if bbswitch was even installed. 

Apparently if I follow the installation in my previous post (install both drivers mesa, mesa-libgl and use blacklist)  I can then install bbswitch without hanging X.

I then add one line to the same file I have blacklists:

options bbswitch load_state=0 unload_state=1

Now I have a handy way to switch my GPU on and off:

OFF:

sudo modprobe bbswitch

ON:

sudo rmmod bbswitch

I think it is probably best to keep it off during my normal usage and turn it back on before I shutdown.


There is some information on this in the wiki, although I think my situation is a bit different here.  Notice I am not using Bumblebee just yet.


It would still be nice to know what would be the least intrusive way to automate this.

Last edited by matthew_TKA (2016-06-13 23:05:12)


MSI GS40 6QE PHANTOM
Website

Offline

Board footer

Powered by FluxBB