Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO] Using recent muxless Intel/ATI hybrid graphics
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
hirakendu
Guru
Guru


Joined: 24 Jan 2007
Posts: 386
Location: san diego

PostPosted: Sat Jan 21, 2012 10:00 am    Post subject: [HOWTO] Using recent muxless Intel/ATI hybrid graphics Reply with quote

This howto attempts to provide some information about running OpenGL (and OpenCL) applications on the ATI discrete graphics card on many of the recent notebooks that come with a Intel/ATI hybrid graphics system. It is primarily aimed at the recent notebooks with the PowerXpress 4.0+ model, which are "muxless", i.e., don't have a hardware switch to toggle between integrated and dedicated graphics -- there is no way to turn off the integrated graphics completely (in the bios or using a physical switch) and use it as a simple single graphics card system with just the discrete graphics card. For a more or less current overview of the state of hybrid graphics in general, see [1].

Since I could not find much information on the web about using the discrete graphics on these systems, I decided to try out a few things on my machine and this howto is a summary of the results. One can use either the proprietary ATI drivers (fglrx) or the opensource radeon drivers to get graphics acceleration. However, I prefer using fglrx, since it offers more features, including nice OpenGL performance (which is expected out of these upper mid-range GPUs) and support for running OpenCL applications. Also, it is neatly done - we get to use the Intel KMS (Kernel Mode Setting) with the Radeon doing the rendering! A word of caution is that I still prefer using the Intel graphics usually since the machine runs hot with fglrx (or radeon) and I feel a slight lag while using fglrx (possibly due to the graphics from radeon being routed through the intel graphics).

To use the opensource radeon drivers, currently the only working way seems to be along the lines of the Bumblebee and Ironhide projects (see [2] and [3]) for Intel/Nvidia hybrid graphics (also muxless, known as Optimus and is anologous to powerexpress) that start a second X server on the discrete graphics card and then use VirtualGL (see [4]) for running (rendering?) OpenGL applications on the second X server while outputting images to the primary X server (running on integrated graphics). (PS: This is possibly an inaccurate lay man summary of things, as is most of this howto ;).) This method also has its advantages - it is easy to switch off the discrete card using "vga_switcheroo" (described later) and turn it on when required. However, the graphics performance seems to be (only) on par with the Intel graphics - I think possibly due to the current state of mesa and drivers. Applications like glxgears run at half speed (250fps on radeon compared to 500 fps on intel, both on VirtualGL), although applications like Doom 3 run pretty much the same (about 20 fps at 1600x900), with the radeon being slightly faster and offering smoother frame rates. Another issue is that I think the image quality on discrete graphics is somewhat lower, possibly due to the image compression scheme(s) used by VirtualGL (which is geared towards efficient compression for transporting over networks).

I could not get to use fglrx using VirtualGL and also couldn't get to use open source radeon drivers to drive the primary X server. While I have tested things on my notebook, which is a Sony Vaio S 13.3 (VPCSA3AFX), these methods should work on similar notebooks with the only possible change of PCI Bus ID of the discrete graphics device (as described further along). Both driver methods are now described in some detail.

Method 1: ATI proprietary drivers (fglrx) method:

This method is fairly straight forward. In a nutshell, the system intially boots up with the Intel i915 driver running the display. But the X server is started with the fglrx driver that works in combination with the userspace component of the Intel drivers (xf86-video-intel) to do the actual graphics processing on the discrete GPU (and transferring the images to the Intel GPU, which is in turn the only device connected to the display outputs).

Hence, the first thing we need is a standard Intel graphics software stack - a recent kernel with i915 drivers, the xf86-video-intel package, with version <2.16 (preferably =2.15*) and a recent mesa and libdrm. The kernel configuration and other details are described later while discussing the second method that uses opensource drivers. The significant detail is that the i915 drivers should be preferably built into the kernel image, instead of being modular. (Even if built modular, it should be loaded before fglrx, perhaps using a initramfs. As explained later, the opensource radeon drivers in the kernel, if built, should preferably be modular and disabled at start using the option "radeon.disable=1" in the bootloader kernel commandline). Regarding the xf86-video-intel package, it is important to use a version <2.16, as was fortunately noted in the forum post [5] (by bojojo2020). This is because the current version of ati-drivers, 11.12 doesn't seem to work with newer versions of xf86-video-intel. (I was initially unsuccessful with 2.17, and in my opinion, this is perhaps the only detail due to which someone would fail in getting fglrx running.)

The rest is along the lines of what is described in the forum [5] and the Gentoo Wiki [6]. Here is a short summary. One emerges ati-drivers, preferably the latest 11.12 (as of now):
Code:
# emerge -av ati-drivers
. Then to use ATI's OpenGL libraries, the usual:
Code:
# eselect opengl set ati
. One may or may not need to run the ATI driver's initial configuration:
Code:
# aticonfig --initial
, which would create a new /etc/X11/xorg.conf, backing up the old one. This can be replaced with the one shown:
Code:
## /etc/X11/xorg.conf for fglrx
Section "Device"
        Identifier      "Configured Video Device"
        Driver          "fglrx"
        BusID           "PCI:01:00:0"
EndSection

Section "Monitor"
        Identifier      "Configured Monitor"
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Monitor         "Configured Monitor"
        Device          "Configured Video Device"
EndSection

Section "ServerLayout"
        Identifier      "Default Layout"
        Option          "ignoreABI"     "1"
EndSection
. An important detail is the bus ID line in the device section. Replace that with the corresponding bus ID of the graphics card on your system by looking at the "lspci" output for the ATI graphics card (and replacing periods with colons):
Code:
# echo "PCI:$(lspci | grep VGA | grep ATI | awk '{print $1}' | sed 's/\./:/')"
. It may also be required to run
Code:
# aticonfig --px-dgpu
to get fglrx use the discrete GPU. With this, (re)starting the X server should have the discrete GPU doing the rendering work. The "glxinfo" should show up the ATI's openGL libraries. And if using AMD's OpenCL SDK (APP or Stream as it is called), "clinfo" should show the ATI graphics card available.

To use the Intel graphics subsequently, reverse the changes made earlier. We do
Code:
# aticonfig --px-igpu

to change to integrated Intel GPU. (This should not be required if using the intel driver in xorg.conf, and is also convenient not to do if one switches often between ATI and Intel Graphics.) We revert to mesa OpenGL:
Code:
# eselect opengl set xorg-x11
, and xorg.conf with Intel driver:
Code:
## /etc/X11/xorg.conf for intel
Section "Device"
        Identifier      "Configured Video Device"
        Driver          "intel"
EndSection

Section "Monitor"
        Identifier      "Configured Monitor"
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Monitor         "Configured Monitor"
        Device          "Configured Video Device"
EndSection

Section "ServerLayout"
        Identifier      "Default Layout"
        Option          "ignoreABI"     "1"
EndSection
. The next X server start (or restart) should make the system run on Intel GPU.

It is helpful to write scripts for these various actions, for example [6]. It may also be possible to do a more seamless switching between the integrated and discrete graphics cards as is done in Windows systems. While it may be still required to restart the X server, it would perhaps be possible to use the same xorg.conf. The ATI Catalyst Control Center, (the settings manager for fglrx) has a section for hybrid graphics, which may be useful.

Method 2: Open source drivers (radeon) method:

This method follows exactly along the ideas of the "Bumblebee" [2] and "Ironhide" [3] projects that are meant for similar muxless Intel/Nvidia hybrid graphics system. While these two projects are explicitly meant for Nvidia hybrid graphics, the methods easily extend to ATI hybrid graphics as well. The following is a summary of such an attempt by me on my computer, and also attempts to provide some information about how it works, since I could not find much documentation on the web. The technique is simple, yet novel -- to start a second X server on the discrete graphics card, and then use VirtualGL to run (i.e., render) 3D applications on the secondary X server, while outputting the final images to the primary X server (that runs on the integrated card). See the VirtualGL project at [4] for a fascinating reading.

Here we go about the details.

2.0. Prerequisites:

We need to have pretty recent kernel and X packages. For example, on my system, I have the following relevant packages:
Code:
sys-kernel/helium-sources-3.1.6
sys-kernel/linux-firmware-20110818
x11-drivers/xf86-video-intel-2.15.0-r1  USE="dri"
x11-drivers/xf86-video-ati-6.14.3
x11-base/xorg-server-1.10.4  USE="ipv6 nptl udev xnest xorg xvfb -dmx -doc -kdrive -minimal -static-libs -tslib"
x11-libs/libdrm-9999-r101  USE="libkms -static-libs" VIDEO_CARDS="intel nouveau radeon vmware"
media-libs/mesa-9999-r101  USE="classic d3d egl g3dvl gallium gbm gles1 gles2 llvm nptl openvg shared-glapi vdpau xvmc -bindist -debug -osmesa -pax_kernel -pic (-selinux) -shared-dricore -wayland" VIDEO_CARDS="i915 i965 intel nouveau r100 r200 r300 r600 radeon vmware"
.

Some notes on the above packages:

2.0.1 kernel: For kernel, while I am using "helium-sources", the standard "gentoo-sources" or "vanilla-sources" >= 3.1 should do. The package "linux-firmware" or "radeon-ucode" is required for supplying firmware for the latest radeon graphics cards. The appropriate firmware files should also be referenced in the kernel config as explained further. In the kernel configuration, select "i915" driver (for intel graphics) to be built into the kernel, and the "radeon" driver to be modular:
Code:
CONFIG_DRM_I915=y
CONFIG_DRM_RADEON=m
. We also need the following for supporting hybrid graphics:
Code:
CONFIG_VGA_SWITCHEROO=y
CONFIG_DEBUG_FS=y
. While the vga_switcheroo (and a host of other drivers and features like acpi, hwmon, i2c, mxm, wmi, agp, drm etc) should be automatically pulled in, the debugfs feature needs to be selected explicitly.

For referencing the appropriate firmware files, the following kernel config options need to be set as below:
Code:
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE="radeon/BARTS_mc.bin radeon/BARTS_me.bin radeon/BARTS_pfp.bin radeon/BTC_rlc.bin radeon/CAICOS_mc.bin radeon/CAICOS_me.bin radeon/CAICOS_pfp.bin radeon/CAYMAN_mc.bin radeon/CAYMAN_me.bin radeon/CAYMAN_pfp.bin radeon/CAYMAN_rlc.bin radeon/CEDAR_me.bin radeon/CEDAR_pfp.bin radeon/CEDAR_rlc.bin radeon/CYPRESS_me.bin radeon/CYPRESS_pfp.bin radeon/CYPRESS_rlc.bin radeon/JUNIPER_me.bin radeon/JUNIPER_pfp.bin radeon/JUNIPER_rlc.bin radeon/PALM_me.bin radeon/PALM_pfp.bin radeon/R600_rlc.bin radeon/R700_rlc.bin radeon/REDWOOD_me.bin radeon/REDWOOD_pfp.bin radeon/REDWOOD_rlc.bin radeon/SUMO2_me.bin radeon/SUMO2_pfp.bin radeon/SUMO_me.bin radeon/SUMO_pfp.bin radeon/SUMO_rlc.bin radeon/TURKS_mc.bin radeon/TURKS_me.bin radeon/TURKS_pfp.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware/"
. The "CONFIG_EXTRA_FIRMWARE" line can be generated automatically after emerging the linux-firmware or radeon-ucode package as follows:
Code:
# emerge -pv linux-firmware
# for filename in $(ls /lib/firmware/radeon/); do  if [ ! -e "/usr/src/linux/firmware/radeon/${filename}" ]; then   echo -ne " radeon/${filename}";  fi; done; echo " "
.

Blacklist the "radeon" kernel driver module in /etc/modprobe.d/blacklist.conf by adding the line:
Code:
blacklist radeon
, or blacklist it via kernel command line (in the bootloader configuration as explained further). This is to ensure that the intel driver for integrated graphics is loaded and used, and the radeon driver is not loaded automatically by udev at startup. Some additional options may be passed in the kernel commandline via the bootloader configuration as shown in the example below for grub2:
Code:
## /boot/grub2/grub.cfg
menuentry "Linux" {
  insmod ext2
  set root=(hd0,5)
  linux /boot/vmlinuz root=/dev/sda5 rootfstype=ext4 \
    splash=silent,theme:BlueCurls CONSOLE=/dev/tty1 quiet logo.nologo \
    video=uvesafb:off video=vesafb:off \
    modprobe.blacklist=fglrx,radeon ikms=1 xdriver=xorg \
    i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 \
    pcie_aspm=force
  initrd /boot/initramfs-nonlive.igz
}
. The options "video=uvesafb:off video=vesafb:off" are used for disabling Vesa and Uvesa drivers for startup screen. The options "i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1" are useful for the laptops with latest Intel "Sandybridge" graphics (2nd generation "Core i3/i5/i7" processors), without which the CPU runs hot. The option "modprobe.blacklist=fglrx,radeon" are used for prevent loading automatically the radeon (in-kernel opensource driver) and fglrx (ATI's proprietary drivers) modules for the discrete graphics card. (The option "pcie_aspm=force" is currently required to force additional power management on most computers, and shouldn't be required in future kernel versions, possibly 3.2 and surely 3.3. The option "ikms=1" are specific to my setup since in my kernel config, the "i915" driver is compiled as modular, and is loaded by the initrd conditionally by this kernel commandline option. The option "xdriver=xorg" is also specific to my setup and is used by the custom gpu-detection scripts, that are similar to ones in Sabayon Linux distribution.)

2.0.2 X and mesa: The "xf86-video-intel", "xf86-video-ati" and "xorg-server" package versions on my system are currently in the stable portage tree. If not planning to use fglrx, it is better to use the newer xf86-video-intel packages, say 2.17, with USE="dri sna" -- the performance is better, uses the newer SNA (sandybridge) driver architecture, and power management also seems to be better. For the "mesa" and "libdrm" packages, while the stable (or ~arch) versions in portage should suffice, it is better to get the git versions, either by unmasking the corresponding 9999 packages in portage or even better by using the x11-overlay versions.

At this stage it is expected that one has the integrated Intel graphics fully functioning with proper 2D and 3D graphics acceleration (see the output of "glxinfo") and power management.

On some systems, for example on my Sony Vaio, the discrete graphics card is powered on by default and keeps consuming power, which apart from increasing battery usage, also raises the system temperature. It can be powered down when not in use (and I would highly recommend to do so) by loading the radeon module and using the debugfs interface of vga_switcheroo as follows:
Code:
# modprobe radeon
# echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
. These two commands can also be added to a startup script, say /etc/local.d/misc.start. Another alternative for powering down the radeon is to emerge the package "acpi_call" and use it for passing a DSDT call for powering down the graphics card. The DSDT command is specific to the laptop bios. For example, on my Sony machine (do not try this on non-Sony machines, although it should just fail safely):
Code:
# emerge -pv acpi_call
# modprobe acpi_call
# echo "\_SB.PCI0.PEG0.PEGP._OFF" > /proc/acpi/call
. For trouble shooting, one may look at the appropriate kernel log messages ("dmesg" command). On my machine, both methods seem to offer similar power savings, although I prefer the radeon and vga_switcheroo method. If I use the acpi_call method, after disabling and reenabling the card, if I try to load the radeon module, the system becomes unstable and mostly hangs. It is safe not to run the acpi_call when the radeon (or fglrx) module is loaded. It also seems that unloading the radeon module causes the system to become unstable and hang. However, using vga_switcheroo to turn the discrete graphics on and off doesn't cause any issues.

2.1. Running second X server on the discrete GPU:

Create a seperate X config file, say /etc/X11/xorg.conf.pxp and explicitly specify the bus ID of the discrete GPU in the device section:
Code:
## /etc/X11/xorg.conf.pxp

Section "Device"
        Identifier      "Device0"
        Driver          "radeon"
        BusID           "PCI:01:00:0"
EndSection

Section "Monitor"
        Identifier      "Monitor0"
EndSection

Section "Screen"
        Identifier      "Screen0"
        Monitor         "Monitor0"
        Device          "Device0"
EndSection
. The bus ID can be obtained by running the lspci command and looking for the ATI VGA adapter as mentioned earlier in the fglrx section.

Before starting the X server, make sure that the radeon driver is loaded and the discrete graphics card is powered on:
Code:
# if [ -z "$(lsmod | grep -i radeon)" ]; then modprobe radeon; fi
# cat /sys/kernel/debug/vgaswitcheroo/switch
  0:IGD:+:Pwr:0000:00:02.0
  1:DIS: :[b]Off[/b]:0000:01:00.0
# echo ON > /sys/kernel/debug/vgaswitcheroo/switch
# cat /sys/kernel/debug/vgaswitcheroo/switch
  0:IGD:+:Pwr:0000:00:02.0
  1:DIS: :[b]Pwr[/b]:0000:01:00.0
.

Start the second X server by using the X config created before:
Code:
# X -ac -config /etc/X11/xorg.conf.powerexpress -sharevts -nolisten tcp -noreset :8 vt9
. If successful, this will hose the terminal from which it was started unless appended with "&", and display messages like
Code:
X.Org X Server 1.10.4
Release Date: 2011-08-19
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.1.6-helium x86_64 Gentoo
Current Operating System: Linux Shadow 3.1.6-helium #1 SMP Fri Dec 30 02:03:48 PST 2011 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz root=/dev/sda5 rootfstype=ext4 splash=silent,theme:BlueCurls CONSOLE=/dev/tty1 quiet logo.nologo video=uvesafb:off video=vesafb:off modprobe.blacklist=nvidia,fglrx ikms=1 xdriver=xorg i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 pcie_aspm=force
Build Date: 28 December 2011  04:36:04PM
 
Current version of pixman: 0.24.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.8.log", Time: Tue Jan 17 22:39:00 2012
(++) Using config file: "/etc/X11/xorg.conf.pxp"
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(II) [KMS] Kernel modesetting enabled.
. The server can be terminated by pressing Ctrl+C or using "kill" command. The detailed log messages can be seen at log file /var/log/Xorg.8.log.

2.3. Run a 3D application using VirtualGL:

This is the second key ingredient and the final step. Emerge the package "virtualgl" by using the ebuild from [7] or [8]:
Code:
# emerge virtualgl
. Run a 3D application using the "vglrun" command and specifiying the appropriate X server. For example, "glxinfo" on my system gives:
Code:
# vglrun -d :0 glxinfo | head -n 30
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: VirtualGL
server glx version string: 1.4
server glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_SGI_make_current_read, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SUN_get_transparent_index, GLX_ARB_create_context
client glx vendor string: VirtualGL
client glx version string: 1.4
client glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_SGI_make_current_read, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SUN_get_transparent_index, GLX_ARB_create_context
GLX version: 1.4
GLX extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_SGI_make_current_read, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SUN_get_transparent_index, GLX_ARB_create_context
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD TURKS
OpenGL version string: 2.1 Mesa 7.12-devel (git-11cdf24)
OpenGL shading language version string: 1.20
OpenGL extensions:
    GL_ARB_multisample, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color,
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_copy_texture,
    GL_EXT_polygon_offset, GL_EXT_subtexture, GL_EXT_texture_object,
    GL_EXT_vertex_array, GL_EXT_compiled_vertex_array, GL_EXT_texture,
    GL_EXT_texture3D, GL_IBM_rasterpos_clip, GL_ARB_point_parameters,
.

When done with running the 3D application, the X server can be killed (by pressing ctrl+c in the shell running it) and the discrete GPU can be powered down:
Code:
# echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
# cat /sys/kernel/debug/vgaswitcheroo/switch
  0:IGD:+:Pwr:0000:00:02.0
  1:DIS: :[b]Off[/b]:0000:01:00.0
.

The whole process can be scripted for automatically powering on the GPU and starting a X server for running a 3D application, and cleaning up afterwards. The bumblebee project offers such scripts like "optirun" for Intel/Nvidia systems. One may reuse most of such scripts with minor changes. One such crude script is shown below:
Code:
#!/bin/bash

#
# /usr/local/bin/pxp_run.bash
#

VGL_DISP=":8"
PROG_NAME="$(basename $0)"
PROG_NAME="${PROG_NAME%%.*}"

if [ $# -lt 1 ]; then
  echo -ne "\n  Usage: $(basename $0) <X-application>\n"
  echo -e "  Example: $(basename $0) glxgears\n"
  exit
fi

echo -ne "  ${PROG_NAME}: Enabling Discrete graphics card ... "
echo ON >  /sys/kernel/debug/vgaswitcheroo/switch
echo "done"

echo -ne "  ${PROG_NAME}: Starting X server on ${VGL_DISP} ... "
X -ac -config /etc/X11/xorg.conf.pxp -quiet -sharevts \
  -nolisten tcp -noreset ${VGL_DISP} vt9 &
XPID="$!"
disown $XPID
echo "done"

echo -e "  ${PROG_NAME}: Running X-application using VirtualGL ... \n"
vglrun -d ${VGL_DISP} $@

echo -e "\n  ${PROG_NAME}: X-application stopped"

echo -ne "  ${PROG_NAME}: Shutting down X server ... "
sleep 1
kill -9 ${XPID} > /dev/null 2>&1
sleep 1
echo "done"

echo -ne "  ${PROG_NAME}: Disabling Discrete graphics card ... "
echo OFF >  /sys/kernel/debug/vgaswitcheroo/switch
echo "done"
, which may be copied as /usr/local/bin/pxp_run.bash and made executable. Beware that it extremely crude. In particular, it expects the radeon xorg.conf shown earlier to be present at /etc/X11/xorg.conf.pxp. It also has a couple of sloppy sleep commands to wait for the application and X server to shut down before powering down the GPU.



Useful links:

[1] Linux hybrid graphics at Launchpad.net: https://launchpad.net/~hybrid-graphics-linux
[2] Bumblebee project: https://launchpad.net/~mj-casalogic/+archive/bumblebee/
[3] Ironhide project: https://launchpad.net/~mj-casalogic/+archive/ironhide/
[4] VirtualGL: http://sourceforge.net/projects/virtualgl/
[5] A Gentoo Forums thread on muxless Intel/ATI hybrid graphics: http://forums.gentoo.org/viewtopic-t-881115.html
[6] A Gentoo wiki on hybrid radeon graphics: http://en.gentoo-wiki.com/wiki/Fglrx-hybrid-graphics
[7] Ebuild for VirualGL: https://github.com/speckins/usr-local-portage/tree/master/x11-misc/virtualgl
[8] Alternate link for VirtalGL ebuild: http://hirakendu.mooo.com/gentoo/gentoo-2010/config-scripts/portage-updates/x11-misc/virtualgl/
[9] Gentoo bug request for Bumblee ebuild: https://bugs.gentoo.org/show_bug.cgi?id=384083
_________________
Helium Sources || Gentoo Minimal Livecd


Last edited by hirakendu on Sat Jan 21, 2012 10:06 am; edited 1 time in total
Back to top
View user's profile Send private message
hirakendu
Guru
Guru


Joined: 24 Jan 2007
Posts: 386
Location: san diego

PostPosted: Sat Jan 21, 2012 10:05 am    Post subject: Reply with quote

Other stuff:

Relevant lspci output on my computer, Sony Vaio S 13.3 (VPCSA3AFX):
Code:
 # lspci -nn | grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:0116] (rev 09)
01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Device [1002:6741]
.

Output of glxinfo while using fglrx driver:
Code:
 # glxinfo | head -n 50
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: ATI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_OML_swap_method,
    GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group
client glx vendor string: ATI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile,
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_swap_control, GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_MESA_allocate_memory, GLX_MESA_copy_sub_buffer, GLX_MESA_swap_control,
    GLX_MESA_swap_frame_usage, GLX_NV_swap_group, GLX_OML_swap_method,
    GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync,
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGIX_swap_barrier, GLX_SGIX_swap_group, GLX_SGIX_visual_select_group,
    GLX_EXT_texture_from_pixmap, GLX_EXT_framebuffer_sRGB,
    GLX_ARB_fbconfig_float, GLX_AMD_gpu_association
GLX version: 1.4
GLX extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile,
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_swap_control, GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_MESA_swap_control, GLX_NV_swap_group, GLX_OML_swap_method,
    GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync,
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGIX_swap_barrier, GLX_SGIX_swap_group, GLX_SGIX_visual_select_group,
    GLX_EXT_texture_from_pixmap
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon 6600M and 6700M Series
OpenGL version string: 4.2.11318 Compatibility Profile Context
OpenGL shading language version string: 4.20
OpenGL extensions:
    GL_AMDX_debug_output, GL_AMDX_vertex_shader_tessellator,
    GL_AMD_conservative_depth, GL_AMD_debug_output,
    GL_AMD_depth_clamp_separate, GL_AMD_draw_buffers_blend,
    GL_AMD_multi_draw_indirect, GL_AMD_name_gen_delete,
    GL_AMD_performance_monitor, GL_AMD_pinned_memory, GL_AMD_sample_positions,
    GL_AMD_seamless_cubemap_per_texture, GL_AMD_shader_stencil_export,
    GL_AMD_shader_trace, GL_AMD_texture_cube_map_array,
    GL_AMD_texture_texture4, GL_AMD_transform_feedback3_lines_triangles,
    GL_AMD_vertex_shader_tessellator, GL_ARB_ES2_compatibility,
    GL_ARB_base_instance, GL_ARB_blend_func_extended,
    GL_ARB_color_buffer_float, GL_ARB_compressed_texture_pixel_storage,
    GL_ARB_conservative_depth, GL_ARB_copy_buffer, GL_ARB_depth_buffer_float,
.

Output of "clinfo" from the AMD APP/Stream software while using fglrx driver:
Code:
# clinfo
Number of platforms:                             1
  Platform Profile:                              FULL_PROFILE
  Platform Version:                              OpenCL 1.1 AMD-APP (831.4)
  Platform Name:                                 AMD Accelerated Parallel Processing
  Platform Vendor:                               Advanced Micro Devices, Inc.
  Platform Extensions:                           cl_khr_icd cl_amd_event_callback cl_amd_offline_devices


  Platform Name:                                 AMD Accelerated Parallel Processing
Number of devices:                               2
  Device Type:                                   CL_DEVICE_TYPE_GPU
  Device ID:                                     4098
  Board name:                                    AMD Radeon 6600M and 6700M Series
  Device Topology:                               PCI[ B#1, D#0, F#0 ]
  Max compute units:                             6
  Max work items dimensions:                     3
    Max work items[0]:                           256
    Max work items[1]:                           256
    Max work items[2]:                           256
  Max work group size:                           256
  Preferred vector width char:                   16
  Preferred vector width short:                  8
  Preferred vector width int:                    4
  Preferred vector width long:                   2
  Preferred vector width float:                  4
  Preferred vector width double:                 0
  Native vector width char:                      16
  Native vector width short:                     8
  Native vector width int:                       4
  Native vector width long:                      2
  Native vector width float:                     4
  Native vector width double:                    0
  Max clock frequency:                           485Mhz
  Address bits:                                  32
  Max memory allocation:                         134217728
  Image support:                                 Yes
  Max number of images read arguments:           128
  Max number of images write arguments:          8
  Max image 2D width:                            8192
  Max image 2D height:                           8192
  Max image 3D width:                            2048
  Max image 3D height:                           2048
  Max image 3D depth:                            2048
  Max samplers within kernel:                    16
  Max size of kernel argument:                   1024
  Alignment (bits) of base address:              2048
  Minimum alignment (bytes) for any datatype:    128
  Single precision floating point capability
    Denorms:                                     No
    Quiet NaNs:                                  Yes
    Round to nearest even:                       Yes
    Round to zero:                               Yes
    Round to +ve and infinity:                   Yes
    IEEE754-2008 fused multiply-add:             Yes
  Cache type:                                    None
  Cache line size:                               0
  Cache size:                                    0
  Global memory size:                            536870912
  Constant buffer size:                          65536
  Max number of constant args:                   8
  Local memory type:                             Scratchpad
  Local memory size:                             32768
  Kernel Preferred work group size multiple:     64
  Error correction support:                      0
  Unified memory for Host and Device:            0
  Profiling timer resolution:                    1
  Device endianess:                              Little
  Available:                                     Yes
  Compiler available:                            Yes
  Execution capabilities:                               
    Execute OpenCL kernels:                      Yes
    Execute native function:                     No
  Queue properties:                             
    Out-of-Order:                                No
    Profiling :                                  Yes
  Platform ID:                                   0x7f08709b6060
  Name:                                          Turks
  Vendor:                                        Advanced Micro Devices, Inc.
  Device OpenCL C version:                       OpenCL C 1.1
  Driver version:                                CAL 1.4.1646
  Profile:                                       FULL_PROFILE
  Version:                                       OpenCL 1.1 AMD-APP (831.4)
  Extensions:                                    cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_atomic_counters_32 cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_popcnt


  Device Type:                                   CL_DEVICE_TYPE_CPU
  Device ID:                                     4098
  Board name:                                   
  Max compute units:                             4
  Max work items dimensions:                     3
    Max work items[0]:                           1024
    Max work items[1]:                           1024
    Max work items[2]:                           1024
  Max work group size:                           1024
  Preferred vector width char:                   16
  Preferred vector width short:                  8
  Preferred vector width int:                    4
  Preferred vector width long:                   2
  Preferred vector width float:                  4
  Preferred vector width double:                 0
  Native vector width char:                      16
  Native vector width short:                     8
  Native vector width int:                       4
  Native vector width long:                      2
  Native vector width float:                     4
  Native vector width double:                    0
  Max clock frequency:                           800Mhz
  Address bits:                                  64
  Max memory allocation:                         2147483648
  Image support:                                 Yes
  Max number of images read arguments:           128
  Max number of images write arguments:          8
  Max image 2D width:                            8192
  Max image 2D height:                           8192
  Max image 3D width:                            2048
  Max image 3D height:                           2048
  Max image 3D depth:                            2048
  Max samplers within kernel:                    16
  Max size of kernel argument:                   4096
  Alignment (bits) of base address:              1024
  Minimum alignment (bytes) for any datatype:    128
  Single precision floating point capability
    Denorms:                                     Yes
    Quiet NaNs:                                  Yes
    Round to nearest even:                       Yes
    Round to zero:                               Yes
    Round to +ve and infinity:                   Yes
    IEEE754-2008 fused multiply-add:             Yes
  Cache type:                                    Read/Write
  Cache line size:                               0
  Cache size:                                    0
  Global memory size:                            4062375936
  Constant buffer size:                          65536
  Max number of constant args:                   8
  Local memory type:                             Global
  Local memory size:                             32768
  Kernel Preferred work group size multiple:     1
  Error correction support:                      0
  Unified memory for Host and Device:            1
  Profiling timer resolution:                    1
  Device endianess:                              Little
  Available:                                     Yes
  Compiler available:                            Yes
  Execution capabilities:                               
    Execute OpenCL kernels:                      Yes
    Execute native function:                     Yes
  Queue properties:                             
    Out-of-Order:                                No
    Profiling :                                  Yes
  Platform ID:                                   0x7f08709b6060
  Name:                                          Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz
  Vendor:                                        GenuineIntel
  Device OpenCL C version:                       OpenCL C 1.1
  Driver version:                                2.0
  Profile:                                       FULL_PROFILE
  Version:                                       OpenCL 1.1 AMD-APP (831.4)
  Extensions:                                    cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_device_fission cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_popcnt
.

Output of glxinfo from the primary X server while using intel driver:
Code:
# glxinfo | head -n 50
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,
    GLX_OML_swap_method, GLX_SGI_swap_control, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
    GLX_INTEL_swap_event
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_framebuffer_sRGB,
    GLX_MESA_copy_sub_buffer, GLX_MESA_multithread_makecurrent,
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control,
    GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync,
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap,
    GLX_INTEL_swap_event
GLX version: 1.4
GLX extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,
    GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control,
    GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGI_make_current_read,
    GLX_SGI_swap_control, GLX_SGI_video_sync, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
    GLX_EXT_texture_from_pixmap
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile
OpenGL version string: 2.1 Mesa 7.12-devel (git-11cdf24)
OpenGL shading language version string: 1.30
OpenGL extensions:
    GL_ARB_multisample, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color,
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_copy_texture,
    GL_EXT_polygon_offset, GL_EXT_subtexture, GL_EXT_texture_object,
    GL_EXT_vertex_array, GL_EXT_compiled_vertex_array, GL_EXT_texture,
    GL_EXT_texture3D, GL_IBM_rasterpos_clip, GL_ARB_point_parameters,
    GL_EXT_draw_range_elements, GL_EXT_packed_pixels, GL_EXT_point_parameters,
    GL_EXT_rescale_normal, GL_EXT_separate_specular_color,
    GL_EXT_texture_edge_clamp, GL_SGIS_generate_mipmap,
    GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp,
    GL_SGIS_texture_lod, GL_ARB_framebuffer_sRGB, GL_ARB_multitexture,
    GL_EXT_framebuffer_sRGB, GL_IBM_multimode_draw_arrays,
    GL_IBM_texture_mirrored_repeat, GL_3DFX_texture_compression_FXT1,
    GL_ARB_texture_cube_map, GL_ARB_texture_env_add, GL_ARB_transpose_matrix,
    GL_EXT_blend_func_separate, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays,
.

Other stuff may be added by me later as required.

Update 1: Added some more logs here.
_________________
Helium Sources || Gentoo Minimal Livecd


Last edited by hirakendu on Mon Jan 23, 2012 5:59 am; edited 1 time in total
Back to top
View user's profile Send private message
Enrico Tagliavini
n00b
n00b


Joined: 28 Oct 2008
Posts: 22

PostPosted: Sat Jan 21, 2012 1:53 pm    Post subject: Reply with quote

Thank you very very much for your infos. I really think your HowTo shoud be put in the official gentoo wiki http://wiki.gentoo.org/wiki/Main_Page .
_________________
x11-drivers/ati-drivers co-mantainer
Yes i'm the #gentoo-it official ricer. --omg-optimized FTW!
Back to top
View user's profile Send private message
d-fens
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2004
Posts: 87

PostPosted: Sat Jan 21, 2012 6:37 pm    Post subject: Reply with quote

thanks for your infos,

i will collect all the bits and pieces to get gentoo running on my vaio z21 and this helps a lot!
Back to top
View user's profile Send private message
hirakendu
Guru
Guru


Joined: 24 Jan 2007
Posts: 386
Location: san diego

PostPosted: Mon Jan 23, 2012 6:07 am    Post subject: Reply with quote

Thanks and hopefully it helps. Please feel free to wikify it (and I might myself do it if I find time and if that helps).

An issue has been created at github for bumblee support for radeon.

Also added some more logs in the 2nd post that might help (for reverse engg. or otherwise).
_________________
Helium Sources || Gentoo Minimal Livecd
Back to top
View user's profile Send private message
gyhor
n00b
n00b


Joined: 31 Jan 2012
Posts: 4

PostPosted: Tue Jan 31, 2012 9:22 am    Post subject: Reply with quote

Thanks for the information!
Could this howto be used to get the external graphic card from a sony vpc-z2 working?
That notebook has a dockingstation with an amd 6650m.
More information are in this bug report https://bugs.freedesktop.org/show_bug.cgi?id=41265

thanks
Back to top
View user's profile Send private message
Fran
Guru
Guru


Joined: 29 Feb 2004
Posts: 518
Location: Coruña (Spain)

PostPosted: Sun Feb 05, 2012 3:45 pm    Post subject: Reply with quote

Great guide. I followed the first method and got the GPUs to switch. However, the power usage I'm seeing is not as good as I expected. If I use the open source radeon driver and echo OFF > /sys/kernel/debug/vgaswitcheroo/switch, the power usage is ~12-13W (in /sys/class/power_supply/BAT0/power_now), which gives me more or less the same battery life as Windows 7. However, when using fglrx and after aticonfig --px-igpu (and restarting X), I see the consumption is around ~18W (50% more!).

Do you see the same power usage when using fglrx and choosing igpu as when using xf86-video-radeon and disabling the card via vgaswitcheroo?

(edit) Scratch that; I'm getting 11W now with fglrx. Must have been the CPU.

BTW, I don't have to change xorg.conf to swap GPUs. I have this:
Code:
Section "Device"
    Identifier      "ATI"
    Driver          "fglrx"
    BusID           "PCI:01:00:0"
EndSection

Section "Monitor"
    Identifier      "Monitor"
EndSection

Section "Screen"
    Identifier      "Screen"
    Monitor         "Monitor"
    Device          "ATI"
EndSection

Section "ServerLayout"
    Identifier      "Layout"
EndSection

whether I have selected --px-igpu or --px-dgpu. It works with both. I just need to run aticonfig and eselect opengl.

Thanks for your guide!! :)
Back to top
View user's profile Send private message
ayvango
n00b
n00b


Joined: 08 Feb 2012
Posts: 31

PostPosted: Wed Feb 08, 2012 1:37 pm    Post subject: screen 1 deleted Reply with quote

I've followed described routine.

I've build new vanilla kernel, add support for intel graphics, make it use kms as default, blacklist radeon and fgrlx. Than rebuild all drivers for new kernel.
All that work was done in a VT.

I've modprobbed manually fgrlx after reboot, have made aticonfig --px-dgpu. and have tried to startx. It fails (several times as I perform several tries ) and there are some thoughts about it further.

There were some usual errors on dri and dri2 not found (drm is now in kernel)

fgrlx was clever enough to start intel driver. Seemed fgrlx took screen0 for itself and leave the intel driver screen1. But intel was incapable to run and failed with (EE) Screen 1 deleted because no matching config section. So fgrlx was unable to continue functioning and stop self existence with a segmentation fault at address 0x4.

I've concluded that I should blame xorg and xorg.conf for incapability with fgrlx driver. Maybe other versions of xorg tolerate simple xorg.conf generated by aticonfig --initial, but my one just complains about Screen1 not configured in xorg.conf

My xorg version: 1.11.4 "ipv6 nptl tslib udev xorg -dmx -doc -kdrive -minimal -static-libs -xnes -xvfb"

I would test if I can made some changes to xorg.conf to bring it up. I'd like to find a solution though I would appreciate any help you can provide.
Back to top
View user's profile Send private message
hirakendu
Guru
Guru


Joined: 24 Jan 2007
Posts: 386
Location: san diego

PostPosted: Thu Feb 09, 2012 7:38 am    Post subject: Reply with quote

Sorry for the late replies as I probably got unsubscribed from this thread after it was moved from unsupported to tips.

@gyhor: I think it should work, given that the ATI card does show up on the pci bus (according to the lspci info in the bug report). The best bet is to use fglrx (ati proprietary) drivers and specify the busid in xorg.conf appropriately as mentioned in the howto. In this case, for example, it seems to be "PCI:16:00:0" from the bug report.

@fran: Nice that it works. I haven't tried out the aticonfig with --px-igpu or --px-dgpu. I have it always set to discrete. May be I'll try that out so that I don't have have to switch xorg.conf as well. Frankly, I mostly stick to the intel xorg.conf and disable the ati card by loading the radeon driver and vga_switcheroo. Only rarely when I require, I use the ati drivers. I also get a faint but noticeable lag with fglrx. I'll check if --px-igpu can resolve that (instead of using the intel driver).

My power usage is 9 to 11 W on battery when using only the intel driver and discrete gpu switched off -- battery life is 5 to 6 hours, which is awesome for me. Haven't checked with fglrx, but the system temperature is up to 50-55 C compared to 40-45 when on intel driver.

@ayvango: The safest and easiest way is to use fglrx. Have the intel driver with kms compiled into the kernel. You also need xf86-video-intel package, compiled with USE="-sna". Currently, the ati-drivers-12.1 do work with xf86-video-intel-2.17. The older 11.12 drivers only work with 2.15. You need to specify the bus id of your card as mentioned in the howto and also in the earlier post above by fran. Also, the opengl needs to be set to ati (eselect opengl set ati) and I think without that, the X doesn't start. If things don't work, please post a little more of the end of your Xorg.0.log where the error occurs. Lastly, I have xorg-server-1.10.4, although I think that should not matter.
_________________
Helium Sources || Gentoo Minimal Livecd
Back to top
View user's profile Send private message
ayvango
n00b
n00b


Joined: 08 Feb 2012
Posts: 31

PostPosted: Thu Feb 09, 2012 10:19 am    Post subject: Reply with quote

hirakendu wrote:
compiled with USE="-sna".

That was the matter. It is like a miracle, all works just as I thought back when getting hybrid graphics laptop. Thank you a lot.
Back to top
View user's profile Send private message
hirakendu
Guru
Guru


Joined: 24 Jan 2007
Posts: 386
Location: san diego

PostPosted: Thu Feb 09, 2012 10:49 am    Post subject: Reply with quote

@ayvango: Thanks and I really hope that fglrx supports sna in near future, since apparently the sna driver architecture has better performance and power saving. Aside, when I got this laptop, I had given up all hope of getting the muxless radeon to work in Linux, but the fglrx support for hybrid graphics (down to the interface in catalyst control center) pleasantly surprised me, given that ATI is usually behind Nvidia in terms of Linux support.
_________________
Helium Sources || Gentoo Minimal Livecd
Back to top
View user's profile Send private message
gyhor
n00b
n00b


Joined: 31 Jan 2012
Posts: 4

PostPosted: Fri Feb 10, 2012 12:10 pm    Post subject: Reply with quote

hi,

i am using ppa xorg-edgers-ppa-oneiric. How do i find out, if the xf86-video-intel driver is compiled with sna?

I tried to define the busid, but with no success. fglrx is always complaining that it doesn't find any card on busid 22 (like in the bug report)
Back to top
View user's profile Send private message
hirakendu
Guru
Guru


Joined: 24 Jan 2007
Posts: 386
Location: san diego

PostPosted: Sat Feb 11, 2012 4:43 pm    Post subject: Reply with quote

@gyhor: You may look at your /var/log/Xorg.0.log. Alternatively, look at the changelog of the repository or ask the maintainer directly. For example, the changelog from Ubuntu packages website is here and doesn't mention about sna.

You may have better luck with the stock oneiric intel driver, which is still at 2.15. You may also provide the output of your "lspci -nn", "lsmod" and the file /var/log/Xorg.0.log (if X startup fails, the older log is at Xorg.0.log.old) for some additional help.
_________________
Helium Sources || Gentoo Minimal Livecd
Back to top
View user's profile Send private message
gyhor
n00b
n00b


Joined: 31 Jan 2012
Posts: 4

PostPosted: Mon Feb 13, 2012 1:59 pm    Post subject: Reply with quote

Hi,

i reverted my system to standard xserver-xorg-video and installed the newest amd driver.

Code:

$ lspci -nn | grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09)
16:00.0 VGA compatible controller [0300]: ATI Technologies Inc Whistler XT [AMD Radeon HD 6700M Series] [1002:6740]


$ aticonfig --initial -f --adapter=all
Uninitialised file found, configuring.
PowerXpress info: Diagnostic output from /usr/lib64/fglrx/switchlibglx:
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/fglrx/ld.so.conf because link group x86_64-linux-gnu_gl_conf is broken.
update-alternatives: warning: not replacing /usr/lib/x86_64-linux-gnu/xorg/extra-modules with a link.

Using /etc/X11/xorg.conf


$ less Xorg.0.log
http://pastebin.com/31wQ8ZE5

lsmod:
Code:

$ lsmod
Module                  Size  Used by
bnep                   18144  2
rfcomm                 46622  0
bluetooth             185428  10 bnep,rfcomm
pci_stub               12622  1
vboxpci                23200  0
vboxnetadp             13382  0
vboxnetflt             23441  0
parport_pc             32688  0
ppdev                  17030  0
snd_hda_codec_hdmi     32130  2
vboxdrv               282761  3 vboxpci,vboxnetadp,vboxnetflt
snd_hda_codec_realtek   127757  1
usbhid                 46870  0
hid                    99583  1 usbhid
uvcvideo               72150  0
videobuf2_core         32760  1 uvcvideo
videodev              101959  1 uvcvideo
v4l2_compat_ioctl32    16780  1 videodev
videobuf2_vmalloc      12928  1 uvcvideo
videobuf2_memops       13230  1 videobuf2_vmalloc
joydev                 17457  0
tpm_infineon           17536  0
arc4                   12529  2
snd_hda_intel          33293  0
snd_hda_codec         122552  3 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel
snd_hwdep              13563  1 snd_hda_codec
snd_pcm                96333  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
psmouse                81991  0
serio_raw              13211  0
snd_seq_midi           13324  0
snd_rawmidi            30306  1 snd_seq_midi
snd_seq_midi_event     14899  1 snd_seq_midi
snd_seq                61520  2 snd_seq_midi,snd_seq_midi_event
snd_timer              29533  2 snd_pcm,snd_seq
snd_seq_device         14497  3 snd_seq_midi,snd_rawmidi,snd_seq
ttm                    83471  0
iwlwifi               334536  0
snd                    68237  10 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
sony_laptop            44768  0
i915                  471249  1
mac80211              506774  1 iwlwifi
tpm_tis                18687  0
drm_kms_helper         42419  1 i915
soundcore              12680  1 snd
snd_page_alloc         18484  2 snd_hda_intel,snd_pcm
drm                   252514  3 ttm,i915,drm_kms_helper
mei                    40700  0
i2c_algo_bit           13272  1 i915
video                  19097  1 i915
cfg80211              205825  2 iwlwifi,mac80211
rts_pstor             420671  0
binfmt_misc            17431  1
lp                     17759  0
parport                46354  3 parport_pc,ppdev,lp
pata_marvell           12912  0
r8169                  60839  0
ahci                   25720  2
libahci                26939  1 ahci
xhci_hcd               90107  0
dm_mirror              22020  0
dm_region_hash         20806  1 dm_mirror
dm_log                 18458  2 dm_mirror,dm_region_hash


less /etc/X11/xorg.conf
Code:

Section "ServerLayout"
        Identifier     "aticonfig Layout"
        Screen      0  "aticonfig-Screen[0]-0" 0 0
EndSection

Section "Module"
EndSection

Section "Monitor"
        Identifier   "aticonfig-Monitor[0]-0"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
EndSection

Section "Device"
        Identifier  "aticonfig-Device[0]-0"
        Driver      "fglrx"
        BusID       "PCI:22:0:0"
EndSection

Section "Screen"
        Identifier "aticonfig-Screen[0]-0"
        Device     "aticonfig-Device[0]-0"
        Monitor    "aticonfig-Monitor[0]-0"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Back to top
View user's profile Send private message
hirakendu
Guru
Guru


Joined: 24 Jan 2007
Posts: 386
Location: san diego

PostPosted: Mon Feb 13, 2012 6:44 pm    Post subject: Reply with quote

@gyhor: I am not sure as to why the BusID in the generated xorg.conf is "PCI:22:0:0", even though the lspci output shows "16:00.0". You can therefore try replacing the BusID in xorg.conf with "PCI:16:0:0" and see if you get the same error in Xorg.0.log. You may also use the simpler xorg.conf mentioned in the howto for fglrx (of course with the replaced PCI ID).
_________________
Helium Sources || Gentoo Minimal Livecd
Back to top
View user's profile Send private message
gyhor
n00b
n00b


Joined: 31 Jan 2012
Posts: 4

PostPosted: Tue Feb 14, 2012 8:49 am    Post subject: Reply with quote

Hi hirakendu,

I tried different xorg.conf configuration: minimal, with busid 16, with busid 22. everytime the same error message.
I don't know why the driver is looking on busid 22 for the card :(
But I am not the only one: https://bugs.freedesktop.org/show_bug.cgi?id=41265

regards
Back to top
View user's profile Send private message
Alexislavie
n00b
n00b


Joined: 21 Feb 2012
Posts: 1

PostPosted: Wed Feb 22, 2012 12:36 pm    Post subject: Re: screen 1 deleted Reply with quote

ayvango wrote:
I've followed described routine.

I've build new vanilla kernel, add support for intel graphics, make it use kms as default, blacklist radeon and fgrlx. Than rebuild all drivers for new kernel.
All that work was done in a VT.

I've modprobbed manually fgrlx after reboot, have made aticonfig --px-dgpu. and have tried to startx. It fails (several times as I perform several tries ) and there are some thoughts about it further.

There were some usual errors on dri and dri2 not found (drm is now in kernel)

fgrlx was clever enough to start intel driver. Seemed fgrlx took screen0 for itself and leave the intel driver screen1. But intel was incapable to run and failed with (EE) Screen 1 deleted because no matching config section. So fgrlx was unable to continue functioning and stop self existence with a segmentation fault at address 0x4.

I've concluded that I should blame xorg and xorg.conf for incapability with fgrlx driver. Maybe other versions of xorg tolerate simple xorg.conf generated by aticonfig --initial, but my one just complains about Screen1 not configured in xorg.conf

My xorg version: 1.11.4 "ipv6 nptl tslib udev xorg -dmx -doc -kdrive -minimal -static-libs -xnes -xvfb"

I would test if I can made some changes to xorg.conf to bring it up. I'd like to find a solution though I would appreciate any help you can provide.

Hi, I'm using Ubuntu 11.10 64bits and I experience the same error :

I compiled xf86-video-intel-2.15.901.tar.gz following this instructions :

Code:
apt-get build-dep xserver-xorg-video-intel
cd ~/
wget http://xorg.freedesktop.org/archive/individual/driver/xf86-video-intel-2.15.901.tar.gz
tar -xzvf xf86-video-intel-2.15.901.tar.gz
cd xf86-video-intel-2.15.901
sudo ./autogen.sh --prefix=/usr --enable-sna
sudo make && make install


After that I followed that guide to install Catalyst Driver 12.1 (http://wiki.cchtml.com/index.php/Ubuntu_Oneiric_Installation_Guide)

Code:
sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 wget execstack libelfg0 dh-modaliases linux-headers-generic
sudo apt-get install ia32-libs
sudo ln -svT lib /usr/lib64
cd ~/; mkdir catalyst12.1; cd catalyst12.1/
wget http://www2.ati.com/drivers/linux/amd-driver-installer-12-1-x86.x86_64.run
chmod +x amd-driver-installer-12-1-x86.x86_64.run
sudo sh ./amd-driver-installer-12-1-x86.x86_64.run --buildpkg Ubuntu/oneiric
sudo dpkg -i fglrx*.deb
sudo aticonfig --initial -f


Then I did reboot, but X failed to start, while trying to launch it with a tty console X always shows me this error :
(EE) Screen 1 deleted because no matching config section.
..........
segmentation fault at address 0x4.

I deleted /etc/X11/xorg.conf, then entered startx and Xorg was able to start but not with fglrx. I tried to edit manually my xorg.conf but nothing works.
Actually when the xorg.conf that aticonfig --initial created is present I can switch between the 2 gpu with aticonfig --px-igpu or aticonfig --px-dgpu so the driver switch works, the GL libraries switch works too. But with this xorg.conf present X fails to start. I also checked the PCI thing in xorg.conf and the one generated is good and correspond to my ATI 6630M PCI port.

What can I do ? Did I miss something to do ?
Are there others Intel packages I should compile with --enable-sna option ?

Thanks in advance for your answer.


*: And sorry if my english is not perfect, I'm French.
Back to top
View user's profile Send private message
Fran
Guru
Guru


Joined: 29 Feb 2004
Posts: 518
Location: Coruña (Spain)

PostPosted: Thu Mar 29, 2012 7:43 pm    Post subject: Reply with quote

Seems like 12.3 supports the latest intel drivers :). Right now I have them working with 2.18.
Back to top
View user's profile Send private message
tenspd137
Guru
Guru


Joined: 22 Aug 2006
Posts: 368

PostPosted: Thu Apr 19, 2012 5:43 am    Post subject: Reply with quote

Hi

Excellent guide - I have everything working on a HP dv7 w/ a ATI 7690. Right now I just log in and use startx. When I try to exit back to the console, it just freezes with a black screen - can't do anything except turn power off then on. Anyone else have this problem and / or suggestions for a solution? Thanks!

EDIT/UPDATE - It appears not to be a problem with drivers, but with twm (ugh) which I first installed while following the Xorg install guide. I jeust put open box on, and I can log out of it with no problems. Thanks again for the info above!
Back to top
View user's profile Send private message
ayvango
n00b
n00b


Joined: 08 Feb 2012
Posts: 31

PostPosted: Sat Aug 11, 2012 8:54 pm    Post subject: Re: screen 1 deleted Reply with quote

Alexislavie wrote:

Code:
apt-get build-dep xserver-xorg-video-intel
cd ~/
wget http://xorg.freedesktop.org/archive/individual/driver/xf86-video-intel-2.15.901.tar.gz
tar -xzvf xf86-video-intel-2.15.901.tar.gz
cd xf86-video-intel-2.15.901
sudo ./autogen.sh --prefix=/usr --enable-sna
sudo make && make install

you should not use sna, fglrx doesn't support it. Try to compile with --disable-sna

I've tried recent ati-drivers (12.6^d) with newest intel driver (>2.20). It doesn't work. It is still working with 2.19 driver. gentoo users may mask this intel drivers version to avoid X server failures.
Back to top
View user's profile Send private message
hirakendu
Guru
Guru


Joined: 24 Jan 2007
Posts: 386
Location: san diego

PostPosted: Sun Aug 12, 2012 7:13 pm    Post subject: Reply with quote

@ayvango:

Thanks for verifying that. Last time I checked (with intel-2.19.0 and fglrx-12.4), SNA was still not working. So I was a little confused when I came across an Ubuntu forums howto that says to enable SNA, but didn't have the opportunity to follow up on that.
_________________
Helium Sources || Gentoo Minimal Livecd
Back to top
View user's profile Send private message
Yminus
Apprentice
Apprentice


Joined: 06 Jan 2008
Posts: 167

PostPosted: Fri Jul 12, 2013 9:38 pm    Post subject: Reply with quote

@hirakendu

Thank you for the howto. I tried the second method, (radeon) but it did not work.

My hardware:
3rd Gen Core processor Graphics Controller [8086:166] by Intel
Chelsea LP [Radeon HD 7730M] [1002:682F] by ATI

Code:
lspci -nn | grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09)
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI Chelsea LP [Radeon HD 7730M] [1002:682f]


Installed software:
sys-kernel/gentoo-sources-3.8.13
sys-kernel/linux-firmware-20130421
x11-drivers/xf86-video-intel-2.20.13 (dri glamor sna udev uxa xvmc)
x11-drivers/xf86-video-ati-7.0.0 (glamor udev)
x11-base/xorg-server-1.14.2 (dmx ipv6 kdrive nptl suid udev xnest xorg xvfb -doc -minimal -selinux -static-libs -tslib)
x11-libs/libdrm-2.4.46
media-libs/mesa (classic egl gallium gbm gles1 gles2 llvm nptl openvg python_single_target_python2_7 python_targets_python2_7 shared-glapi vdpau video_cards_i915 video_cards_i965 video_cards_intel video_cards_radeon xa xvmc -bindist -debug -kernel_FreeBSD -osmesa -pax_kernel -pic -python_single_target_python2_6 -python_targets_python2_6 -r600-llvm-compiler -selinux -video_cards_nouveau -video_cards_r100 -video_cards_r200 -video_cards_r300 -video_cards_r600 -video_cards_radeonsi -video_cards_vmware -wayland -xorg)
x11-misc/virtualgl-2.3.2 (from speckins/usr-local-portage

Kernel config:
Code:
CONFIG_DRM_I915=y
CONFIG_DRM_RADEON=m
CONFIG_VGA_SWITCHEROO=y
CONFIG_DEBUG_FS=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE="radeon/ARUBA_me.bin radeon/ARUBA_pfp.bin radeon/ARUBA_rlc.bin radeon/BARTS_mc.bin radeon/BARTS_me.bin radeon/BARTS_pfp.bin radeon/BTC_rlc.bin radeon/CAICOS_mc.bin radeon/CAICOS_me.bin radeon/CAICOS_pfp.bin radeon/CAYMAN_mc.bin radeon/CAYMAN_me.bin radeon/CAYMAN_pfp.bin radeon/CAYMAN_rlc.bin radeon/CEDAR_me.bin radeon/CEDAR_pfp.bin radeon/CEDAR_rlc.bin radeon/CYPRESS_me.bin radeon/CYPRESS_pfp.bin radeon/CYPRESS_rlc.bin radeon/JUNIPER_me.bin radeon/JUNIPER_pfp.bin radeon/JUNIPER_rlc.bin radeon/PALM_me.bin radeon/PALM_pfp.bin radeon/PITCAIRN_ce.bin radeon/PITCAIRN_mc.bin radeon/PITCAIRN_me.bin radeon/PITCAIRN_pfp.bin radeon/PITCAIRN_rlc.bin radeon/R600_rlc.bin radeon/R700_rlc.bin radeon/REDWOOD_me.bin radeon/REDWOOD_pfp.bin radeon/REDWOOD_rlc.bin radeon/SUMO2_me.bin radeon/SUMO2_pfp.bin radeon/SUMO_me.bin radeon/SUMO_pfp.bin radeon/SUMO_rlc.bin radeon/TAHITI_ce.bin radeon/TAHITI_mc.bin radeon/TAHITI_me.bin radeon/TAHITI_pfp.bin radeon/TAHITI_rlc.bin radeon/TURKS_mc.bin radeon/TURKS_me.bin radeon/TURKS_pfp.bin radeon/VERDE_ce.bin radeon/VERDE_mc.bin radeon/VERDE_me.bin radeon/VERDE_pfp.bin radeon/VERDE_rlc.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware/"


Other configs:
/etc/modprobe.d/blacklist.conf:
Code:
blacklist radeon
blacklist fglrx


/etc/conf.d/modules
Code:

modules="kvm kvm-intel i915"


Code:
eselect opengl list
Available OpenGL implementations:
  [1]   xorg-x11 *


/boot/grub/grub.conf:
Code:
kernel /boot/linux-3.8.13 root=/dev/mapper/vg_lars_laptop-root rootfstype=ext4 video=uvesafb:off video=vesafb:off splash=verbose,theme:natural_gentoo video=1920x1200 acpi_osi="!Windows 2012" init=/sbin/bootchartd console=tty1 debug modprobe.blacklist=fglrx,radeon i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1
initrd /boot/initramfs


I used your /etc/X11/xorg.conf.pxp with no modifications.

However, when I use your pxp_run.bash the primary X server freezes.

Xorg.8.log

x11-drivers/xf86-video-ati-7.1.0
x11-drivers/xf86-video-ati-7.0.0
Code:

[   995.498] (++) using VT number 9

[   995.498] (II) [KMS] Kernel modesetting enabled.
[   995.498] (II) RADEON(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[   995.498] (==) RADEON(0): Depth 24, (--) framebuffer bpp 32
[   995.498] (II) RADEON(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
[   995.498] (==) RADEON(0): Default visual is TrueColor
[   995.498] (==) RADEON(0): RGB weight 888
[   995.498] (II) RADEON(0): Using 8 bits per RGB (8 bit DAC)
[   995.498] (--) RADEON(0): Chipset: "VERDE" (ChipID = 0x682f)
[   995.498] (II) Loading sub module "dri2"
[   995.498] (II) LoadModule: "dri2"
[   995.499] (II) Module "dri2" already built-in
[   995.499] (II) Loading sub module "shadow"
[   995.499] (II) LoadModule: "shadow"
[   995.499] (II) Loading /usr/lib64/xorg/modules/libshadow.so
[   995.500] (II) Module shadow: vendor="X.Org Foundation"
[   995.500]    compiled for 1.14.2, module version = 1.1.0
[   995.500]    ABI class: X.Org ANSI C Emulation, version 0.4
[   995.500] (II) RADEON(0): KMS Color Tiling: disabled
[   995.500] (II) RADEON(0): KMS Color Tiling 2D: disabled
[   995.500] (II) RADEON(0): KMS Pageflipping: enabled
[   995.500] (II) RADEON(0): SwapBuffers wait for vsync: enabled
[   995.500] (WW) RADEON(0): No outputs definitely connected, trying again...
[   995.500] (WW) RADEON(0): Unable to find connected outputs - setting 1024x768 initial framebuffer
[   995.500] (II) RADEON(0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated.
[   995.500] (II) RADEON(0): mem size init: gart size :1fbdf000 vram size: s:80000000 visible:7fcc0000
[   995.500] (II) RADEON(0): EXA: Driver will allow EXA pixmaps in VRAM
[   995.500] (==) RADEON(0): DPI set to (96, 96)
[   995.500] (II) Loading sub module "fb"
[   995.500] (II) LoadModule: "fb"
[   995.500] (II) Loading /usr/lib64/xorg/modules/libfb.so
[   995.500] (II) Module fb: vendor="X.Org Foundation"
[   995.500]    compiled for 1.14.2, module version = 1.0.0
[   995.500]    ABI class: X.Org ANSI C Emulation, version 0.4
[   995.500] (II) Loading sub module "ramdac"
[   995.500] (II) LoadModule: "ramdac"
[   995.500] (II) Module "ramdac" already built-in
[   995.500] (EE) RADEON(0): No modes.
[   995.500] (II) UnloadModule: "radeon"
[   995.500] (II) UnloadSubModule: "fb"
[   995.500] (II) Unloading fb
[   995.501] (II) UnloadSubModule: "shadow"
[   995.501] (II) Unloading shadow
[   995.501] (EE) Screen(s) found, but none have a usable configuration.
[   995.501] (EE)
Fatal server error:
[   995.501] (EE) no screens found(EE)
[   995.501] (EE)


x11-drivers/xf86-video-ati-6.14.6-r1
Code:

[  1895.775] (++) using VT number 9

[  1895.775] (EE) No devices detected.
[  1895.775] (EE)
Fatal server error:
[  1895.776] (EE) no screens found(EE)
[  1895.776] (EE)


My Intel card alone works as expected.

glxinfo:
Code:

direct rendering: Yes
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile

_________________
Göögle is evil!
To protect your privacy search the net with
https://www.ixquick.com
Back to top
View user's profile Send private message
Yminus
Apprentice
Apprentice


Joined: 06 Jan 2008
Posts: 167

PostPosted: Fri Jul 12, 2013 11:10 pm    Post subject: Reply with quote

I can't emerge x11-drivers/ati-drivers-13.4:

Code:
emerge -av ati-drivers

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] x11-proto/xf86miscproto-0.9.3  0 kB
[ebuild     UD ] x11-base/xorg-server-1.13.4:0/1.13.4 [1.14.2:0/1.14.2] USE="dmx ipv6 kdrive nptl suid udev xnest xorg xvfb -doc -minimal (-selinux) -static-libs -tslib" 0 kB
[ebuild  N     ] x11-drivers/ati-drivers-13.4:1  USE="modules (multilib) qt4 -debug -disable-watermark -pax_kernel -static-libs" 0 kB

Total: 3 packages (1 downgrade, 2 new), Size of downloads: 0 kB

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

x11-base/xorg-server:0

  (x11-base/xorg-server-1.14.2::gentoo, installed) pulled in by
    x11-base/xorg-server:0/1.14.2= required by (x11-drivers/xf86-video-vesa-2.3.2-r1::gentoo, installed)
    x11-base/xorg-server:0/1.14.2= required by (x11-drivers/xf86-input-synaptics-1.6.3::gentoo, installed)
    x11-base/xorg-server:0/1.14.2= required by (x11-drivers/xf86-video-fbdev-0.4.3-r1::gentoo, installed)

  (x11-base/xorg-server-1.13.4::gentoo, ebuild scheduled for merge) pulled in by
    <=x11-base/xorg-server-1.13.49[-minimal] required by (x11-drivers/ati-drivers-13.4::gentoo, ebuild scheduled for merge)


And if I try x11-drivers/ati-drivers-13.6_beta my X server crashes, although I build x11-drivers/xf86-video-intel -sna and compiled kernel DRM as module.

Downgrading xf86-video-intel does not work:
Code:
emerge -av "=xf86-video-intel-2.19.0"

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     UD ] x11-base/xorg-server-1.13.4:0/1.13.4 [1.14.2:0/1.14.2] USE="dmx ipv6 kdrive nptl suid udev xnest xorg xvfb -doc -minimal (-selinux) -static-libs -tslib" 0 kB
[ebuild     UD ] x11-drivers/xf86-video-intel-2.19.0 [2.20.13] USE="dri glamor -sna* (-udev%*) (-uxa%*) (-xvmc%*)" 1,429 kB

Total: 2 packages (2 downgrades), Size of downloads: 1,429 kB

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

x11-base/xorg-server:0

  (x11-base/xorg-server-1.14.2::gentoo, installed) pulled in by
    x11-base/xorg-server:0/1.14.2= required by (x11-drivers/xf86-video-vesa-2.3.2-r1::gentoo, installed)
    x11-base/xorg-server:0/1.14.2= required by (x11-drivers/xf86-input-synaptics-1.6.3::gentoo, installed)
    x11-base/xorg-server:0/1.14.2= required by (x11-drivers/xf86-video-fbdev-0.4.3-r1::gentoo, installed)

  (x11-base/xorg-server-1.13.4::gentoo, ebuild scheduled for merge) pulled in by
    <x11-base/xorg-server-1.13.49 required by (x11-drivers/xf86-video-intel-2.19.0::gentoo, ebuild scheduled for merge)


Seems like my only option is to use the radeon driver to disable this crappy piece of ATI hardware.
_________________
Göögle is evil!
To protect your privacy search the net with
https://www.ixquick.com
Back to top
View user's profile Send private message
Yminus
Apprentice
Apprentice


Joined: 06 Jan 2008
Posts: 167

PostPosted: Sun Jul 14, 2013 10:19 pm    Post subject: Reply with quote

I think I managed to get it working.

Beyond Linux® From Scratch - Version 2013-07-13
Chapter 24. X Window System Environment - Xorg-7.7 Testing and Configuration

Quote:
Hybrid Graphics

Hybrid Graphics is still in experimental state for Linux. Xorg Developers have developed a technology called PRIME that can be used for switching between integrated and muxless discrete GPU at will. Automatic switching is not possible at the moment.

In order to use PRIME for GPU switching, make sure that you are using Linux Kernel 3.4 or later (recommended). You will need latest DRI and DDX drivers for your hardware and Xorg Server 1.13 or later with an optional patch applied.

Xorg Server should load both GPU drivers automaticaly. In order to run a GLX application on a discrete GPU, you will need to export the DRI_PRIME=1 environment variable. For example,

Code:
DRI_PRIME=1 glxinfo | egrep "(OpenGL vendor|OpenGL renderer|OpenGL version)"

will show OpenGL vendor, renderer and version for the discrete GPU.

If the last command reports same OpenGL renderer with and without DRI_PRIME=1, you will need to check your installation.


For me the last command reports same OpenGL renderer with and without DRI_PRIME=1:

Code:
DRI_PRIME=1 glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile
OpenGL version string: 3.0 Mesa 9.1.4
OpenGL shading language version string: 1.30
OpenGL extensions:


But it makes a difference with glxgears:

Code:
glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
303 frames in 5.0 seconds = 60.505 FPS
301 frames in 5.0 seconds = 60.113 FPS

With DGP powered off:
Code:
DRI_PRIME=1 glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
11550 frames in 5.0 seconds = 2309.990 FPS
11588 frames in 5.0 seconds = 2317.498 FPS

With DGP powered on:
Code:
DRI_PRIME=1 glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
22764 frames in 5.0 seconds = 4551.014 FPS
22661 frames in 5.0 seconds = 4532.134 FPS


Seems like it works out of the box!?!

Here are the changes to my setup as described 2 posts above:

Installed software:

  • sys-kernel/gentoo-sources-3.8.13
  • sys-kernel/linux-firmware-20130530
  • x11-drivers/xf86-video-intel-2.20.13 (dri glamor sna udev uxa xvmc)
  • x11-drivers/xf86-video-ati-7.1.0 (glamor udev)
  • x11-base/xorg-server-1.14.2 (dmx ipv6 kdrive nptl suid udev xnest xorg xvfb -doc -minimal -selinux -static-libs -tslib)
  • x11-libs/libdrm-2.4.46
  • media-libs/mesa (classic egl gallium gbm gles1 gles2 llvm nptl openvg python_single_target_python2_7 python_targets_python2_7 shared-glapi vdpau video_cards_i915 video_cards_i965 video_cards_intel video_cards_radeon xa xvmc -bindist -debug -kernel_FreeBSD -osmesa -pax_kernel -pic -python_single_target_python2_6 -python_targets_python2_6 -r600-llvm-compiler -selinux -video_cards_nouveau -video_cards_r100 -video_cards_r200 -video_cards_r300 -video_cards_r600 -video_cards_radeonsi -video_cards_vmware -wayland -xorg)


Kernel config:
Code:
CONFIG_DRM_I915=y
CONFIG_DRM_I915_KMS=y
CONFIG_DRM_RADEON=m
CONFIG_DRM_RADEON_KMS=y
CONFIG_VGA_SWITCHEROO=y
CONFIG_DEBUG_FS=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE="radeon/ARUBA_me.bin radeon/ARUBA_pfp.bin radeon/ARUBA_rlc.bin radeon/BARTS_mc.bin radeon/BARTS_me.bin radeon/BARTS_pfp.bin radeon/BTC_rlc.bin radeon/CAICOS_mc.bin radeon/CAICOS_me.bin radeon/CAICOS_pfp.bin radeon/CAYMAN_mc.bin radeon/CAYMAN_me.bin radeon/CAYMAN_pfp.bin radeon/CAYMAN_rlc.bin radeon/CEDAR_me.bin radeon/CEDAR_pfp.bin radeon/CEDAR_rlc.bin radeon/CYPRESS_me.bin radeon/CYPRESS_pfp.bin radeon/CYPRESS_rlc.bin radeon/CYPRESS_uvd.bin radeon/HAINAN_ce.bin radeon/HAINAN_mc.bin radeon/HAINAN_me.bin radeon/HAINAN_pfp.bin radeon/HAINAN_rlc.bin radeon/JUNIPER_me.bin radeon/JUNIPER_pfp.bin radeon/JUNIPER_rlc.bin radeon/OLAND_ce.bin radeon/OLAND_mc.bin radeon/OLAND_me.bin radeon/OLAND_pfp.bin radeon/OLAND_rlc.bin radeon/PALM_me.bin radeon/PALM_pfp.bin radeon/PITCAIRN_ce.bin radeon/PITCAIRN_mc.bin radeon/PITCAIRN_me.bin radeon/PITCAIRN_pfp.bin radeon/PITCAIRN_rlc.bin radeon/R600_rlc.bin radeon/R700_rlc.bin radeon/REDWOOD_me.bin radeon/REDWOOD_pfp.bin radeon/REDWOOD_rlc.bin radeon/RV710_uvd.bin radeon/SUMO2_me.bin radeon/SUMO2_pfp.bin radeon/SUMO_me.bin radeon/SUMO_pfp.bin radeon/SUMO_rlc.bin radeon/SUMO_uvd.bin radeon/TAHITI_ce.bin radeon/TAHITI_mc.bin radeon/TAHITI_me.bin radeon/TAHITI_pfp.bin radeon/TAHITI_rlc.bin radeon/TAHITI_uvd.bin radeon/TURKS_mc.bin radeon/TURKS_me.bin radeon/TURKS_pfp.bin radeon/VERDE_ce.bin radeon/VERDE_mc.bin radeon/VERDE_me.bin radeon/VERDE_pfp.bin radeon/VERDE_rlc.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware/"


Other configs:

I don't blacklist radeon in /etc/modprobe.d/blacklist.conf or grub.conf anymore.

/boot/grub/grub.conf:
Code:
kernel /boot/linux-3.8.13 root=/dev/mapper/vg_lars_laptop-root rootfstype=ext4 video=uvesafb:off video=vesafb:off splash=verbose,theme:natural_gentoo video=1920x1200 acpi_osi="!Windows 2012" init=/sbin/bootchartd console=tty1 debug i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1
initrd /boot/initramfs


I have no xorg.conf, just some HID related configs in /etc/X11/xorg.conf.d/.

To power-off my DGP at boot time I used /etc/local.d/pwrOffDGP.start (don't forget to make it executable) :
Code:
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch


But in future I will use acpid to power it off on battery power only.
_________________
Göögle is evil!
To protect your privacy search the net with
https://www.ixquick.com
Back to top
View user's profile Send private message
ayvango
n00b
n00b


Joined: 08 Feb 2012
Posts: 31

PostPosted: Mon Jul 15, 2013 8:44 pm    Post subject: CONFIG_DRM must be disabled Reply with quote

I've build recent fglrx drivers (x11-drivers/ati-drivers-13.6_beta) and got warning:

Code:

*   CONFIG_DRM must be disabled or compiled as a module and not loaded for direct
*      rendering to work.


How can I disable drm without disabling intel video itself?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum