Hybrid graphics?

This forum is dedicated to packaging and translating :

On those activities rely the making of Mageia Linux Distribution.

Post all questions and information about packaging and translating : feedbacks, discussion about guidelines, packaging practices...

Hybrid graphics?

Postby viking60 » May 16th, '11, 20:40

Apparently the first Linux distros have a solution for Hybrid Graphics on laptops. The combination of the everyday Intel and the artist Nvidia or ATI.
https://help.ubuntu.com/community/HybridGraphics
http://jfsaucier.wordpress.com/2011/01/ ... ics-cards/
http://en.gentoo-wiki.com/wiki/Vga_switcheroo
http://airlied.livejournal.com/70348.html
Will Mageia have it?
Image Flexibility is good and inxi is good... install both!
User avatar
viking60
 
Posts: 255
Joined: Mar 19th, '11, 22:26

Re: Hybrid graphics?

Postby almusalimalmusalimah » Jun 20th, '11, 23:13

up ..... up

====================

just for asking about something

we already have new X. Org server (1.10.x)

so what about hybrid graphic supporting ???????
User avatar
almusalimalmusalimah
 
Posts: 301
Joined: May 19th, '11, 23:21

Re: Hybrid graphics?

Postby shani » Jun 28th, '11, 11:21

Up, up! Other distros already had solutions (vga switcheroo, bumblebee), does anyone figure out how to "do" this on Mageia?
shani
 
Posts: 1
Joined: Jun 24th, '11, 09:12

Re: Hybrid graphics?

Postby Mag » Jun 28th, '11, 22:49

Hi, have tried to send suggestions to the Wiki or the mailing list specified. So can the section of ideas and suggestions on the forum.

Wiki , technical specification in Mageia wiki
Mageia email lists

Perhaps it is good to read also:
to contribute to Mageia
Join us in creating the world day/week/month: Free and Open. By Mag... Also see: List International World Day.
One of the good things of Live CDs is that you can use Linux when and where you want included on borrowed computers or work :P
Mag
 
Posts: 44
Joined: Jun 21st, '11, 20:05

Re: Hybrid graphics?

Postby doktor5000 » Jun 29th, '11, 12:22

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: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Hybrid graphics?

Postby mastercylinder » Jul 6th, '11, 09:22

I can confirm VGA_SWITCEROO is present in the kernel and sort of works for me... Except I can't use the discreet graphics, but this problem is not unique to mageia...
mastercylinder
 
Posts: 1
Joined: Jul 6th, '11, 09:20

Re: Hybrid graphics?

Postby blosomax » Oct 20th, '11, 02:54

I have bumblebee working on my mageia 1 installation.
NB: bumblebee is an nvidia-optimus controller for linux, allowing you to run apps on your nvidia card, instead of the intell one. see https://github.com/Bumblebee-Project
NOTE THIS WILL DISABLE YOUR 3D EFFECTS FOR YOUR INTEL CARD.
To re-enable 3d on the intel card, use Mageia Control Center Choose: Hardware -> Set up the graphical server, which will break the nvidia 3d.

Steps (thanks to bumblebee team, and Jaron Vietor who posted this http://forum.mandriva.com/en/viewtopic.php?f=35&t=135018#p850742 on the mandriva forums)
NB: You will need;
- to be able to edit files as root user
- to install git (details below, you may skip this if you know how to install bumblebee without it)
- to install virtualGL (details below)

Notes on code (below) (Read this only if your not used to using terminal or konsole)
- All non gui code is bash script used in a linux terminal like konsole.
- To open a terminal: Find "konsole" in your applications launcher
- To run commands as root user type: su [enter], and enter you root password. (to leave root user mode type: exit [enter].
- Code here can then be simply copied and pasted into your terminal

-0: Backup your working xorg.conf file
- As root:
Code: Select all
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.intel


-1: Install the nvidia drivers using the mageia configuration tool. (You may need to setup you Mageia repositories)
- Open: Mageia Control Center
- Choose: Hardware -> Set up the graphical server
- Click: Graphic Card and select Nvidia -> GeForce model [GeForce 400 series and later, or GeForce 6100 to GeForce 360]
- You should get a "There is a proprietary driver availabe... Do you wish to use it?" Select Yes
- Allow Mageia to install all the drivers, and select ok to the settings screen.
- DO NOT TEST!
- Select Quit, and Yes to "Keep the changes?"

!!! Do NOT restart your computer !!!
-2: Disable nvidia driver (it will not work at this stage)
- Copy the new xorg.conf file and save as xorg.conf.nvidia
As root:
Code: Select all
mv /etc/X11/xorg.conf /etc/X11/xorg.conf.nvidia

- Copy old conf back as main
As root:
Code: Select all
cp /etc/X11/xorg.conf.old /etc/X11/xorg.conf


RESTART YOUR COMPUTER


-3 Install virtualgl
- Download virtual: http://www.virtualgl.org I used http://sourceforge.net/projects/virtualgl/files/VirtualGL/2.2.1/ and chose VirtualGL-2.2.1.x86_64.rpm
- Install. Double-click downloaded rpm

-4: Install git (You may need to setup you Mageia repositories)
(you may skip this if you know how to install bumblebee without it)
- As root:
Code: Select all
urpmi git


-5 Install bumblebee using git
- As root:
Code: Select all
git clone git://github.com/Bumblebee-Project/Bumblebee.git

This should create a Bumblebee folder in your current directory, before we install we need to make some modifications to the install file.
- Edit Bumblebee/install, and comment out lines like the following ( As bumblebee does not know of our distro.)
Code: Select all
   
  #install_step determinedistro    "" "precheck build install postconfig"
  #install_step "$DISTRO/setvars"  "" "precheck build install postconfig"
  #install_step "$DISTRO/checkdependencies" "Checking dependencies" precheck
  #install_step "$DISTRO/configure" "" postconfig

- Install As root:
Code: Select all
cd Bumblebee;./install

- Add users to the bumblebee group.
As root:
Code: Select all
usermod -a -G bumblebee YOURUSERNAME


-6 Modify bumblebee.conf
NB: Replace "lib64" with just "lib" if you are using a 32 bit OS
- As root edit /etc/bumblebee/bumblebee.conf, and add to the bottom
# My args
LD_LIBRARY_PATH="/usr/lib64/nvidia-current"
X_DAEMON="/etc/X11/X"
X_LD_LIBRARY_PATH="/usr/lib64/xorg"

EG As root:
Code: Select all
echo "# My args" >> /etc/bumblebee/bumblebee.conf
echo "LD_LIBRARY_PATH=\"/usr/lib64/nvidia-current\"" >> /etc/bumblebee/bumblebee.conf
echo "X_DAEMON=\"/etc/X11/X\"" >> /etc/bumblebee/bumblebee.conf
echo "X_LD_LIBRARY_PATH=\"/usr/lib64/xorg\"" >> /etc/bumblebee/bumblebee.conf


-6 Modify the xorg.conf.nvidia in /etc/bumblebee directory
NB: If your unsure of the busid for your nvidia card try
Code: Select all
lspci -d 10de: -n | grep '030[02]:' | cut -d' ' -f1

NB: The busid will probably be "01:00:0"

- Modify /etc/bumblebee/xorg.conf.nvidia:
Add: BusID "01:00:0", and Option "AddARGBGLXVisuals", to device section.
Remove: The whole files section
So /etc/bumblebee/xorg.conf.nvidia should look like
Code: Select all
Section "ServerLayout"
    Identifier "Layout0"
    Option "AutoAddDevices" "false"
EndSection

Section "Device"
    Identifier "Device1"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BusID "01:00:0"
    Option "NoLogo" "true"
    Option "UseEDID" "false"
    Option "ConnectedMonitor" "DFP"
    Option "AddARGBGLXVisuals"
EndSection


-7 Test:
- Open 2 terminals, 1 as root and 1 as your normal user.
- In the root terminal, start the bumblebee service:
Code: Select all
bumblebee -d

- In the user terminal test an app:
Code: Select all
optirun kwrite

- The root terminal should show the output of starting the nvidia xorg conf, and kwrite should launch from the user terminal.
- Press cntrl-c to kill the bumblebee service in the root terminal.
- To start bumblebee in the normal way as a service:
Code: Select all
/etc/init.d/bumblebee start

- To start at boot use the Mageia drakxservices tool. Mageia Control Center -> System -> Manage System services by ena ...

-8 To det the intel glx drivers working again (which will break the nvidia 3d drivers)
- Open: Mageia Control Center
- Choose: Hardware -> Set up the graphical server
- Choose:All the default options Mageia gives
- Select Quit, and Yes to "Keep the changes?", REBOOT

-8 To det the intel nvidia drivers working again (which will break the intel drivers)
Redo steps 1 & 2

Maybe someone could post how to use Section "path" in the nvidia xorg.conf so bumblebee can load the nvidia 3d drivers/modules?

Good luck!
blosomax
 
Posts: 3
Joined: Oct 19th, '11, 23:43

Re: Hybrid graphics?

Postby doktor5000 » Oct 20th, '11, 10:10

Gratulations, that's one fine step-by-step guide. Nice work!
Would you give us permissions to reuse this for a MAQeia about Hybrid graphics?
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: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Hybrid graphics?

Postby blosomax » Oct 20th, '11, 10:18

Absolutely. Please use as you like :-)
blosomax
 
Posts: 3
Joined: Oct 19th, '11, 23:43

Re: Hybrid graphics?

Postby blosomax » Oct 25th, '11, 05:27

Powersave: How to turn off the nvidia card to save power, useing acpi_call.
Note: The above bumblebee installation does not turn off the nvidia card when it's not being used which can use up a lot of power just sitting there doing nothing, I got switching the card on and off working in the following way.
WARNING: Turning the card off means you will need to restart before bumblebee optirun can work again.

Steps (see, and thanks to, the team at http://linux-hybrid-graphics.blogspot.com/)
NB: You will need;
- to be able to edit files as root user
- to install git (details below, you may skip this if you know how to install acpi_call without it)

Notes on code (Read this only if your not used to using terminal or konsole)
- All non gui code is bash script used in a linux terminal like konsole.
- To open a terminal: Find "konsole" in your applications launcher
- To run commands as root user type: su [enter], and enter you root password. (to leave root user mode type: exit [enter].
- Code here can then be simply copied and pasted into your terminal

-1 Install git. (If you haven't already)
As Root
Code: Select all
urpmi git


-2 Install acpi_call
As Root
Code: Select all
git clone https://github.com/mkottman/acpi_call.git
cd acpi_call
make
insmod acpi_call.ko


-3 Find your machines parameters
As Root
Code: Select all
chmod +x test_off.sh
./test_off.sh

You should get a list of tries like this
Trying \_SB.PCI0.P0P1.VGA._OFF: failed
Trying \_SB.PCI0.P0P2.VGA._OFF: failed
Trying \_SB_.PCI0.OVGA.ATPX: failed
Trying \_SB_.PCI0.OVGA.XTPX: failed
Trying \_SB.PCI0.P0P3.PEGP._OFF: failed
Trying \_SB.PCI0.P0P2.PEGP._OFF: failed
Trying \_SB.PCI0.P0P1.PEGP._OFF: failed
Trying \_SB.PCI0.MXR0.MXM0._OFF: failed
Trying \_SB.PCI0.PEG1.GFX0._OFF: failed
Trying \_SB.PCI0.PEG0.GFX0.DOF: failed
Trying \_SB.PCI0.PEG1.GFX0.DOF: failed
Trying \_SB.PCI0.PEG0.PEGP._OFF: failed
Trying \_SB.PCI0.XVR0.Z01I.DGOF: failed
Trying \_SB.PCI0.PEGR.GFX0._OFF: works!

The line that ends with "works!" is the one you want.
Using the example above I can now;
-turn the nvidia card off
As root
Code: Select all
echo '\_SB.PCI0.PEGR.GFX0._OFF' > /proc/acpi/call

-turn the nvidia card on
As root
Code: Select all
echo '\_SB.PCI0.PEGR.GFX0._ON' > /proc/acpi/call


-4 testing
Unplug the power and look at your battery power availabe.
Code: Select all
acpi

Repeat turning your nvidia card off and on
As Root
Code: Select all
acpi
echo '\_SB.PCI0.PEGR.GFX0._OFF' > /proc/acpi/call
sleep 3; acpi
echo '\_SB.PCI0.PEGR.GFX0._ON' > /proc/acpi/call
sleep 3;acpi

You should see a difference in battery life of 1-3 hours. The "sleep 3" is to give the system time to update the battery drain, and useage.

-5 (Optional) Create your own powersaving script
Below is my script example, copy into a file called powersave_custom
Code: Select all
#!/bin/bash

USEAGE="useage: ${0##*/} [stop,start]
help:   Turns off/on custom power saving
requrs: /etc/acpi/call/acpi_call.ko
Note:   Root users only
"

# Check user is root
if [ "$(whoami)" != "root" ]
then
  echo -e "${USEAGE}" > /dev/stderr
  exit 0
fi

# Check acpi_call module is loaded
if ! lsmod | grep -q acpi_call
then
  # Check module exists
  if [ ! -e "/etc/acpi/call/acpi_call.ko" ]
  then
    echo -e "${USEAGE}" > /dev/stderr
    exit 0
  else
    # Install acpi_call module
    insmod /etc/acpi/call/acpi_call.ko
  fi
fi

# Show battery useage before
echo "Before switch `acpi`"

if  echo "${1}" | grep -qEi "start"
then

  ##############################################################
  # HERE you can put whatever code you want to run to save power
  ##############################################################
  /etc/init.d/wine stop > /dev/null 2>&1
  /etc/init.d/bumblebee stop > /dev/null 2>&1
  echo '\_SB.PCI0.PEGR.GFX0._OFF' > /proc/acpi/call

elif echo "${1}" | grep -qEi "stop"
then

  ##############################################################
  # HERE you can put whatever code you want to run for full power
  ##############################################################
  /etc/init.d/wine start > /dev/null 2>&1
  /etc/init.d/bumblebee start > /dev/null 2>&1
  echo '\_SB.PCI0.PEGR.GFX0._ON' > /proc/acpi/call

else
  echo -e "${USEAGE}"
  exit 1
fi

# Wait a few seconds for power usage to update
sleep 3
# Show battery useage before
echo "After switch `acpi`"


As Root
Code: Select all
cd ..
mv acpi_call/ /etc/acpi/call
cp powersave_custom /usr/sbin/powersave_custom
chmod +x /usr/sbin/powersave_custom

To run As Root
Code: Select all
powersave_custom start
powersave_custom stop

NB: You may want to put this script in your "Power Management Profiles"
"Run Script" -> powersave_custom start

Hope this helps.
blosomax
 
Posts: 3
Joined: Oct 19th, '11, 23:43

Re: Hybrid graphics?

Postby isadora » Oct 25th, '11, 15:48

Dear blosomax, again i used this post of yours for additional information in the MAQeia.
Let me know when there should be any objection please, and thanks for your great contributions.
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2742
Joined: Mar 25th, '11, 16:03
Location: Netherlands

Re: Hybrid graphics?

Postby Owdy » Dec 5th, '11, 13:09

....
Last edited by Owdy on Dec 5th, '11, 16:12, edited 1 time in total.
Owdy
 
Posts: 39
Joined: Nov 26th, '11, 12:29

Re: Hybrid graphics?

Postby isadora » Dec 5th, '11, 14:04

Owdy wrote:Please do this

Regards,
ASUS N73SV

Please do what????
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2742
Joined: Mar 25th, '11, 16:03
Location: Netherlands

Re: Hybrid graphics?

Postby doktor5000 » Dec 5th, '11, 14:52

He means you should use his posts for a MAQeia, i think :)
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: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Hybrid graphics?

Postby Owdy » Dec 5th, '11, 16:12

isadora wrote:
Owdy wrote:Please do this

Regards,
ASUS N73SV

Please do what????

Arghhh, wrong topic, sorry :D
Owdy
 
Posts: 39
Joined: Nov 26th, '11, 12:29

Re: Hybrid graphics?

Postby z » Jan 11th, '12, 18:48

I'm a linux noob (sort of) and I was wondering if there is an updated/better method for installing bumblebee now since these instructions are a few months old.

Thanks!
z
 
Posts: 54
Joined: Jan 11th, '12, 18:39

Re: Hybrid graphics?

Postby doktor5000 » Jan 11th, '12, 20:47

Nope, not that i know of.
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: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Hybrid graphics?

Postby Owdy » Jan 12th, '12, 17:34

Owdy
 
Posts: 39
Joined: Nov 26th, '11, 12:29

Re: Hybrid graphics?

Postby doktor5000 » Jan 12th, '12, 17:43

If noone tries, you'll never know.
FWIW, maybe you also want to check https://bugs.mageia.org/show_bug.cgi?id=1748
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: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Hybrid graphics?

Postby Owdy » Jan 12th, '12, 18:03

Ill try it. Lots of distros using that http://download.opensuse.org/repositori ... e-develop/

edit: hmmm how do i ad that repo?
Owdy
 
Posts: 39
Joined: Nov 26th, '11, 12:29

Re: Hybrid graphics?

Postby doktor5000 » Jan 12th, '12, 18:32

You can't, opensuse build service doesn't provide correct meta data for this.

You need to download all three packages for your current system, either i586 for 32bit system or x86_64 for 64bit system. If you don't know, which your're currently using, uname -m will tell you. Then put them all in one directory, which contains no other packages, open up a terminal, change to that directory, and run the following command as root:
Code: Select all
urpmi ./*.rpm
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: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Hybrid graphics?

Postby Owdy » Jan 12th, '12, 20:11

Ok, lets see what happends.
Owdy
 
Posts: 39
Joined: Nov 26th, '11, 12:29

Re: Hybrid graphics?

Postby Owdy » Jan 12th, '12, 20:33

Didnt work.I get black screen after reboot. Tryed with nvidia and noveau drivers.
Owdy
 
Posts: 39
Joined: Nov 26th, '11, 12:29

Re: Hybrid graphics?

Postby z » Jan 12th, '12, 21:28

I installed bumblebee as per the instructions above and it works for the most part. I get some permission denied errors on the bumblebee.conf file when I use optirun (I did add myself as a user) but it still seems to work regardless. I did notice when I run something full screen, upon exit my toolbar is partially blacked out on the right side, until I resize it. Probably a refresh problem. I did notice there is now a bumblebeed package which is bumblebee written in C and is supposed to include power management also. There is also bbswitch which can be used to disable the graphics card when not in use, although I haven't tried to install it yet. Does anyone know if either of these will work with Mageia?
z
 
Posts: 54
Joined: Jan 11th, '12, 18:39

Re: Hybrid graphics?

Postby doktor5000 » Jan 13th, '12, 01:30

z wrote:I did notice there is now a bumblebeed package which is bumblebee written in C and is supposed to include power management also. There is also bbswitch which can be used to disable the graphics card when not in use, although I haven't tried to install it yet. Does anyone know if either of these will work with Mageia?

Nice to hear that it works for you.

And for your question the same answer as above: If you don't try, you'll never know. Not that many hybrid graphics users who want to use this, or so it seems.
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: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Next

Return to Packaging and translating for Mageia

Who is online

Users browsing this forum: No registered users and 1 guest

cron