Announcement

Collapse
No announcement yet.

Hybrid ATI/ATI - Intel/ATI solution: small switcheroo how to

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by rmartinez View Post
    the only thing is that when you turn off the computer with one of the cards turned off; then, when you turn on the computer again the fan runs at full speed. So, to avoid this I also made a script "switch_before_shutdown.sh".
    Since I switch off the discrete card during boot process (/etc/rc.d/c.local) the fan stays quiet.

    cya

    Comment


    • #32
      Originally posted by paul! View Post
      Since I switch off the discrete card during boot process (/etc/rc.d/c.local) the fan stays quiet.

      cya
      Thanks, it works great to avoid choosing every time the integrated card when the computer is initiated. So I did:
      Code:
      $ sudo gedit /etc/rc.d/rc.local
      And added the following lines:
      Code:
      mount -t debugfs none /sys/kernel/debug
      echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
      But even though it serves to avoid choosing the initial card configuration, it does not resolve the fan problem. I made some reboots and saw that the fan running at full speed only happens when I turn off the computer (not when rebooting) while having the integrated card ON and functioning, and the discrete card OFF. To avoid this I must be with the integrated card OFF and the discrete ON and functioning, or with both cards ON.

      That is why I still need the script that before turning off the computer checks and turns ON both cards.

      Comment


      • #33
        Why don't you mount debugfs in the fstab? Also whats the output of:

        ls -l /sys/kernel/debug/vgaswitcheroo/switch

        Comment


        • #34
          Originally posted by Kano View Post
          Why don't you mount debugfs in the fstab?
          Yes, that could be a good alternative. Thanks.

          Also whats the output of:

          ls -l /sys/kernel/debug/vgaswitcheroo/switch
          -rw-r--r-- 1 root root 0 2010-03-05 09:03 /sys/kernel/debug/vgaswitcheroo/switch

          Why?

          Comment


          • #35
            Well when it would not be root:root but something in another group like video or so then you would not need root rights just in the correct group. It would be more logical to use root:video 664 or so.

            Comment


            • #36
              Originally posted by Kano View Post
              Well when it would not be root:root but something in another group like video or so then you would not need root rights just in the correct group. It would be more logical to use root:video 664 or so.
              Mmm... Good! I will try that and post after launch! Thanks.

              Comment


              • #37
                Originally posted by Kano View Post
                Well when it would not be root:root but something in another group like video or so then you would not need root rights just in the correct group. It would be more logical to use root:video 664 or so.
                I have been reading a little bit and I found this:

                Mount options for debugfs
                The debugfs file system is a pseudo file system, traditionally mounted on /sys/kernel/debug. There are no mount options. (*)

                So, if there are no options to mount debugfs, how can I mount it so that it gives other permission? I got to mount it with fstab with this line:
                Code:
                 none /sys/kernel/debug debugfs default 0 0
                But no matter what options I tested (other than "default"), it has always has same permissions. What I'm doing wrong? Or because it has no mounting options the default cannot be changed?

                Comment


                • #38
                  The permission/owner/groups are most likely set in the driver itself. Ask the author.

                  Comment


                  • #39
                    I got it!! With just this line added at rc.local you can then switch cards without being su:
                    Code:
                    chown "username" /sys/kernel/debug/vgaswitcheroo/switch
                    Now I'm almost there to make the "switch_between_cards.sh" utilizable to normal user without being su! I just have to find something to replace the "sudo killall -u 'username'" to logout...

                    Comment


                    • #40
                      That's a stupid hack but would work. Why not change the kernel code? Btw. do you know

                      kill -9 -1

                      Do not try as root!

                      Comment


                      • #41
                        And I can replace "sudo killall -u 'username'" with "gnome-session-save --logout".
                        So now, no need to be root or use sudo! Great, thank for your suggestions Kano. Now I will change the scrip from the HowTo.

                        Comment


                        • #42
                          Several days have passed since I have installed linux and I have found a trouble with wine. None of apps under wine could use 3D acceleration. Niether OpenGL apps nor DirectX.

                          Comment


                          • #43
                            Originally posted by Kreastr View Post
                            Several days have passed since I have installed linux and I have found a trouble with wine. None of apps under wine could use 3D acceleration. Niether OpenGL apps nor DirectX.
                            using 64bit?
                            well at least i had the problem with proprietary drivers, but maybe its different for the oss driver.

                            Comment


                            • #44
                              Yes, 64 bit. I had messages like:
                              fixme:win:EnumDisplayDevicesW ((null),0,0x33e1e4,0x00000000), stub!
                              fixme:d3d:WineD3D_ChoosePixelFormat Add OpenGL context recreation support to SetDepthStencilSurface
                              fixme:d3d:debug_fbostatus Unrecognied FBO status 0x00000000
                              fixme:d3d:check_fbo_status FBO status unrecognized (0)
                              fixme:d3d:IWineD3DDeviceImpl_CreateQuery (0x137620) Event query: Unimplemented, but pretending to be supported
                              fixme:d3d9:IDirect3DDevice9Impl_CreateSurface (0x133cd8) call to IWineD3DDevice_CreateSurface failed
                              fixme:d3d93D9CB_CreateSurface (0x133cd8) IDirect3DDevice9_CreateSurface failed
                              fixme:d3d:IWineD3DDeviceImpl_CreateTexture Failed to create surface 0x9751090
                              fixme:d3d9:IDirect3DDevice9Impl_CreateTexture (0x133cd8) call to IWineD3DDevice_CreateTexture failed
                              fixme:d3d:debug_fbostatus Unrecognied FBO status 0x00000000
                              fixme:d3d:check_fbo_status FBO status unrecognized (0)
                              fixme:d3d:IWineD3DDeviceImpl_CreateQuery (0x137620) Event query: Unimplemented, but pretending to be supported

                              After I did export LIBGL_DRIVERS_PATH=/usr/lib32/dri/
                              I have another bunch of errors:

                              fixme:d3d:IWineD3DImpl_FillGLCaps OpenGL implementation supports 16 vertex samplers and 16 total samplers
                              fixme:d3d:IWineD3DImpl_FillGLCaps Expected vertex samplers + MAX_TEXTURES(=8) > combined_samplers
                              fixme:win:EnumDisplayDevicesW ((null),0,0x33e1e4,0x00000000), stub!
                              fixme:d3d:WineD3D_ChoosePixelFormat Add OpenGL context recreation support to SetDepthStencilSurface
                              fixme:d3d:IWineD3DDeviceImpl_CreateQuery (0x136e08) Event query: Unimplemented, but pretending to be supported
                              fixme:d3d9:IDirect3DDevice9Impl_CreateSurface (0x133b10) call to IWineD3DDevice_CreateSurface failed
                              fixme:d3d93D9CB_CreateSurface (0x133b10) IDirect3DDevice9_CreateSurface failed
                              fixme:d3d:IWineD3DDeviceImpl_CreateTexture Failed to create surface 0xa1f02b0
                              fixme:d3d9:IDirect3DDevice9Impl_CreateTexture (0x133b10) call to IWineD3DDevice_CreateTexture failed
                              fixme:d3d:IWineD3DDeviceImpl_CreateQuery (0x136e08) Event query: Unimplemented, but pretending to be supported

                              Or something like this:

                              wine: Unhandled page fault on read access to 0x00340000 at address 0x4016da (thread 0044), starting debugger...
                              Unhandled exception: page fault on read access to 0x00340000 in 32-bit code (0x004016da).

                              Comment


                              • #45
                                I am trying to adapt the same switcheroo functionality on Ubuntu Lucid with Asus M51TR notebook with hd3200/hd3470 adapters and am following that guide to compile the kernel from gid:
                                http://blog.avirtualhome.com/2010/05...-lucid-kernel/
                                and have some difficulties understanding the whole picture with the patches for that functionality from Airlied. Where /in the guide/ exactly have to apply the patches /I suppose that the "0001..." and "0002..." shows the sequence by itself../ and which kernel should I checkout from git.
                                Thanks in advance. If someone didn't noticed already I'm almost a complete newbie

                                P.S. In one of the comments in your blogpost here an user "ER" said that the switcheroo functionality is already compiled in the kernel after 2.6.34, but I still have no "/sys/kernel/debug/vgaswitcheroo" folder and I have 2.6.35 installed.

                                P.S.2 I am bulgarian, excuse me for my English if there's errors...

                                Comment

                                Working...
                                X