Announcement

Collapse
No announcement yet.

Simple graphics switching through BIOS

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

  • #16
    Originally posted by Bucic View Post
    I'm on it but are you sure you got the part with 'dmesg' right? First - AFAIK it's a command, not a set of files. Second - there are no such files in /var/log even on my mature system.
    Hi, yes, dmesg is a command and also log files (dmesg.1, dmesg.2, dmesg.tar.gz) that are autosaved by logrotate I think. Thats what on my Ubuntu and Debian machines.
    They are in "/var/log/.." and are text files/archives.
    Dmesg-command is a binary in "/bin/dmesg", on contrast. Do not confuse.

    I remember that if you use Fedora, there is systemd and now there should be different way/location. You can ask Google or IRC of Fedora how to capture your kernel and Xorg logs.
    Thats basically what step above did - clean them, do steps leading to the problem, and then submit the logs with crash info.

    Comment


    • #17
      It looks like it's /var/log/messages* files in Fedora.

      Comment


      • #18
        Here are the logs
        http://sdrv.ms/13Ev09t

        Comment


        • #19
          Hi, Here is what I would do in your case :
          Create 2 separate boot options, one for intel graphics and one for AMD, both of these entries have a different (random) command line parameter. in this case, let's assume intel and catalyst.
          the kernel command line can be accessed through /proc/cmdline.
          Now prepare two xorg.conf files. name one xorg.conf.intel, the other xorg.conf.catalyst. As their names imply, one should work when you want the intel card, the other with the AMD card.
          now the fun part. to switch at runtime, we must create a script. something along the lines of
          Code:
          #!/bin/bash
          if [ "$1" = "start" ];then
          grep -o catalyst /proc/cmdline && cp /etc/X11/xorg.conf.catalyst /etc/xorg.conf
          grep -o intel    /proc/cmdline && cp /etc/X11/xorg.conf.intel    /etc/xorg.conf
          fi
          if [ "$1" = "stop" ];then
          rm /etc/X11/xorg.conf
          fi
          put this script somewhere in your system. Now we must create a systemd unit file for it :
          Code:
          [Unit]
          Description=switch xorg.conf
          
          [Service]
          Type=oneshot
          ExecStart=/path/to/script/script.name.sh start
          ExecStop=/path/to/script/script.name.sh stop
          
          
          [Install]
          WantedBy=multi-user.target
          put this unit file into /etc/systemd/system named as xorg-switch.service. enable it using sytemctl enable xorg-switch.service
          note that this approach isn't very safe, nor is this a copy & paste guide. This is more of a braindump of how I would go about your issue which, from what I gather, is mostly changing the X configuration depending on the BIOS setting. If not, please be more specific.

          Serafean.

          Comment


          • #20
            According to logs:
            Code:
            [     6.184] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Apr 28 15:22:13 2013
            [     6.184] (==) Using config file: "/etc/X11/xorg.conf"
            [     6.184] (==) Using config directory: "/etc/X11/xorg.conf.d"
            [     6.184] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
            [     6.184] (==) ServerLayout "aticonfig Layout"
            [     6.184] (**) |-->Screen "aticonfig-Screen[0]-0" (0)
            [     6.184] (**) |   |-->Monitor "aticonfig-Monitor[0]-0"
            [     6.184] (**) |   |-->Device "aticonfig-Device[0]-0"
            And then fglrx proceeds seeking device, finds none and Xorg aborts with screens not found.
            My understanding is that fglrx has installed own static "xorg.conf.d" Xorg session config in
            /usr/share/X11/xorg.conf.d
            and it disables autoprobing for intel driver. Given that the radeon card is disabled and only fglrx session is laid out, after fglrx aborts, Xorg is left without screens.

            When you use radeon driver+intel, they rely on Xorg automatic configuration. Unlike fglrx, they don't need static config.
            What you need, if I am correct, granted you want to keep fglrx, is to have two video card static configuration (session layouts). One for intel driver (which needs to be created), another for fglrx.
            So that, after fglrx finds no adapters, Xorg proceeds loading Intel driver, which should return a screen.

            The good news is that its just plain configuration files issue, nothing messed in your system.
            The bad news, is that I have never had configuration with multiple video cards in the system, configured via xorg.conf.d way.

            The best way would be to open a bug by fedora bugtracker.

            Open a bug containing words "Intel + fglrx, IBM T500, muxed" and attach all logs there.
            Would be also nice, if you archive and attach all files from /usr/share/X11/xorg.conf.d/
            Copy the full problem description you filled under your linked post in first thread.

            Then they will be able hopefully to give you direct instructions/configs to copy into your system.

            The majority of solutions for your T500 laptop on internet configure BIOS VGA to discrete, then use either radeon or fglrx.<
            Last edited by brosis; 04-28-2013, 06:02 PM.

            Comment


            • #21
              Originally posted by Serafean View Post
              Hi, Here is what I would do in your case :
              .
              .
              .

              Serafean.
              Thanks for the outline but I don't think it's the right aproach to test this, at least initially. You focused on automation while we don't even have the system "back from AMD to Intel". IMHO we should figure out what to do in the first place to boot the system with installed fglrx back into Intel, manually. From what I see you think xorg.conf is the blocker here. I think you're wrong, as brosis noted the log file says:
              Code:
              Using config directory: "/etc/X11/xorg.conf.d"

              Originally posted by brosis View Post

              The best way would be to open a bug by fedora bugtracker.
              Won't it be outright invalid? I downgraded x server for instance (to install the catalyst legacy 13.1)... The issue was present on all unmodified distros I've tried during the past year on the other hand. I also hope they won't send me over to AMD forums, like ubuntu folks did.
              Last edited by Bucic; 04-28-2013, 06:17 PM.

              Comment


              • #22
                Bug submitted:
                https://bugzilla.redhat.com/show_bug.cgi?id=957546

                Comment


                • #23
                  Originally posted by Bucic View Post
                  Seen it. Yes, indeed there is one static device section from Catalyst.
                  Granted, we solve this, there are also other things to consider - for example which provider offers libGL*..
                  When using opensource drivers, libGL usually just points to radeon, nouveau or intel's mesa. But it could be different with fglrx. I don't know which libgl does it use, nor I know if fglrx replaces any vital components, which are used by Intel driver as well.

                  I can recommend you try two things:
                  - try to use OpenSUSE, according to [1], Suse/OpenSUSE has long supported ability to automatically use several cards.
                  - try to contact user "Kano" on phoronix. He is knows GPU-switching through and through

                  Meanwhile, try to add this.
                  In terminal (replace "gedit" with your editor) open a new file:
                  sudo dbus-launch gedit /usr/share/X11/xorg.conf.d/01-intel.conf

                  Paste and save following content:
                  Code:
                  Section "Device"
                  	Identifier  "Videocard1"
                  	Driver      "intel"
                  EndSection
                  This should make you boot, but I seriously doubt if any OpenGL acceleration(needed for composite desktop, effects etc) will work, since it might be still routed to fglrx's version of libGL.
                  There is a lot to read on googling for "fglrx + intel", mostly mention vga switcheroo, which in your case has little effect because you have muxing videocards. But you CAN combine hprofile with method from Serafean and solve the issue!

                  But the most "magic" moment for me is why isn't Fedora supporting something like that out of the box with autodetection...
                  The whole case is pretty much "Ubuntu"-like, meaning polished designed system, that is inflexible and requires Gentoo-like hacking when it comes to passing it onto specific hardware...

                  Comment


                  • #24
                    I don't get why you need Fedora. Fedora has IMHO no infrastructure to switch parallel installed gfx stacks. But Debian has em, therefore i have got an implementation for Kanotix that can do that in live mode AND on hd installs. The CeBIT Special iso images however would not help you directly as there i used fglrx 13.2 beta 7, but it works with a slightly different gfxdetect package also for fglrx-legacy drivers. If you want to use Fedora you could try using the amd tool for switching gfx drivers - but that usually works in a way where the package management is not involved. The logical consequence is when you have got mesa in package updates it stops working.

                    Comment


                    • #25
                      brosis,
                      Since you've mentioned the libGl*... Recently I've uninstalled the catalyst to see if such a crude way would get me to desktop with Intel gr. enabled. It did! I issued the following command
                      Code:
                      su -c 'yum remove akmod-catalyst-legacy-* xorg-x11-drv-catalyst-legacy* xorg-x11-drv-catalyst-legacy-libs'
                      It got me to my desktop all right, but with unacceptable performance. It could indicate a mess with some libs. In the future, how could I acquire information from such impaired system, which would help diagnose this?

                      Kano,
                      If Debian has the infrastructure (I'm not sure what you mean here), then why the primitive switching didn't work on Ubuntu? As for my choice to stick to Fedora - I wouldn't want to turn my distro-world upside down just because of this, especially that I've never heard of the switching in question working on any distro.

                      I'm thinking of doing this
                      http://www.phoronix.com/scan.php?pag...tem&px=MTM1NzM
                      and linking the gathered info to the bug I reported.

                      Comment


                      • #27
                        Originally posted by Bucic View Post
                        Thanks for the outline but I don't think it's the right aproach to test this, at least initially. You focused on automation while we don't even have the system "back from AMD to Intel". IMHO we should figure out what to do in the first place to boot the system with installed fglrx back into Intel, manually. From what I see you think xorg.conf is the blocker here. I think you're wrong, as brosis noted the log file says:
                        Code:
                        Using config directory: "/etc/X11/xorg.conf.d"


                        Won't it be outright invalid? I downgraded x server for instance (to install the catalyst legacy 13.1)... The issue was present on all unmodified distros I've tried during the past year on the other hand. I also hope they won't send me over to AMD forums, like ubuntu folks did.
                        Right, silly me. I completely forgot that catalyt completely replaces the GL implementation. I have no idea how taht happens in other distro than Gentoo or Arch. On Gentoo, both are installed side by side and can be selected by running "eselect opengl set [xorg-x11|ati]" Something in that respect would also need to be done on Fedora. No idea about how other distros fare in this regard.

                        xorg.conf.d is parsed only is xorg.conf doesn't exist. (or at least that's how it should be)
                        especially that I've never heard of the switching in question working on any distro.
                        I guarantee (from experience) that it works 100% reliably in Gentoo. Sabayon being a Gentoo derivative, I suppose it should work there too.

                        Comment


                        • #28
                          As I thought. My bug report has been closed
                          It's a closed source driver issue. We can't support fglrx, fglrx bugs should be
                          directed to AMD.

                          Comment


                          • #29
                            https://wiki.archlinux.org/index.php...Xpress_support

                            With a modification of fedora's mesa/libGL and Catalyst packages, this approach is doable. No idea how it works with BIOS switching though. I strongly suggest you start thinking about trying out different distros to find one with runtime libGl switching, since that seems to be the main blocker.

                            Serafean

                            Comment


                            • #30
                              Originally posted by Serafean View Post
                              https://wiki.archlinux.org/index.php...Xpress_support

                              With a modification of fedora's mesa/libGL and Catalyst packages, this approach is doable. No idea how it works with BIOS switching though. I strongly suggest you start thinking about trying out different distros to find one with runtime libGl switching, since that seems to be the main blocker.

                              Serafean
                              Thanks, but since I need the fglrx only for gaming* the dual-boot scenario, Fedora as main system + other distro with LXDE for gaming, seems like a piece of cake right now when compared to the dreadful "switch to another distro"

                              Since both ubuntu and redhat people rejected my bug report I posted it here http://devgurus.amd.com/community/general_discussions (waiting for admin approval).

                              * in fact my poor intel graphics provides superrior desktop performance to AMD Catalyst (Gnome Shell, browser, video...)!

                              _______________________________
                              Thank you all for participation and presenting your suggestions! I really appreciate it.

                              I wonder, is it possible that some of you would tell me how to fix the system configuration with Intel after Catalyst drivers have been uninstalled. Like I said earlier, I managed to unistall the Catalyst and boot into desktop with Intel, but with extremely poor performance.

                              This would let me restore my current system to the productivity-optimized configuration with Intel, so I could proceed with installing another distro for gaming without loosing anything I currently have got, configured and working.
                              Last edited by Bucic; 04-29-2013, 01:51 PM.

                              Comment

                              Working...
                              X