Bug 28525 - mageia-prime tool should be more documented
Summary: mageia-prime tool should be more documented
Status: REOPENED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: Mageia 9
Assignee: Documentation Team
QA Contact:
URL:
Whiteboard:
Keywords: IN_RELEASENOTES8
Depends on:
Blocks:
 
Reported: 2021-03-05 09:58 CET by Guillermo Hazebrouck
Modified: 2021-10-05 07:21 CEST (History)
3 users (show)

See Also:
Source RPM: mageia-prime-0.4-12.mga8.nonfree.src.rpm
CVE:
Status comment: Describe Hybrid graphics in installer documentation


Attachments

Description Guillermo Hazebrouck 2021-03-05 09:58:58 CET
Description of problem:

I am installing Mageia 8 on a laptop having an nvidia GPU (see details below). However, during the installation, that card is not recognized and the X11 server falls back on the intel GPU. The installation finishes without issue and the operating system works (although the intel driver or GPU seem to be buggy), but I cannot use the nvidia GPU.

lspci retuns:

  00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 0b)
  00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)
  ...
  08:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 840M] (rev a2)

On the mageia control center I see that my NVIDIA is recognized, and the driver should be "NVIDIA GeForce 635 series and later". However, if I try to manually change the X11 server to that driver, the whole desktop crashes after rebooting (causing me a big pain).

A curious thing is that I get a BIOS error message while booting, which I suspect is something related:

[1.547344] ACPI BIOS Error (bug): Could not resolve symbol [\SB.PCI0.GFX0.DD02._BCL], AE_NOT_FOUND (20200326/psargs-303)
[1.547344] ACPI Error: Aborting method \_SB.PCI0.RP05.PEGP.DD02._BCL due to previous error (AE_NOT_FOUND) (20200326/psargs-531)
[1.547344] nouveau 0000:08:00.0: bus MMIO read of 00000000 FAULT at 6013d4 [ IBUS ]

Version-Release number of selected component (if applicable):

OS:
Linux localhost 5.10.16-desktop-1.mga8 #1 SMP Sat Feb 13 16:27:22 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
GPU:
NVIDIA Corporation GM108M [GeForce 840M] (rev a2)
Guillermo Hazebrouck 2021-03-05 10:00:05 CET

Summary: Nvidia card not detected + X11 server running on intel => Nvidia GPU not detected (X11 server falls back on Intel GPU)

Comment 1 Aurelien Oudelet 2021-03-05 10:49:49 CET
Hi, thank reporting this.

No, you're wrong. Optimus systems (Intel GPU + Nvidia discrete GPU) are only supported the way it is:

/etc/X11/xorg.conf

should ALWAYS use Intel driver.
But, there is a tool: mageia-prime
that will help you to configure the use of your nvidia dGPU.

Copying here a tutorial from our developper Giussepe Ghibo:

Actually there are four combinations of configurations Nvidia/Intel. 
Between all the combinations, the most popular is considering the NVidia 
laptop graphics card in a way similar to a desktop card.
Quick instructions follows:

- configure your card as usual as an Intel card from XFdrake.

- run from a terminal with root privileges: mageia-prime-install, then 
reboot.

- default is for installing for cards supported by the nvidia-current 
drivers.

- if everything works fine, at next reboot, you'll get the Xorg 
configured as NVidia. You can check the switch has actually been 
executed, running for instance one of the following utilities: glxinfo, 
glinfo, clinfo, nvidia-settings, cuda-z, checking /var/log/Xorg.0.log, 
typing "about:gpu" in chromium-browser, typing "about:support" in 
firefox, and some further benchmark like glxgears, glxspheres64, 
glmark2, etc., which should show also the increase of performance. 
blender should also work with CUDA rendering in Cycles.

- to go back to the Intel graphics card, run: mageia-prime-uninstall.

- once all the kernel modules are built, you can quickly switch back and 
forth between NVidia and Intel, without rebooting, but just by 
restarting X11, using:

   - mageia-prime-install -z

   - mageia-prime-uninstall -z

which will zap X11 for you.

Please report back.

Currently, we can't support a systray applet to switch to integrated or discrete GPU.
I read somewhere that will be possible soon. Perhaps for Mageia 9. Also, Plasma/KDE will add some useful stuff for us.

Status: NEW => NEEDINFO
CC: (none) => ouaurelien

Comment 2 Guillermo Hazebrouck 2021-03-05 11:56:49 CET
Thanks! It worked perfectly.

I installed the mageia-prime package from the Mageia control centre and run mageia-prime-install as root. No issues, but it is advisable to check the media is properly set if the driver has not been manually installed before (or the process will end with errors).

I had no idea that this was the default procedure. Maybe there should be more publicity about that.

Status: NEEDINFO => RESOLVED
Resolution: (none) => FIXED

Comment 3 Guillermo Hazebrouck 2021-03-05 11:58:05 CET
Maybe this should be added in the installation guide.
Comment 4 Aurelien Oudelet 2021-03-05 12:28:31 CET
(In reply to Guillermo Hazebrouck from comment #3)
> Maybe this should be added in the installation guide.

Yeah you're right.

Assigning to Morgan who does excellent job documenting.
@Morgan, can you please add a Wiki page on this and add a link to Release Notes.

Source RPM: (none) => mageia-prime-0.4-12.mga8.nonfree.src.rpm
Status comment: (none) => Comment 1 should land in a documentation Wiki and linked to Release Notes.
Assignee: bugsquad => fri
Summary: Nvidia GPU not detected (X11 server falls back on Intel GPU) => mageia-prime tool should be more documented
Resolution: FIXED => (none)
Status: RESOLVED => REOPENED
Component: Installer => RPM Packages

Comment 5 Morgan Leijström 2021-03-05 13:24:53 CET
Thank you :)
However I see Papoteur already is working on
https://wiki.mageia.org/en/Mageia-prime_for_Optimus
which looks nice to me.

@Papoteur, can you

  1) Check if that page is complete regarding comment 1

  2) I think you can remove the draft - at least Guillermo above verify comment 1 works. Maybe ask Giussepe Ghibo to check.

  3) Also check https://wiki.mageia.org/en/Mageia_8_Release_Notes#Optimus_laptops 

I have now already linked that Mageia-prime page from https://wiki.mageia.org/en/Mageia_8_Release_Notes#Optimus_laptops

Status comment: Comment 1 should land in a documentation Wiki and linked to Release Notes. => Wiki page is pointed to from Release Notes.
Assignee: fri => yves.brungard_mageia
Keywords: (none) => IN_RELEASENOTES8

Comment 6 Aurelien Oudelet 2021-03-05 13:28:36 CET
(In reply to Morgan Leijström from comment #5)
> Thank you :)
> However I see Papoteur already is working on
> https://wiki.mageia.org/en/Mageia-prime_for_Optimus
> which looks nice to me.
> 
> @Papoteur, can you
> 
>   1) Check if that page is complete regarding comment 1
> 
>   2) I think you can remove the draft - at least Guillermo above verify
> comment 1 works. Maybe ask Giussepe Ghibo to check.

This in facts comes from Giuseppe from a mail on dev@ml.
And yeah this has been tested with QA during M8 RC to Final.

> I have now already linked that Mageia-prime page from
> https://wiki.mageia.org/en/Mageia_8_Release_Notes#Optimus_laptops

Nice!
Closing this BR.

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED

Comment 7 Guillermo Hazebrouck 2021-03-05 13:43:15 CET
I had no idea the system was called "optimus". But ok, I guess one should allways read the manuals in depth (most people don't).
I was confused because I was following the installation procedures and none of this was mentioned there. So maybe there should be a small quote there telling: "hey, if you have a laptop with Intel + Nvidia GPU's, follow these instructions...". For people not being expert in Linux it would potentially save hours of frustration.
:-)
Comment 8 Dave Hodgins 2021-03-05 18:17:12 CET
Also we need to document somewhere that this isn't the only video card combo
that mageia-prime works with.

[root@x8t ~]# lspcidrake -v|grep Card
Card:ATI Volcanic Islands and later (amdgpu): Advanced Micro Devices, Inc. [AMD/ATI]|Renoir [DISPLAY_VGA] (vendor:1002 device:1636 subv:1043 subd:1e21) (rev: c6)
Card:NVIDIA GeForce 635 series and later: NVIDIA Corporation|TU106M [GeForce RTX 2060 Mobile] [DISPLAY_VGA] (vendor:10de device:1f15 subv:1043 subd:1e21) (rev: a1)

This system is shown by lshw as ...
    description: Notebook
    product: TUF Gaming FA506IV_TUF506IV
    vendor: ASUSTeK COMPUTER INC

I only found that mageia-prime works with it by chance while helping debug
a problem on another system.

CC: (none) => davidwhodgins

Comment 9 Morgan Leijström 2021-03-06 11:57:37 CET
(In reply to Guillermo Hazebrouck from comment #7)
> I had no idea the system was called "optimus".

Our fault.  I have now added some more info to that Release Notes section, early mentioning "Hybrid Graphics".  (and thanks Dave for your add there (now compacted))

I also copied that section slightly modified to wiki pages for Bumblebee and Mageia-prime, with name "Hybrid Graphics" as top paragraph.

(I was pondering to instead make a top page "Hyprid graphics" and crosslinking instead but dont want to stir up too much at this time)


I also reopen this issue for doc team, regarding incorporation in installation document. 

Maybe only info from that "Hybrid Graphics" paragraph with links to Bumblebee and Mageia-prime wiki pages?


- - - 

(In reply to Aurelien Oudelet from comment #6)
> (In reply to Morgan Leijström from comment #5)
> >   2) I think you can remove the draft - at least Guillermo above verify
> > comment 1 works. Maybe ask Giussepe Ghibo to check.
> 
> This in facts comes from Giuseppe from a mail on dev@ml.
> And yeah this has been tested with QA during M8 RC to Final.

Great, so i removed the draft state now :)


(In reply to Dave Hodgins from comment #8)
> Also we need to document somewhere that this isn't the only video card combo
> that mageia-prime works with.

Nice that works too!  I saw your edit in rel notes (now rewritten). I have now adjusted text the Mageia-prime page too where only intel was mentioned.

Severity: critical => normal
Status comment: Wiki page is pointed to from Release Notes. => Describe Hybrid graphics in installer documentation
Status: RESOLVED => REOPENED
CC: (none) => fri
Assignee: yves.brungard_mageia => doc-bugs
Resolution: FIXED => (none)

Comment 10 Guillermo Hazebrouck 2021-03-08 08:43:39 CET
It would probably be a good idea to mention this (with only a few words) on the "Graphical configuration > Choose an X server" section of the Calenco documentation.

https://doc.mageia.org/installer/7/en/content/graphicalConfiguration.html

The thing there is that if you don't know about this, you might be tempted to select the discrete graphical card during installation (and then get a black screen after logging in).
Comment 11 Aurelien Oudelet 2021-03-08 09:17:47 CET
(In reply to Guillermo Hazebrouck from comment #10)
> It would probably be a good idea to mention this (with only a few words) on
> the "Graphical configuration > Choose an X server" section of the Calenco
> documentation.
> 
> https://doc.mageia.org/installer/7/en/content/graphicalConfiguration.html
> 
> The thing there is that if you don't know about this, you might be tempted
> to select the discrete graphical card during installation (and then get a
> black screen after logging in).

Well, this will be added in Mageia 8 documentation, ASAP, and even for Mageia 7 which will EOL in May 2021.
Comment 12 Dave Hodgins 2021-03-08 16:19:36 CET
I'd like to see it recommended by default if lspcidrake |grep Card returns more
than one line.
Comment 13 Morgan Leijström 2021-03-08 16:36:54 CET
(In reply to Guillermo Hazebrouck from comment #10)
> The thing there is that if you don't know about this, you might be tempted
> to select the discrete graphical card during installation (and then get a
> black screen after logging in).


It is not always the integrated GPU that is connected to the HDMI port - it may be the other way around. A quick search now gave this example https://www.ordinatechnic.com/general-guides/1/Hardware/2/Graphics/3/Nvidia/best-distributions-for-problematic-nvidia-optimus-hybrid-graphics


I think there ought to be some short text on this displayed in the graphic configurarion dialogue in installer and Mageia control center tools.

Is there some way our tool could test which GPU is connected to the port?


(In reply to Dave Hodgins from comment #12)
> I'd like to see it recommended by default if lspcidrake |grep Card returns
> more than one line.

User need to know how to configure and use it anyway.
Comment 14 Morgan Leijström 2021-10-05 07:21:27 CEST
There have been some edits on 
https://wiki.mageia.org/en/Mageia-prime_for_Optimus

Also something about deleting ~.Xauthority in https://forums.mageia.org/en/viewtopic.php?f=8&t=14338#p84041

If there is more to add to wiki please do.

Setting target Mageia 9 for installer documentation.

Target Milestone: --- => Mageia 9


Note You need to log in before you can comment on or make changes to this bug.