Page 2 of 3

Re: Auto vga driver installation

Posted: 31 Oct 2011, 13:19
by oranus
Hi fanthom ,
1. psinfo: http://pastebin.com/zterMCS4

2. head /usr/share/pci.ids :
#
# List of PCI ID's
#
# Version: 2011.10.02
# Date: 2011-10-02 12:58:51
#
# Maintained by Martin Mares <mj@ucw.cz> and other volunteers from the
# PCI ID Project at http://pciids.sf.net/.
#
# New data are always welcome, especially if they are accurate. If you have

3. ls -l mnt/sdb/porteus/optional
total 75260
-rwxrwxrwx 1 root root 34889728 Oct 28 10:15 ati-fglrx-11.9-porteus-v1.1-rc1-x86_64-1ftm.xzm*
-rwxrwxrwx 1 root root 42176512 Oct 28 10:16 nVidia-285.05.09-porteus-v1.1-rc1-x86_64-1ftm.xzm*


By the way I tested it another laptop with ati vga. Resut is:
vga-detect cheatcode run correctly. It detect ati and activate /optional/ati-fglrz*.xzm :) good. But it's not work mine laptop.

Thanks

Re: Auto vga driver installation

Posted: 31 Oct 2011, 13:50
by fanthom
hi oranus,

everything looks ok to me...
please boot porteus with 'debug' cheatcode on your Toshiba laptop and press 'ctrl+D' till you get "Detecting GPU.." part.
now please make a photo or write down all messages till 'base/000-kernel.xzm'

i need to find out why your GPU is not recognized correctly...

Thanks

Re: Auto vga driver installation

Posted: 31 Oct 2011, 13:59
by oranus
Hi fanthom,

Here is the output

detecting GPU...
checking if 68e0 GPU belongs to 'Radeon HD' series...
68e0 GPU is not supported by fglrx driver - refusing activation...
base/000-kernel.xzm

Re: Auto vga driver installation

Posted: 31 Oct 2011, 14:16
by fanthom
look like your 001-core.xzm was not updated correctly with new pci.ids file.
please try this one:
http://ponce.cc/porteus/x86_64/testing/ ... 1-core.xzm

cheers

Re: Auto vga driver installation

Posted: 31 Oct 2011, 16:05
by oranus
Hi fanthom,

Thanks for your help. It works !!!! I remaster it wrongly.

Thanks for your good job..

By the way I wait vga-detect for nVidia.

:good:

Posted after 1 hour 4 minutes 3 seconds:
Hi fanthom
fanthom wrote: 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.

I tested mine the other laptop, ati-fglrx*.xzm doesn't work. X-server doesn't run and blackscreen.

Here is the lspci output:
01:05.0 VGA compatible controller: ATI Technologies Inc M880G [Mobility Radeon HD 4200]

By the way after vga-detect cheatcode, Porteus will be the onyl one OS which has ability to install it's own vga driver. :Yahoo!:

Thanks,

Posted after 11 minutes 44 seconds:
@fanthom

Maybe it's be usefull for you :
http://pci-ids.ucw.cz/read/PC/10de/0be3

Cheers

Re: Auto vga driver installation

Posted: 31 Oct 2011, 16:33
by Ahau
I just tested the latest initrd.xz and 001-core.xzm files with the nVidia driver in my /porteus/optional folder. vga-detect cheatcode worked like a charm for me, it automatically started up nVidia driver, and lxde and kde stated up with no problem. Only issue is that fonts show up larger than they ought to when I use nVidia (this is unrelated to the vga-detect cheatcode) -- a fix for that is described here: http://porteus.org/forum/posting.php?mo ... f=53&t=837

The hardest part was waiting for windows to shut down and then boot up after I was done testing...

Re: Auto vga driver installation

Posted: 31 Oct 2011, 16:53
by fanthom
i have uploaded all needed stuff here (initrd.xz +001-core.xzm):
http://ponce.cc/porteus/x86_64/testing/ ... ga-detect/

for every failing PC/laptop please post output of:

Code: Select all

lspci -nn | grep "VGA compatible controller"
and /var/log/Xorg.0.log (uploaded to pastebin.com).
please also report if nVidia/Ati driver works when placed directly in /porteus/modules folder and not /porteus/optional.
(for nVidia there is a chance that your GPU is too old for latest nVidia driver, AMD should work fine for all HD GPU's)

Thanks

Re: Auto vga driver installation

Posted: 01 Nov 2011, 23:01
by Ahau
As reported, it works well for my nVidia laptop. If I move the nVidia driver module to /porteus/linux, then it will activate and use the nVidia driver instead of nouveau. This is the case whether or not I use the vga-cheatcode, so to revert back to nouveau, I must move the nVidia driver module back to /porteus/optional and drop the vga-detect cheatcode.

Re: Auto vga driver installation

Posted: 02 Nov 2011, 02:12
by brokenman
For people with dual graphics cards the support switcheroo function in this latest kernel will double (or more) your battery life. The problem before was that linux would initiate both cards during boot and for me this meant almost overheating and a battery life of less than 1 hour.

This is your integrated card:

Code: Select all

lspci | grep VGA | sed -n '1p' | cut -f 1 -d " "
This is your discreet card:

Code: Select all

lspci | grep VGA | sed -n '2p' | cut -f 1 -d " "
This is the card states:

Code: Select all

pci_integrated=$(lspci | grep VGA | sed -n '1p' | cut -f 1 -d " ")
pci_discrete=$(lspci | grep VGA | sed -n '2p' | cut -f 1 -d " ")
integrated=$(cat /sys/kernel/debug/vgaswitcheroo/switch | grep $pci_integrated | grep -o -P ':.:...:')
discrete=$(cat /sys/kernel/debug/vgaswitcheroo/switch | grep $pci_discrete | grep -o -P ':.:...:')

name_integrated=$(lspci | grep VGA | sed -n '1p' | sed -e "s/.* VGA compatible controller[ :]*//g" | sed -e "s/ Corporation//g" | sed -e "s/ Technologies Inc//g" | sed -e 's/\[[0-9]*\]: //g' | sed -e 's/\[[0-9:a-z]*\]//g' | sed -e 's/(rev [a-z0-9]*)//g' | sed -e "s/ Integrated Graphics Controller//g")

name_discrete=$(lspci | grep VGA | sed -n '2p' | sed -e "s/.* VGA compatible controller[ :]*//g" | sed -e "s/ Corporation//g" | sed -e "s/ Technologies Inc//g" | sed -e 's/\[[0-9]*\]: //g' | sed -e 's/\[[0-9:a-z]*\]//g' | sed -e 's/(rev [a-z0-9]*)//g' | sed -e "s/ Integrated Graphics Controller//g")

[ "$integrated" = ":+:Pwr:" ] && integrated_condition="Switched on and in use"
[ "$integrated" = ": :Pwr:" ] && integrated_condition="On but not being used"
[ "$integrated" = ": :Off:" ] && integrated_condition="Switched off"

[ "$discrete" = ":+:Pwr:" ] && discrete_condition="Switched on and in use"
[ "$discrete" = ": :Pwr:" ] && discrete_condition="On but not being used"
[ "$discrete" = ": :Off:" ] && discrete_condition="Switched off"

echo "##############################"
echo "Integrated card: $name_integrated"
echo "$integrated_condition"
echo "-------------------------------"
echo "Discreet card: $name_discrete"
echo "$discrete_condition"
echo ""
You can switch graphics cards by passing info to: /sys/kernel/debug/vgaswitcheroo/switch

If you have no file there (and you are certain your system supports switcheroo) then mount the debug fs.

Code: Select all

mount -t debugfs none /sys/kernel/debug
I will get around to writing a GUI for switching cards soon. For now you can read more about switching using CLI.

Code: Select all

echo ON > /sys/kernel/debug/vgaswitcheroo/switch
Turns on the GPU that is disconnected (not currently driving outputs), but does not switch outputs.

Code: Select all

echo IGD > /sys/kernel/debug/vgaswitcheroo/switch
Connects integrated graphics with outputs.

Code: Select all

echo DIS > /sys/kernel/debug/vgaswitcheroo/switch
Connects discrete graphics with outputs.

Code: Select all

echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
Turns off the graphics card that is currently disconnected. (woohoo, save power)

There are also a couple of options that are useful from inside an X-Windows session:

Code: Select all

echo DIGD > /sys/kernel/debug/vgaswitcheroo/switch
Queues a switch to integrated graphics to occur when the X server is next restarted.

Code: Select all

echo DDIS > /sys/kernel/debug/vgaswitcheroo/switch
Queues a switch to discrete graphics to occur when the X server is next restarted.

Re: Auto vga driver installation

Posted: 03 Nov 2011, 15:31
by Ahau
Here's my first draft of a cheatcode listing for 'vga-detect'. I'm sure it will need some polish and tweaks -- just let me know what else should be included:

Code: Select all

vga-detect

   ... Automatically detects ATI or nVidia video cards, activates
       the appropriate driver modules, and loads the proprietary
       drivers.  In order to use this cheatcode, you need to have the 
       appropriate graphics driver module (nVidia or ati-fglrx) 
       stored in your /porteus/optional/ directory.  linuxrc will be
       looking for xzm's named 'nVidia-*' or 'ati-fglrx-*', so make
       sure the module names include this spelling, especially if 
       you are using drivers that did not come from the Porteus 
       repo.

       This allows users to easily switch back and forth between 
       different hardware configurations while using the proprietary 
       drivers.

       Note that this cheatcode may not perform as expected if you
       have a dual-graphics card setup. Also, older nVidia GPU's may
       be not supported by the latest nVidia driver.

Re: Auto vga driver installation

Posted: 04 Nov 2011, 01:29
by brokenman
Personally i would just say it only supports the drivers that reside on the official porteus server as these are guaranteed to run smooth (if Fanthom created them anyway).

I think is an excellent feature for a portable distro. The v1.0 would not boot on my machine unless i had the ATI drivers in the modules folder ... and some people wouldn't even know what type of graphics card they have. I guess the user still has to have the sense to download the drivers and place them in the optional folder ... and that i something we can't get around short of adding lots of weight to the ISO.

Re: Auto vga driver installation

Posted: 04 Nov 2011, 02:00
by Ahau
I agree that this would simplify the language a bit, but I also think that it's useful to know this cheatcode will work with a custom driver, if named appropriately (some ATI users need to compile a custom driver per the FAQ). Any further thoughts? Maybe I'll take a stab at rdewriting for clarity tomorrow morning.

Re: Auto vga driver installation

Posted: 04 Nov 2011, 09:50
by fanthom
we can't get around short of adding lots of weight to the ISO.
true.
there is also another problem. opensource drivers uses Mesa 3D library (OpenGL 2.1):
/usr/lib(64)/libGL.so
while nVidia and AMD provides their own implementations (OpenGL 4.1 and up) - also:
/usr/lib(64)/libGL.so
(these symlinks overwrite each other in our layered fs.)
in short words: it would be possible to run PC with Intel GPU when nVidia/AMD proprietary drivers are activated but 3D would be broken.
in case of integrating proprietary drivers with the ISO the only way would be to discover GPU during startup and change symlinks accordingly.
some people may be just happy with opensource drivers (like me) so i think 'vga-detect' is the best solution as gives maximum flexibility.

Cheers

Re: Auto vga driver installation

Posted: 04 Nov 2011, 14:56
by Ahau
Here's a rewrite...I'll add linebreaks, etc., if folks like this better.

Code: Select all

Automatically detects ATI or nVidia video cards and loads the proprietary drivers at startup.  You must have a module containing the appropriate graphics driver (nVidia or ati-fglrx) stored in your /porteus/optional/ directory.  These modules are available in the download section of the Porteus website (www.porteus.org/download) for each edition and version of Porteus.  If you compile your own driver, please note that the module's name must include the string 'nVidia-' or 'ati-fglrx-' because the startup script (linuxrc) searches for the driver modules by name.

This cheatcode allows users to easily switch back and forth bewteen different hardware configurations while using the proprietary drivers because both driver modules can sit side by side in /porteus/optional/ without interfering with one another.  They are only activated when needed.

Note that this cheatcode may not perform as expected if you have a dual-graphics card setup.  Also, older nVidia GPU's may not be supported by the latest nVidia driver.

Re: Auto vga driver installation

Posted: 04 Nov 2011, 15:13
by fanthom
perfect Ahau,

i would change only one thing:

Code: Select all

please note that the module's name must include the string 'nVidia-' or 'ati-fglrx-'
to

Code: Select all

please note that the module's name must start from the string 'nVidia-' or 'ati-fglrx-'