WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: xf86-video-nouveau.tcz -> missing nouveau.ko module  (Read 22574 times)

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11628
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #30 on: November 09, 2019, 02:43:14 PM »
Hi madmax
I think I figured out the  Unknown symbol drm_legacy_mmap  issue.

Short answer:
Follow Juanitos directions. Then, when you run  make menuconfig , go to  Device Drivers->Graphics support->Nouveau (NVIDIA) cards.
Select  m , then save and exit. Then run  make .  When  make  finishes (several hours) you need to replace your kernel (32 or 64 bit)
with the one that was just built (arch/x86/boot/bzImage  or  arch/ia64/boot/bzImage).

Long answer:
When you enable  Device Drivers->Graphics support->Nouveau (NVIDIA) cards , it adds  CONFIG_DRM_VM=y  to the kernel config
file. This enables  drm_vm.c  to be compiled so the  drm_legacy_mmap  symbol can be resolved.  CONFIG_DRM_VM  is listed as
a  bool  (y or n) which means it can't be compiled as a module. It has to be compiled into the kernel. Since it's not compiled into
your kernel, the  nouveau  driver can't be loaded.

CONFIG_DRM_LEGACY  is not required.

Offline madmax

  • Jr. Member
  • **
  • Posts: 98
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #31 on: November 10, 2019, 03:43:33 PM »
Hello Rich:

Sorry for the delay, I was waiting for your post before replying to Juanito and Curaga at the same time.

Since I don't have the hardware to test, I suggest you compile the kernel yourself ...
...and once you can compile the kernel, you can also compile the Nvidia drivers, which support your card much better than nouveau.

To be honest, these are not the replies I was hoping for. ;^ )

Like I have said before, I'm not a programmer/coder nor do I have any experience in compiling anything.
My limit is/was all the *.bat files I used/clobbered together from on-line sources to use in DOS/Windows environments (long ago now) and my attempts at understanding bash/scripting unfortunately have not borne fruit. 

Hardware wise, from an early age I have been able to diagnose, disassemble and (most times) fix any IT box that has crossed my path.
Actually made a living from that when there was no work available for me as an architect.

But I digress ...

If I were knowledgeable enough to be do that ie: know how to complile an application or make something out of what a source code says, I would have long ago compiled the last version of the NVidia Legacy drivers and sent them to you so that they would be available in the repository for anyone to download.

So compiling a kernel is not something I can do but I do have the necessary legacy NVidia hardware and I have offered my help to test anything you need to test and report back with the results.

I think I figured out the  Unknown symbol drm_legacy_mmap  issue.

Thank you for taking the time to sift through the kernel configuration files from the other distributions.
I was sure the answer to the problem had to be there as the nouveau driver worked without issues in all of them and only need a screen location xorg.conf file in multiple screen setups.

Seeing that all of them had CONFIG_DRM_NOUVEAU=m and not =y or =n sort of waved a flag at me but had no idea what is was about or if it was of any importance at all.

When you enable Device Drivers->Graphics support->Nouveau (NVIDIA) cards, it adds CONFIG_DRM_VM=y to the kernel config file. This enables drm_vm.c to be compiled so the drm_legacy_mmap  symbol can be resolved. CONFIG_DRM_VM is listed as a bool (y or n) which means it can't be compiled as a module. It has to be compiled into the kernel. Since it's not compiled into your kernel, the nouveau driver can't be loaded.

CONFIG_DRM_LEGACY  is not required.
Good to know that CONFIG_DRM_LEGACY is not required for nouveau to work properly.
The prospect was rather worrying for if it was, there would have been something seriously wrong with the nouveau drivers.

Now, if (?) I understand your explanation correctly, the TC kernel needs to have Device Drivers->Graphics support->Nouveau (NVIDIA) cards set to =m so that the nouveau driver can be loaded. ie: the TC kernel has to have support for NVidia cards enabled.

If this is so, the fact that the TC kernel does not have it set to =m is the reason for the nouveau driver not loading/working properly.
ie: a driver available in the repository.

Wouldn't this be a kernel misconfiguration issue which could be corrected in a new updated version (10.2)?

Once again, thank you very much for having taken the time to address this problem.

Best regards,

MM

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11628
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #32 on: November 10, 2019, 10:11:25 PM »
Hi madmax
Now, if (?) I understand your explanation correctly, the TC kernel needs to have Device Drivers->Graphics support->Nouveau (NVIDIA) cards set to =m so that the nouveau driver can be loaded. ie: the TC kernel has to have support for NVidia cards enabled.
That's basically correct. Enabling  Nouveau  causes some code to be added to the kernel when it gets compiled.

Quote
If this is so, the fact that the TC kernel does not have it set to =m is the reason for the nouveau driver not loading/working properly.
ie: a driver available in the repository.
The current kernel was not compiled to support the  Nouveau  driver.

Quote
Wouldn't this be a kernel misconfiguration issue which could be corrected in a new updated version (10.2)?
It's not mis-configured, just not configured to support the  Nouveau  driver. Unless a serious problem is found, the kernel
doesn't get updated for a current release.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #33 on: November 10, 2019, 11:46:24 PM »
..nor do I have any experience in compiling anything.

Compiling the kernel is not difficult and the instructions have been given earlier in the thread - why not give it a go?

If you have problems, there are forum members here willing to help.

Offline madmax

  • Jr. Member
  • **
  • Posts: 98
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #34 on: November 11, 2019, 06:09:10 PM »
Hello Rich:

The current kernel was not compiled to support the Nouveau driver.
I see.

It would seem then that my starting this thread ...
http://forum.tinycorelinux.net/index.php/topic,23259.msg145735.html#msg145735
... to figure out why the nouveau driver was not working properly was rather an exercise in futility.

Just to end up here to find out that, no matter what and unless I compile the kernel myself, the Nouveau driver I downloaded from the repository would not work properly.
Ever.

Right, let me see if I understood:

1. The obvious
NVidia cards under Linux work either with the proprietary driver or with the open source Nouveau driver, albeit not as well.
Although this is a common complaint among Linux users on the web, the fact that mainstream distributions use them for their live/installation DVDs would seem to indicate that they work well enough if you are commited to using only open source drivers.   

2. The facts
The proprietary 340.XX legacy drivers are presently not available in the TC10.x repository (I prerfectly understand why this is so) but the only possible alternative (Nouveau) is not supported by the TC kernel even though the drivers are available for download from the repository.

3. The surprise
The fact that the Nouveau drivers are not supported by the TC kernel is not due to a kernel mis-configuration or an involuntary lapse but an actual decision made by the kernel maintainers.

I'd be obliged if I could get an answer to a couple of questions:
  • Why is the TC kernel not compiled to support the Nouveau driver?
    Sort of goes in the opposite direction other distributions maintain with respect to the Nouveau drivers, surely there must be very good reason for this being so.
    (Please don't tell me that different distributions make different decisions, I've already read that elsewhere.)
  • With the TC kernel not compiled to support the Nouveau driver, what sense does it make to have the Nouveau drivers available for download if they will not work properly?
    More so in the absense of any warning or indication that the drivers will not work properly, because ...

... not configured to support the Nouveau driver. Unless a serious problem is found, the kernel doesn't get updated for a current release.

You will surely undertsand why I would consider that having an open source driver in a (any) distribution's current repository which will not work properly because that distribution's current kernel is not compiled to support it would undoutedly make it into any distribution's serious problems list.
A driver problem, a kernel problem or both at the same time.

But then, maybe that's just me.
And I'm not a programmer or a kernel maintainer and my saying all this does not in any way undermine the fact that I highly value and appreciate the work you guys do for TC.

If perchance this is not considered a serious (or serious enough) problem, would it be realistic for me to expect that the TC10.2 release, whenever that comes along, will be compiled to support the open source Nouveau drivers?

Thank you very much for the clarifications you posted earlier and in advance for answering these questions.
You've been a real sport all along.  ; ^)

Best,

MM

Offline madmax

  • Jr. Member
  • **
  • Posts: 98
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #35 on: November 11, 2019, 06:19:47 PM »
Hello Juanito:
Compiling the kernel is not difficult and ...
Says the chap in charge of maintaining the kernel of a unique Linux distribution!  ;^ D !!!

... why not give it a go?
If you have problems, there are forum members here willing to help.

I know and I thank you for the encouragement and the offer.
But for this I really need an 'out of the box' or 'Bob's your uncle' solution.

I have (as surely you do also) far too many things on my plate at this time to stare down a kernel compilation rabbit-hole.
Maybe further on.

Cheers,

MM

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11628
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #36 on: November 11, 2019, 11:44:07 PM »
Hi madmax
Why is the TC kernel not compiled to support the Nouveau driver?
Sort of goes in the opposite direction other distributions maintain with respect to the Nouveau drivers, surely there must be very good reason for this being so.
(Please don't tell me that different distributions make different decisions, I've already read that elsewhere.)
I don't know the answer to that. Maybe it was deemed that  xf86-video-nv.tcz  was adequate. It did successfully detect your hardware.
Maybe Juanito or curaga will weigh in on this.

Quote
With the TC kernel not compiled to support the Nouveau driver, what sense does it make to have the Nouveau drivers available for download if they will not work properly?
More so in the absense of any warning or indication that the drivers will not work properly, because ...
That's easy. Juanito had no way of knowing the  Nouveau  driver required a kernel compilation. The  CONFIG_DRM_VM=y  option
does not show up in the configuration menu so you don't even know it exists, let alone getting set to yes.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #37 on: November 12, 2019, 12:25:01 AM »
Says the chap in charge of maintaining the kernel

In fact that's @curaga  ;)

If you confirm that you will not be recompiling the kernel (bzImage/vmlinuz), I'll delete the nouveau-KERNEL extensions since they will not work without a recompiled vmlinuz.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #38 on: November 12, 2019, 04:34:53 AM »
Nouveau is the same as the staging and experimental drivers. Anything that has a good chance of crashing your computer, losing your data, corrupting your screen and so on, must be heavily opt-in. I much prefer answering to "why is there no driver X" than to "your distro crashed my computer, I lost Y hours of writing and will tell so to everyone I know".

"Why not enable them with heavy warnings" - the newbies will not see those warnings. They will google or find on the forum to install xxx.tcz, and they will do so without reading the info file in most cases. That's why the policy is that such drivers may be contributed, but never in the official capacity. If you install for example the graphics- or scsi- extension, you will only get official kernel drivers, those that are generally considered safe, stable and usable.
The only barriers that can stop you are the ones you create yourself.

Offline madmax

  • Jr. Member
  • **
  • Posts: 98
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #39 on: November 12, 2019, 06:08:57 AM »
Hello Rich:

I don't know the answer to that.
OK, fair enough.

Maybe it was deemed that  xf86-video-nv.tcz  was adequate.
OK, maybe that was what happened.

But freedesktop.org clearly says that xf86-video-nv driver should not be used and that the nouveau driver is the correct one to use. As they are the one who wrote it I expext they have good reason to say that.

It did successfully detect your hardware.
Maybe Juanito or curaga will weigh in on this.
I'm sure that you will concurr with me that detecting the hardware is just the start of a complex path to working properly.
Something that xf86-video-nv was shown unable to do.

Juanito had no way of knowing the  Nouveau  driver required a kernel compilation. The  CONFIG_DRM_VM=y  option
does not show up in the configuration menu so you don't even know it exists, let alone getting set to yes.
OK.
What you say makes complete sense.

But we are all at a different spot now and know (thanks to your looking into it) what is needed for the nouveau driver to work properly (ie: actually load) with the TC kernel so it seems that the road is paved to an easy solution to the problem of NVidia card support in TinyCore using open source drivers.

I was more than anything looking forward to reading your answer to the last question I asked in my previous post, one which I consider the most important:

... not configured to support the Nouveau driver. Unless a serious problem is found, the kernel doesn't get updated for a current release.
If perchance this is not considered a serious (or serious enough) problem, would it be realistic for me to expect that the TC10.2 release, whenever that comes along, will be compiled to support the open source Nouveau drivers?

Thanks in advance.

Best,

MM

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11628
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #40 on: November 15, 2019, 09:59:14 AM »
Hi madmax
... not configured to support the Nouveau driver. Unless a serious problem is found, the kernel doesn't get updated for a current release.
If perchance this is not considered a serious (or serious enough) problem, would it be realistic for me to expect that the TC10.2 release, whenever that comes along, will be compiled to support the open source Nouveau drivers?
Even if a TC10.2 were released, I doubt the kernel would be recompiled for this issue.

The way I see it, If you want  Nouveau  support in the Tinycore kernel, you have 2 choices:
1. Wait for TC11 and see if curaga is willing to enable it.
2. Recompile the kernel yourself. Juanito provided instructions. People are available to answer questions. The hardest part is
    waiting for the computer to finish the compilation.


Offline madmax

  • Jr. Member
  • **
  • Posts: 98
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #41 on: November 16, 2019, 02:02:59 PM »
Hello Rich:
Even if a TC10.2 were released, I doubt the kernel would be recompiled for this issue.
I see.

... If you want  Nouveau  support in the Tinycore kernel, you have 2 choices:
Indeed, it would seem that I am the only one who wants/needs/is asking for Nouveau support in the TC kernel.
This thread is already three pages long and with over 1000 views, it's only me, you, juanito and curaga.
No other TC end users, although I have read a few posts by a couple of others in my situation.

1. Wait for TC11 and see if curaga is willing to enable it.
Well ...
It seems to me that curaga has been both succinct and clear about what he thinks about Nouveau.
Willing is not a term I'd use.  ;^ )

I have tried (and think I've succeeded) to make a case for the Nouveau drivers in TC, to the extent of pointing out the fact that Nouveau drivers are available for download but disabled in the TC kernel but to no avail.

As you may gather, I strongly disagree with his view on this matter.
But then I am not the kernel maintainer.

On one hand it rather flies in the face of what those in charge of all the other distributions I have cited would evidently opine and on the other (at least in my view) it does both open source software and Linux a disservice as it all but eliminates the possibility of anyone with older NVidia cards/hardware to be able to use TinyCore.

Lest, of course, they compile their own proprietary drivers or TC kernel to be able to load the Nouveau drivers.

2. Recompile the kernel yourself. Juanito provided instructions. People are available to answer questions.
The hardest part is waiting for the computer to finish the compilation.
Indeed.
Like I said, I really appreciate that but at the moment I have many things I have to deal with and really cannot delve into the complications of compiling a kernel at this time.

When I came upon TC a few years ago I was delighted to find a Linux distribution with this ease of use, reduced size and capacity to just start over in case of mistakes. It proved to be and still is the most important tool in I have for administering my main rig or reviving friends' old laptops/notebooks,

Most importantly, it helped me save my at the time installation (PCLinuxOS/MInt and Devuan) more than once.

I will (of course) continue to use it for what I have always used it for, just without a desktop requiring NVidia drivers for my older cards.
Will have to polish up on my command line skills.

Thanks a lot for taking the time to participate in this thread.
You've been a real sport.  ;^)

Best regards and a good week-end,

MM

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #42 on: November 17, 2019, 12:16:25 AM »
cannot delve into the complications of compiling a kernel at this time.

It takes ten minutes to set things up, 1-2 hours unattended to compile and then a couple of minutes to save the required files...

Offline hoehermann

  • Newbie
  • *
  • Posts: 7
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #43 on: February 09, 2020, 06:27:28 AM »
cannot delve into the complications of compiling a kernel at this time.
It takes ten minutes to set things up, 1-2 hours unattended to compile and then a couple of minutes to save the required files...

I took my turn of staring into the "rabbit-hole" of kernel compilation the other day and I can say this statement is not true.

I am trying to keep an old POS system alive. Right now it is running Ubuntu 12.04 with the proprietary nvidia driver. Due to customer demands I need to switch to a more recent operating system. With the hardware and memory constraints I am facing, I want to give TinyCore a shot. I noticed nouveau-4.14.10-tinycore, read up on trials with nv and finally found this thread.

I compiled individual kernel modules, but I never compiled the kernel itself or the whole module structure. Juanito made it sound like this was an easy one. Alas, it is not. So far, I spent an entire day on this and gained nothing. This is what I did:

  • I setup a virtual i386 machine since my target is i386 and all my developer systems are amd64. There seem to be some tricks involving schroot, but after spending an hour of finding out how that may work, using a virtual machine seemed to be easier.
  • I downloaded the pre-patched TinyCore kernel, enabled support for nouveau and waited for the build to finish.
  • I replaced the vmlinuz with the newly build kernel and… drm_legacy_mmap still cannot be found.
  • I then discovered that the symbol indeed is defined, but not in the kernel but rather in drm.ko.gz. I am not familiar with TinyCore but I guess this meat I had to "remaster" the graphics-KERNEL-tinycore extension.
  • With the new graphics extension in place, trying to load nouveau triggers a loading a dependency. However backlight cannot be loaded as the symbol backlight_device_get_by_type is already owned by kernel. Which seems to be a known problem.

At this point, I am stumped. Why would menuconfig emit a configuration which leads to modules which cannot actually be used by the kernel the build produces? I am trying to produce a solution that is not only usable by me, but also by madmax and quite possibly other interested users. Any pointers of what I missed?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #44 on: February 09, 2020, 06:31:13 AM »
nouveau is enabled in the tc-11.x kernel - see http://forum.tinycorelinux.net/index.php/topic,23439.0.html