Auto vga driver installation

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
User avatar
oranus
Contributor
Contributor
Posts: 69
Joined: 25 Aug 2011, 13:46
Location: Turkey

Auto vga driver installation

Post#1 by oranus » 24 Oct 2011, 08:03

To make Porteus better OS, vga driver should be install automatic. Default driver is not adequate. Nvidia and ati original driver should be installed.
I try to write script on rc.local to define and installation, but problem occurs on ati. But it works if all vga driver install on startup then deactivate inappropriate driver by rc.local script.

Any advice?

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Auto vga driver installation

Post#2 by fanthom » 24 Oct 2011, 08:48

thanks for suggestion oranus.

i have an idea how to implement this feature - new cheatcode :)
yes - i know that we have plenty of them already but cheat should work the best. this is my proposition:
when "vga-detect" (dont like this name so please propose better one - Ahau?) is used then rc.S runs something like:

Code: Select all

lspci -k | grep "Kernel driver in use: radeon" && activate /mnt/booting_partition/porteus/optional/ati-fglrx*
lspci -k | grep "Kernel driver in use: nouveau" && activate /mnt/booting_partition/porteus/optional/nVidia*
one condition: propertiaty drivers must be placed in /porteus/optional folder.
other/better ideas?

i see some problems even now, ie: when nouveau is already loaded then it's not possible to use nvidia so probably better would be to implement it directly in linuxrc when no driver is in use.
another problem:
how to determine primary GPU in case when laptop/PC has dual graphics? something in dmesg? is it always one built into CPU in case of intel? what about AMD APUs?
brokenman/other dual graphics owners - pls share your experience.

Cheers
Please add [Solved] to your thread title if the solution was found.

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Auto vga driver installation

Post#3 by Hamza » 24 Oct 2011, 11:28

I propose "autovga".

I like the idea.
NjVFQzY2Rg==

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Auto vga driver installation

Post#4 by Ahau » 24 Oct 2011, 16:15

Yes, I was going to propose 'autovga' 'auto-vga', or 'auto-graphics'.

I also think it'd be better to implement it in linuxrc because you want to implement it before the radeon or nouveau drivers start up, but that might also make it harder to figure out which driver to use with the cheatcode.

Here's an alternate approach, but I don't know if it would solve oranus' problem:

'nvidia' cheatcode - searches the optional folder and activates the nvidia module, and disables nouveau
'ati' cheatcode - does the same for ati

This way, users could keep both modules in optional, and switch back and forth depending on their hardware, and it wouldn't involve as much room for error in autodetection. The down side, of course, is that users would have to know which driver to use for the hardware in front of them. That's not hard (boot into text mode and run lspci), but it is another step.
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Auto vga driver installation

Post#5 by fanthom » 29 Oct 2011, 09:43

going to implement this feature in linuxrc. i'll probably manage to do it without increasing initrd size, loosing of speed, etc.. but need to ask community for help.

please provide output of:

Code: Select all

lspci -nn | grep "VGA compatible controller"
for as many PC's as you can - more is better.
users with 2 graphic cards are very welcome. please write which GPU is taking priority (is used for displaying GUI after boot).
please do it as soon as it's possible as i would like to push this feature to rc2 of Porteus 1.1

Cheers
Please add [Solved] to your thread title if the solution was found.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Auto vga driver installation

Post#6 by Ahau » 29 Oct 2011, 19:10

in Porteus V1.1 RC1:

root@porteus:~# lspci -nn | grep "VGA compatible controller"
01:00.0 VGA compatible controller [0300]: nVidia Corporation Quadro NVS 140M [10de:0429] (rev a1)
root@porteus:~#
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Auto vga driver installation

Post#7 by fanthom » 29 Oct 2011, 19:57

thanks Ahau,

i couldn't wait for other submissions (i'm rather impatient while developing) and searched google for 'lspci' outputs. seems that '0300' always means VGA adater, '10de' is nVidia and '1002' AMD/ATI.
here is latest initrd for 64bit rc-1 of Porteus-1.1 (also contain fix for copy2ram + hd_automounting bug):
http://www.mediafire.com/?aocjos4andz4rpf

how to use it?
a) replace existing /boot/initrd.xz
b) put nVidia and ati-fglrx from Porteus-1.1 rc1 repo:
http://ponce.cc/porteus/x86_64/testing/ ... -v1.1-rc1/
to /porteus/optional folder (IMPORTANT: linuxrc will be looking for drivers named as 'nVidia-*' and 'ati-fglrx-*' modules named differently will be skipped.)
c) boot Porteus with 'vga-detect' cheatcode (i think 'vga-detect' is easy to remember and explains puropse of this cheatcode)

what happens?
a) your PC has 1 Intel (other) GPU: nothing is activated
b) your PC has 1 AMD GPU from 'Radeon HD' family (only these are supported by fglrx): fglrx driver is activated
c) your PC has 1 nVidia GPU: nVidia properitary driver is activated (may not work for old nVidia cards)

possible bad scenarios:
a) your pc has 2 GPU's: intel and nvidia or amd: relevant properitary driver is activated and not sure what happens - (black screen? vesa drives is used?)
b) your PC has 2 GPU's: one AMD and second one nVidia: nvidia driver will be loaded (first in the queue) and in case of having amd as primary your screen wont work for sure.
c) your PC has very old nVidia GPU: nvidia driver is loaded but does not support the old card - not sure what happens (maybe vesa is used?)

as you can see single GPU is safe but 2 GPU's may cause troubles. i have no idea how to determine primary GPU - any ideas?

please test it and report positive/negative results.

Cheers
Please add [Solved] to your thread title if the solution was found.

User avatar
oranus
Contributor
Contributor
Posts: 69
Joined: 25 Aug 2011, 13:46
Location: Turkey

Re: Auto vga driver installation

Post#8 by oranus » 31 Oct 2011, 08:12

Thanks fanthom to vga-detect

I test it on 5 laptop but it doesn't work any of them. On boot screen after "detecting GPU"
1. Sony and Lenovo laptop which has Nvidia GPU: Couldn't find any Nvidia/AMD GPU on this computer
2. Toshiba has ATI HD vga: "/opt/usr/share/pci.ids No such file" error occured.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Auto vga driver installation

Post#9 by fanthom » 31 Oct 2011, 09:12

hello oranus,
1. Sony and Lenovo laptop which has Nvidia GPU: Couldn't find any Nvidia/AMD GPU on this computer
please post output of:

Code: Select all

lspci -nn | grep "VGA compatible controller"
2. Toshiba has ATI HD vga: "/opt/usr/share/pci.ids No such file" error occured.
my apologize - forgot to mention that you need to remaster 001-core.xzm and symlink /usr/share/misc/pci.ids with /usr/share/pci.ids
please unpack 001-core, go to /usr/share and run:

Code: Select all

ln -sf misc/pci.ids pci.ids
now create 001-core.xzm module once again.

will work then :)
Please add [Solved] to your thread title if the solution was found.

User avatar
oranus
Contributor
Contributor
Posts: 69
Joined: 25 Aug 2011, 13:46
Location: Turkey

Re: Auto vga driver installation

Post#10 by oranus » 31 Oct 2011, 10:10

Nvidia output:

01:00.0 VGA compatible controller [0300]: nVidia Corporation Device [10de:0a75] (rev a2)

Posted after 27 minutes 31 second:
Hi fanthom

I tested on ATI with new 001-core.xzm but I get this error: "68e0 GPU is not supported by fglrx". But I test it to copy /modules folder it works correctly. ATI catalyst works without any error. This ati-fglrx*.xzm file is appropriate for this vga.

Here is ls -nn output for ATI: "01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Device [1002:68e0]"

Cheers

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Auto vga driver installation

Post#11 by fanthom » 31 Oct 2011, 10:42

1) nVidia should work without problems - as you can see '0300' is VGA and '10de' is nVidia.
please boot porteus on affected PC with 'debug' cheatcode -> run 'lspci' and make a photo or run 'lspci | grep 10de' and write down the numbers. please post the result here.

Ahau, beny, Blaze and other Nvidia owners - could you confirm that 'vga-detect' cheatcode work (or does not work) for you (please remember to put nVidia driver to /porteus/optional folder)?

2) seems that pci.ids table used in Porteus is quite old and does not contain id's for newer GPU's. please download latest version from here:
http://pciids.sourceforge.net/v2.2/pci.ids
and put in /porteus/rootcopy/usr/share folder or remaster 001-core.xzm once again.
this time will work for sure :)

(i'm going to update pci.ids for rc2)

Cheers
Please add [Solved] to your thread title if the solution was found.

User avatar
oranus
Contributor
Contributor
Posts: 69
Joined: 25 Aug 2011, 13:46
Location: Turkey

Re: Auto vga driver installation

Post#12 by oranus » 31 Oct 2011, 11:40

Hi fanthom

1. NVidia:
01:00.0 Class 0300:10de:0a75
01:00.1 Class 0403:10de:0be3

2. I remaster 001.core.xzm but it doesn't work. I'm confused a little. Before 001-core.xzm module is activated, vga-detect cheat code detect VGA model. Should I renew pci.ids file on 001-core.xzm?

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Auto vga driver installation

Post#13 by fanthom » 31 Oct 2011, 12:02

@oranus
Should I renew pci.ids file on 001-core.xzm?
yes - please use one from:
http://pciids.sourceforge.net/v2.2/pci.ids

also - here is latest (improved) version of the initrd:
http://www.mediafire.com/?aocjos4andz4rpf

this time must work - no exceptions :)

Cheers
Please add [Solved] to your thread title if the solution was found.

User avatar
oranus
Contributor
Contributor
Posts: 69
Joined: 25 Aug 2011, 13:46
Location: Turkey

Re: Auto vga driver installation

Post#14 by oranus » 31 Oct 2011, 12:23

Hi fanthom,

I changed initrd.xz and remaster 001-core.xzm. But same error occured. :cry: I check it twice and twice. But it doesn't work.

After bootstraping I check pci.ids file and search my vga "68e0" on that file. It is stored "68e0 Mobility Radeon HD ...." . Ok.

But where is the problem?

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Auto vga driver installation

Post#15 by fanthom » 31 Oct 2011, 12:35

@oranus
something must be wrong with your setup...
please run 'psinfo' utility and upload ~/Desktop/psinfo.txt to pastebin.com.
it will tell me all info which i need.

please also run 'head /usr/share/pci.ids' command and post the output here.

Also:

Code: Select all

ls -1 /mnt/booting_partition/porteus/optional
Cheers
Please add [Solved] to your thread title if the solution was found.

Post Reply