It's obvious that the old method we use is not reliable anymore, my assumption is that when using the power-saving mode, it will call the Intel driver through the fglrx driver. This yet needs to be confirmed with driver experts.
From the diff between the Performance and the Power-saving mode, there are some clues that might be helpful for us to re-write the code:
AMD:
(II) Loading /usr/lib/x86_64-linux-gnu/xorg/extra-modules/modules/extensions/libglx.so
(II) Module glx: vendor="Advanced Micro Devices, Inc."
Intel:
(II) Loading /usr/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
(==) AIGLX enabled
---------------------------
AMD:
(II) fglrx(0): pEnt->device->identifier=0x7f5ce7a6ab50
(II) intel(1): pEnt->device->identifier=(nil)
Intel:
(II) fglrx(0): pEnt->device->identifier=0x7f08a9456b50
(II) intel(1): Using Kernel Mode Setting driver: i915_bpo, version 1.6.0 20150522
(II) intel(1): SNA compiled: xserver-xorg-video-intel-lts-vivid 2:2.99.917-1~exp1ubuntu2.2~trusty1 (Timo Aaltonen <email address hidden>)
(II) intel(1): SNA compiled for use with valgrind
(II) intel(1): pEnt->device->identifier=(nil)
---------------------------
AMD:
(II) fglrx(0): PowerXpress: Discrete GPU is selected.
Intel:
(II) fglrx(0): PowerXpress: Integrated GPU is selected.
...
(II) fglrx(0): Turned off the discrete card
It's obvious that the old method we use is not reliable anymore, my assumption is that when using the power-saving mode, it will call the Intel driver through the fglrx driver. This yet needs to be confirmed with driver experts.
From the diff between the Performance and the Power-saving mode, there are some clues that might be helpful for us to re-write the code:
AMD: x86_64- linux-gnu/ xorg/extra- modules/ modules/ extensions/ libglx. so
(II) Loading /usr/lib/
(II) Module glx: vendor="Advanced Micro Devices, Inc."
Intel: xorg/modules/ extensions/ libglx. so
(II) Loading /usr/lib/
(II) Module glx: vendor="X.Org Foundation"
(==) AIGLX enabled
------- ------- ------- ------ >identifier= 0x7f5ce7a6ab50 >identifier= (nil)
AMD:
(II) fglrx(0): pEnt->device-
(II) intel(1): pEnt->device-
Intel: >identifier= 0x7f08a9456b50 xorg-video- intel-lts- vivid 2:2.99. 917-1~exp1ubunt u2.2~trusty1 (Timo Aaltonen <email address hidden>) >identifier= (nil)
(II) fglrx(0): pEnt->device-
(II) intel(1): Using Kernel Mode Setting driver: i915_bpo, version 1.6.0 20150522
(II) intel(1): SNA compiled: xserver-
(II) intel(1): SNA compiled for use with valgrind
(II) intel(1): pEnt->device-
------- ------- ------- ------
AMD:
(II) fglrx(0): PowerXpress: Discrete GPU is selected.
Intel:
(II) fglrx(0): PowerXpress: Integrated GPU is selected.
...
(II) fglrx(0): Turned off the discrete card