Comments (13)
Hi @katef thanks for the reply. Bummer about the dGPU - I haven't been able to get it to shut off either yet. I wonder if using the 4.8.6 kernel will make a difference? Apparently it has more recently added support AMDGPU, Radeon, i915 etc.
from gpu-switch.
Ah, I booted rEFInd's USB flash image, which has an option to run apple_set_os
and then continue to run grub from my EFI partition. That worked just fine - the integrated graphics works, and now I see it on the PCI bus:
what# lshw -c video
*-display UNCLAIMED
description: VGA compatible controller
product: Venus XT [Radeon HD 8870M / R9 M270X/M370X]
vendor: Advanced Micro Devices, Inc. [AMD/ATI]
physical id: 0
bus info: pci@0000:01:00.0
version: 83
width: 64 bits
clock: 33MHz
capabilities: pm pciexpress msi vga_controller bus_master cap_list
configuration: latency=0
resources: memory:80000000-8fffffff memory:b0c00000-b0c3ffff ioport:3000(size=256) memory:b0c40000-b0c5ffff
*-display
description: VGA compatible controller
product: Crystal Well Integrated Graphics Controller
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 08
width: 64 bits
clock: 33MHz
capabilities: msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:49 memory:b0000000-b03fffff memory:a0000000-afffffff ioport:4000(size=64) memory:c0000-dffff
I don't want to install rEFInd to my disk's EFI partition, but I think it's using this EFI thing which just sets apple_set_os
and then chainloads another EFI bootloader: https://github.com/0xbb/apple_set_os.efi
So I'll try that instead of using rEFInd from a USB device.
Meanwhile I have the same question: why is the ATI card visible on my PCI bus? Is it really that both cards are enabled?
Thanks,
from gpu-switch.
Hi,
yes both cars are enabled.
Linux may will support dynamically switching between both cards in the future.
Meanwhile you could use cat /sys/kernel/debug/vgaswitcheroo/switch
to see which card is active and echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
to switch of the unused dedicated card.
from gpu-switch.
Hi,
Sorry it's taken me a while to get back to you.
I'm currently trying to figure out why /sys/kernel/debug/vgaswitcheroo
doesn't exist.
I'm running a kernel with:
CONFIG_VGA_SWITCHEROO=y
and I have grub booting with /etc/default/grub:
GRUB_CMDLINE_LINUX_DEFAULT="quiet nosplash i915.modeset=1 radeon.modeset=1"
which indeed I see in dmesg:
[ 0.000000] Linux version 4.6.4 (root@what) (gcc version 6.2.0 20160822 (Debian 6.2.0-1) ) #1 SMP Mon Aug 29 00:10:39 BST 2016
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.6.4 root=UUID=c70a8075-c8f3-4047-a33c-bbbdfcfb22a1 ro libata.force=noncq quiet nosplash i915.modeset=1 radeon.modeset=1
yet nothing here:
# ls /sys/kernel/debug/vgaswitcheroo
ls: cannot access '/sys/kernel/debug/vgaswitcheroo': No such file or directory
Any idea what I might be missing? Thank you!
from gpu-switch.
Hi all, @0xbb THANKS for putting this together!
I had the same problems as you @katef (MBP 11,5) - also got it working via rEFind and apple_set_os. By 'working' I mean the system can use both graphics cards whilst in debian.
@katef have you been able to use just the intel integrated graphics card only (and disable the dedicated GPU) yet?
Also, are proprietary drivers required to be able to just boot into the os using integrated card or can this be done completely open source?
Thanks :-)
from gpu-switch.
Hi @neutral888 - No, I'm not able to disable the discrete GPU, because /sys/kernel/debug/vgaswitcheroo
does not exist for me. I haven't been able to find why it's not present.
So currently I'm using the Intel GPU, but the dedicated GPU is not disabled.
from gpu-switch.
Hi everyone and @katef
I have been able to switch off the dGPU and use only the iGPU using the following commands:
sudo mount -t debugfs debugfs /sys/kernel/debug -> this mounts vgaswitcheroo
sudo cat /sys/kernel/debug/vgaswitcheroo/switch -> this shows what is being used
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch -> this turns off the GPU that doesn't have the + sign next to it. (must be done in root, not just via sudo).
Only problem now is that this has lead to no longer being able to adjust brigtness settings.
Any ideas anyone?
from gpu-switch.
It probably picks the wrong backlight driver, try finding the gmux one in /sys and setting the brightness by writing to the brightness file.
from gpu-switch.
Thanks for the reply, @ah-
/sys/class/backlight contains gmux-backlight and radeon_bl0
I am able to adjust the brightness with the backlight file in gmux-backlight!
How do I link it to my brightness buttons and refer them to changing the setting in this file?
ps sorry for my newbie question
from gpu-switch.
Sorry, I don't know. I just remember having the same issue myself a long time ago.
from gpu-switch.
Hi all,
I also have a MacBook Pro 11,5 and running Void Linux with Linux 4.11.11.
I have a blackscreen when I disable DIS and enable IDG.
I have macOS 10.12.6 and use apple_set_os.efi.
Any idea what could be the problem ?
Thanks in advance
Regards
from gpu-switch.
I have a MacBook Pro 11,5 and it runs perfectly
from gpu-switch.
@neutral888 I know this question is ancient at this point, and I hope by now you've figured it out, but I hope it'll help someone else if it doesn't help you. I made the following script after studying all of the comments on these links:
https://askubuntu.com/questions/812734/macbook-pro-backlight-control-not-working-on-ubuntu-16-04
https://bugzilla.kernel.org/show_bug.cgi?id=105051
I have to run this every now and then after kernel updates, but it's still working as of this post.
cd ~/
mkdir brightness-fix
cd brightness-fix
# grab copy of source
curl -O https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.8.7.tar.xz
tar xf linux-4.8.7.tar.xz
cd linux-4.8.7/drivers/platform/x86
# patch it
curl -o file.patch https://bugzilla.kernel.org/attachment.cgi?id=218051
patch apple-gmux.c < file.patch
# build it
echo '
obj-m += apple-gmux.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
' > Makefile
make
# install
targetDir="/lib/modules/$(uname -r)/kernel/drivers/platform/x86"
sudo cp ${targetDir}/apple-gmux.ko ${targetDir}/apple-gmux.ko.backup
sudo cp apple-gmux.ko ${targetDir}
cd ~/
rm -r ./brightness-fix
reboot
This worked for me on Ubuntu Gnome 16.04 last year, and has since been working on Linux Mint 18.3
from gpu-switch.
Related Issues (20)
- Feedback: Works on Macbook Pro 5,1 HOT 4
- Run as daemon on OSX
- Booting into macOS reverts windows settings HOT 1
- Intended Behavior Question
- does it work in single-user mode?
- How I can now wich GPU is being used HOT 3
- When I switch between nGPU and iGPU, the gefore gpu and fb is disconnect with power, how did that?
- Win 10 Bootcamp Intel HD 630: Constant flicker HOT 2
- Feedback: Works on MacBook Pro 11.5 with macOS 10.14.5 Mojave(MacBook Pro Retina 15-inch, 2015 mid ) HOT 5
- Couldn't mount 'efivarfs' on Linux HOT 3
- Request: EFI version? HOT 2
- Please develop for legacy BIOS Windows 10 HOT 2
- set back to default? HOT 1
- Flickering Windows logo screen on start HOT 2
- Does not work on 2012 "Retina" MacBook Pro (10,100)
- how to use with macbook pro mid 2014 and no black screen
- Does this work on the MacBook Pro 16" 2019? HOT 2
- This link does not work anymore.
- Does this work for Macbook with dead Radeon GPU I disabled?
- Dear old professional friends, the 2019 macbookpro16 asks you to help solve the problem, thank you
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpu-switch.