8

I'd like to blacklist a couple of modules, namely drm, drm_kms_helper, i2c_algo_bit and i915 to forbid my integrated Intel GPU to be used, but to use my Nvidia MXM card instead.

I inserted the following lines into /etc/modprobe.d/blacklist.conf:

blacklist i915
blacklist drm
blacklist drm_kms_helper
blacklist i2c_algo_bit

Despite the above right after rebooting my laptop and typing lsmod I can see these modules loaded.

Why does my blacklist get utterly disrespected and what can I do about it?

Jorge Castro
  • 70,934
  • 124
  • 466
  • 653
László Monda
  • 213
  • 1
  • 3
  • 8

3 Answers3

13

After modifications in /etc/modprobe, you need to run:

sudo update-initramfs -u

I would be careful with disabling drm etc. I wouldn't be surprised if the nvidia driver depends on it (check with modinfo nvidia). Also, should you have any problems with your nvidia driver, then you will have a low resolution screen which might not support the GUI login at all.

Why would you disable the iGPU? The processor is already in use so I doubt if it saves any power or resources.

Lekensteyn
  • 171,743
  • 65
  • 311
  • 401
  • I wanted to deactivate the iGPU because I use the eGPU all the time and resume from suspend doesn't work. I thought that if I can remove these modules then the iGPU won't activate upon resume and I'll be able to successfully resume my laptop. Unfortunately, even though I can successfully blacklist the modules of the iGPU I cannot make resume work. – László Monda Jul 01 '11 at 13:26
  • You should create a new question for that, please include your hardware with the exact model type if possible. – Lekensteyn Jul 01 '11 at 20:41
  • There's at least 5 blacklisting questions on here that could be answered by this. – austinmarton Jun 23 '15 at 02:14
  • @austinmarton Which one exactly? You can also flag a post for moderator attention if you feel that it is a duplicat.e – Lekensteyn Jun 23 '15 at 06:15
  • @Lekensteyn sorry I meant the other way round! Your answer above could SOLVE a number of unanswered questions about why blacklisting isn't working (that I stumbled across myself) – austinmarton Jun 24 '15 at 02:44
  • @austinmarton Oh yes, I understood that, but what I said still holds. Just flag them if you feel it is appropriate :) – Lekensteyn Jun 24 '15 at 05:28
2

In a similar situation to the OP, and heeding all of @Lekensteyn's good advice, blacklist i915 silently appeared to do nothing for me, even though lsmod said nothing was using i915, but install i915 /bin/false did the trick, causing Gnome 3 to automatically fall back to using llvmpipe.

Martin Dorey
  • 207
  • 2
  • 7
  • I actually did: `install [module] /bin/true` Not sure what the difference is to /bin/false but it worked – develCuy Aug 02 '22 at 04:00
0

None of these solutions worked on 16.04 LTS for i915.ko.

Even using module_to_blacklist.blacklist=yes or modprobe.blacklist=module_to_blacklist on the kernel commandline of grub did not work.

The (dirty) solution I found was to rename /lib/modules/4.4.0-22-generic/kernel/drivers/gpu/drm/i915/i915.ko and /usr/lib/xorg/modules/drivers/modesetting_drv.so and /usr/lib/xorg/modules/drivers/intel_drv.so

Unfortunately, external VGA screen is not recognized anymore :{

amc
  • 7,022
  • 7
  • 39
  • 51
plop
  • 29
  • 1