[SOLVED] How blacklist i915?

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[SOLVED] How blacklist i915?

Postby ncarver » Mar 16th, '18, 17:15

My desktop machine is running MGA5 and has both onboard Intel graphics + a separate Nvidia card. Due to issues with Nvidia driver I switched to nouveau and it had been working well. However, I wanted to see if I could instead just use the onboard Intel graphics. Problem is my older monitor has only DVI-D connectors and machine has only DP and HDMI connectors for the onboard. So bought Amazon cable for DP -> DVI, and used MCC to switch to intel driver. Unfortunately, all I saw from intel onboard was a screen full of many vertical colored lines. This is probably a cable issue, which I will investigate further via other equipment at work next week.

Anyway, so switched back to using nouveau, but now screen blanks at boot until DM appears. This did not happen prior to playing with intel driver via MCC. A bit of investigation suggests that this is due to i915 module loading and KMS. I see that i915 is now being loaded even though I am using nouveau. I am quite sure this was not happening prior to my experimentation with the intel graphics, but I cannot find any changes that MCC made that would now be causing i915 to load. So I tried to blacklist i915 by adding a blacklist-i915.conf file to /etc/modprobe.d. No change. Screen still blanks until DM and i915 is being loaded.

So my question is: how can I prevent i915 from being loaded? Also, any idea why it is now loading when it wasn't before I used MCC to test the intel driver?

Thanks in advance for any assistance of course!

Let me add that the reason I am fairly certain i915 was not loading previously is that I have a script to print out X info, and part of it uses lspci to look at graphics devices and their drivers. I had never seen the Intel card listed with drivers before, but now I see drivers listed for both cards, via following code:
Code: Select all
$ lspci -ks 00:02.0                                                                                                                                                                                                                                                                     
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)                                                                                                                                                                                                             
        Subsystem: Dell Device 06b9                                                                                                                                                                                                                                                       
        Kernel driver in use: i915                                                                                                                                                                                                                                                       
        Kernel modules: i915                                                                                                                                                                                                                                                             
$ lspci -ks 01:00.0                                                                                                                                                                                                                                                                     
01:00.0 VGA compatible controller: NVIDIA Corporation GM107 [GeForce GTX 745] (rev a2)                                                                                                                                                                                                   
        Subsystem: NVIDIA Corporation Device 1065                                                                                                                                                                                                                                         
        Kernel driver in use: nouveau                                                                                                                                                                                                                                                     
        Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia_current                                                                                                                                                                                                                     
Last edited by ncarver on Mar 19th, '18, 05:00, edited 1 time in total.
ncarver
 
Posts: 21
Joined: May 25th, '11, 18:23

Re: How blacklist i915?

Postby ncarver » Mar 19th, '18, 04:58

Did more research and it is likely that dracut scripts are responsible for loading the i915 driver. However, seem to not be having corruption and other graphics issues when using nourveau with latest MGA5 kernel, even with i915 kernel module being loaded. Continue to have extended black screen at boot instead of splash screen, but at least now I know what is going on. So at this point I will just leave as is I guess.

For those who might encounter this same or similar issue, here is what I found: Blacklisting i915 didn't work and searches showed others with similar experience, with suggestions that i915 was in initrd. lsinitrd did not list i915, however, but reading more about dracut I found that it uses a bunch of scripts to load modules. Found directory /usr/lib/dracut/modules.d/50drm and looked at its script. Making a few assumptions about the script setup, it appears to loop through every kernel module under drivers/gpu/drm subdirectory and "if the hardware is present, include module even if it is not currently loaded." Manually testing the hardware testing code with i915, it indeed matches the Intel graphics hardware in my computer. If dracut is doing the loading, what could be done if you wanted to stop i915 from loading? The most common search suggestion I found was to delete the i915.ko files, but that should not be necessary. dracut has the ability for you to blacklist drivers by adding a line like omit_drivers+=" i915 " to an appropriate dracut .conf file.
ncarver
 
Posts: 21
Joined: May 25th, '11, 18:23

Re: How blacklist i915?

Postby doktor5000 » Mar 19th, '18, 20:38

ncarver wrote:If dracut is doing the loading, what could be done if you wanted to stop i915 from loading? The most common search suggestion I found was to delete the i915.ko files, but that should not be necessary. dracut has the ability for you to blacklist drivers by adding a line like omit_drivers+=" i915 " to an appropriate dracut .conf file.


Well, you could simply use a kernel boot option to influence the initrd behaviour, as also documented in the errata (well at least it was present in previous erratae, but in the one for mga6) or at e.g. https://wiki.mageia.org/en/How_to_set_up_kernel_options
or e.g. in the manpage for dracut.cmdline

In your case that would be rd.blacklist=i915 - this does not require to rebuild the initrd and can also be set up permanently as a boot option.

Apart from that, when you asked for blacklisting, there are two important things to note:

- difference between blacklisting something in the initrd or blacklisting something for the normal system (after pivotroot from initrd to normal system happened)
- difference between blacklisting and preventing modules to load at all - blacklisting only prevents the automatic load of a module during boot, if some script or e.g. you yourself run "modprobe modulename" later on this is not prevented
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [SOLVED] How blacklist i915?

Postby ncarver » Mar 22nd, '18, 05:12

Thank you very much for the additional information. I found that the kernel option rd.blacklist is mentioned in the dracut man page as well as the link you gave (though the man page says it is rd.blacklist but then gives an example using rd.driver.blacklist).

It turns out that I was correct that I was having graphics performance problems when trying to use nouveau with the nvidia graphics card now, though I don't understand why, given that it was working fine a week ago (before I experimented with changing to the onboard graphics and then changing back). It seems that something must not have gotten changed back properly, but I couldn't find anything. Anyway, I found computer's firmware allowed me to disable onboard intel graphics--which I did--and that appears to have fixed the nouveau problems (I hope). I also see that i915 driver still gets loaded, even though lspci doesn't even list the intel graphics anymore.
ncarver
 
Posts: 21
Joined: May 25th, '11, 18:23


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest

cron