3

I have notebook hp dm3-2015er with two graphic cards.

$ lspci | grep VGA
01:05.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RS880M [Mobility Radeon HD 4225/4250]
02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Park [Mobility Radeon HD 5430]

Both powered.

$ sudo cat /sys/kernel/debug/vgaswitcheroo/switch
0:IGD:+:Pwr:0000:01:05.0
1:DIS: :Pwr:0000:02:00.0

But executing of echo OFF > /sys/kernel/debug/vgaswithceroo/switch leads to kernel failure or something. I have to shut down by holding power button. I'm new to linux so I don't know where to find messages shown before freezing. Please help.

Braiam
  • 66,947
  • 30
  • 177
  • 264
user2418306
  • 131
  • 3

1 Answers1

0

The correct command isn't OFF but IGD. If you Exerpt from the wiki:

Once you've ensured that vga_switcheroo is available, you can use these options to switch between GPUs. Be prepared for a lockup (either immediately, or after a minute), the existence of this file does not mean that the machine is supported.

echo ON > /sys/kernel/debug/vgaswitcheroo/switch

^ Turns on the GPU that is disconnected (not currently driving outputs), but does not switch outputs.

echo IGD > /sys/kernel/debug/vgaswitcheroo/switch

^ Connects integrated graphics with outputs.

echo DIS > /sys/kernel/debug/vgaswitcheroo/switch

^ Connects discrete graphics with outputs.

echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

^ Turns off the graphics card that is currently disconnected.

You should run then sudo sh -c "echo DIS > /sys/kernel/debug/vgaswitcheroo/switch" to switch to the discrete graphics card. For switching back to full power use sudo sh -c "echo IGD > /sys/kernel/debug/vgaswitcheroo/switch".

To look into kernel failures message, you should check the /var/log/kern.log.0 and /var/log/dmesg.0.

Braiam
  • 66,947
  • 30
  • 177
  • 264
  • IGD, DIS and ON commands make no effect at all. There are no failure messages in /var/log/*. Also I installed linux-crushdump but it's not catching `oops` for some reason too. – user2418306 Sep 15 '13 at 13:48
  • @user2418306 when you say "no effect" care to elaborate? It shouldn't return anything. If you do `IGD` or `DIS` then `sudo cat /sys/kernel/debug/vgaswitcheroo/switch` then you will notice the change. – Braiam Sep 15 '13 at 14:02
  • I did `sudo cat /sys/kernel/debug/vgaswitcheroo/switch` after each of three commands but it (output) stays the same. That's what I mean by no effect. – user2418306 Sep 15 '13 at 15:02
  • Do you do the calls starting with `sudo`? The complete command should be `sudo sh -c "echo ON > /sys/kernel/debug/vgaswitcheroo/switch"`, replacing `ON` with the desired command. – Braiam Sep 15 '13 at 15:05
  • Yes, I did exactly so. – user2418306 Sep 15 '13 at 15:11
  • Then that smells like bug to me... – Braiam Sep 15 '13 at 15:12
  • How can I write a bug report, without failure message? – user2418306 Sep 15 '13 at 15:15
  • I recommend you reading [this](http://askubuntu.com/q/5121/169736) and [this](http://askubuntu.com/q/23714/169736). – Braiam Sep 15 '13 at 15:17