Moved to https://gitlab.freedesktop.org/hadess/switcheroo-control/
hadess / switcheroo-control Goto Github PK
View Code? Open in Web Editor NEWD-Bus service to check the availability of dual-GPU
D-Bus service to check the availability of dual-GPU
switcheroo-control fail to start on MacBook 6,2
# cat /sys/kernel/debug/vgaswitcheroo/switch
0:DIS-Audio: :Pwr:0000:01:00.1
1:IGD: :Pwr:0000:00:02.0
2:DIS:+:Pwr:0000:01:00.0
If the systm starts on IGD, and discreet in enabled, if you DO NOT turn of the discreet before alsa starts, the system locks up
switcheroo control must depend on:
Before=multi-user.target display-manager.target alsa-restore.service alsa-state.service
To correctly ensure that discreet/igd is disabled before alsa starts to prevent lockup.
This can be reproduced on mbp 8,2 with efi set to intel.
From http://article.gmane.org/gmane.comp.video.dri.devel/149144
GD and DIGD switch to the integrated GPU and also turn off the discrete
GPU. However if the machine is already switched to the integrated GPU,
the commands are no-ops and the discrete GPU is not turned off.
In other words you need to check (by reading the switch file) which GPU
the machine is switched to. If it's the integrated GPU, write OFF to the
switch file. If it's the discrete GPU, write DIGD to the switch file.
Once runtime pm works, writing DIGD is sufficient.
If the system boots on igd with grub set to "rhgb", then display-manager will not start and system locks (even if you OFF the discreet card, or leave it enabled)
As a result, the only method to boot is to remove rhgb from grub to prevent display change issues.
switcheroo-control should disable "rhgb" on systems to prevent display locking issues on startup.
$ sudo G_MESSAGES_DEBUG=all /usr/sbin/switcheroo-control
** (process:5244): WARNING **: 13:23:29.119: switcheroo-control could not query vga_switcheroo status: Operation not permitted
$ dmesg|grep -i switcheroo
[ 4.220215] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG0.PEGP handle
[ 4.452955] vga_switcheroo: enabled
[ 40.331900] Lockdown: switcheroo-cont: debugfs is restricted; see man kernel_lockdown.7
$ journalctl -g switcheroo
-- Logs begin at Sat 2019-02-23 18:08:53 CET, end at Tue 2019-02-26 13:29:06 CET. --
Feb 23 18:59:48 localhost.localdomain kernel: VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG0.PEGP handle
Feb 23 18:59:48 localhost.localdomain kernel: vga_switcheroo: enabled
Feb 23 18:05:15 localhost.localdomain systemd[1]: Starting Switcheroo Control Proxy service...
Feb 23 18:05:15 localhost.localdomain kernel: Lockdown: switcheroo-cont: debugfs is restricted; see man kernel_lockdown.7
Feb 23 18:05:16 localhost.localdomain switcheroo-cont[781]: switcheroo-control could not query vga_switcheroo status: Operation not permitted
Feb 23 18:05:16 localhost.localdomain systemd[1]: switcheroo-control.service: Main process exited, code=exited, status=1/FAILURE
Feb 23 18:05:16 localhost.localdomain systemd[1]: switcheroo-control.service: Failed with result 'exit-code'.
Feb 23 18:05:16 localhost.localdomain systemd[1]: Failed to start Switcheroo Control Proxy service.
Feb 23 18:05:16 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=switcheroo-control c>
-- Reboot --
Feb 24 22:41:48 localhost.localdomain kernel: VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG0.PEGP handle
Feb 24 22:41:48 localhost.localdomain kernel: vga_switcheroo: enabled
Feb 24 21:42:19 localhost.localdomain systemd[1]: Starting Switcheroo Control Proxy service...
Feb 24 21:42:20 localhost.localdomain kernel: Lockdown: switcheroo-cont: debugfs is restricted; see man kernel_lockdown.7
Feb 24 21:42:20 localhost.localdomain switcheroo-cont[875]: switcheroo-control could not query vga_switcheroo status: Operation not permitted
Feb 24 21:42:20 localhost.localdomain systemd[1]: switcheroo-control.service: Main process exited, code=exited, status=1/FAILURE
Feb 24 21:42:20 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=switcheroo-control c>
Feb 24 21:42:20 localhost.localdomain systemd[1]: switcheroo-control.service: Failed with result 'exit-code'.
Feb 24 21:42:20 localhost.localdomain systemd[1]: Failed to start Switcheroo Control Proxy service.
-- Reboot --
Feb 26 13:35:02 localhost.localdomain kernel: VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG0.PEGP handle
Feb 26 13:35:02 localhost.localdomain kernel: vga_switcheroo: enabled
Feb 26 12:35:38 localhost.localdomain systemd[1]: Starting Switcheroo Control Proxy service...
Feb 26 12:35:38 localhost.localdomain kernel: Lockdown: switcheroo-cont: debugfs is restricted; see man kernel_lockdown.7
Feb 26 12:35:38 localhost.localdomain switcheroo-cont[863]: switcheroo-control could not query vga_switcheroo status: Operation not permitted
Feb 26 12:35:38 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=switcheroo-control c>
Feb 26 12:35:38 localhost.localdomain systemd[1]: switcheroo-control.service: Main process exited, code=exited, status=1/FAILURE
Feb 26 12:35:38 localhost.localdomain systemd[1]: switcheroo-control.service: Failed with result 'exit-code'.
Feb 26 12:35:38 localhost.localdomain systemd[1]: Failed to start Switcheroo Control Proxy service.
Feb 26 13:22:59 localhost.localdomain sudo[5210]: rick : TTY=pts/2 ; PWD=/home/rick ; USER=root ; COMMAND=/usr/bin/gdbus introspect --system --dest net.hadess.Switc>
Feb 26 13:23:29 localhost.localdomain audit[5242]: USER_CMD pid=5242 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home>
Feb 26 13:23:29 localhost.localdomain sudo[5242]: rick : TTY=pts/2 ; PWD=/home/rick ; USER=root ; ENV=G_MESSAGES_DEBUG=all ; COMMAND=/usr/sbin/switcheroo-control
Hi,
My Linux system boots to a black screen when this package is installed, I have tested this issue on Fedora 28, 29 Beta, Ubuntu 18.04/18.04.1 and Ubuntu 18.10 Beta. My system is 8th gen core i7 and has AMD Radeon 520 as discrete card. Once i remove this package, i can boot and start the system fine.
Is it a known bug? if so any hot fix i can do with? if not please let me know how i can help to help debug this and if i need to provide anything else.
"The [Microsoft Surface Book's] keyboard contains [...] its graphical processing unit [...]"
From https://bugzilla.redhat.com/show_bug.cgi?id=1476366
As it stands, this is working as expected. When secureboot is on, debugfs is
locked down. Per the patch, "Normal device interaction should be done through
configfs or a miscdev, not debugfs." I think something needs to be done for
vgaswitcheroo for secureboot.
We'll need to adapt to whatever the new method will be.
I have a MacBook Pro (Retina, 15-inch, Mid 2015) 2.5 GHz with a AMD Radeon R9 M370X, https://support.apple.com/kb/sp719?locale=en_US
I run Fedora 25 Beta with the swicharoo-control installed. However, the swicharoo-control doesn't seem to run after boot. And the Details window show "Gallium 0.4 on AMD CAPE VERDE (DRM 2.46.0 / 4.8.6-300.fc25.x86_64, LLVM 3.8.0)"
Is it supposed to be able to handle this at all? Is there something I can do to help you to debug it, if it is supposed to be possible to get it up and running?
README.md links to https://developer.gnome.org/switcheroo-control/1.0/ but that URL isn't live yet.
After a resume on an MBP 8,2, the discreet card reactivates.
After a result the "inactive" card should be powered off, IE resume should trigger "OFF > vgaswitcheroo" to guarantee the discreet is disabled,
Hopefully in a cleaned up way so that the Details settings panel can show both.
Hello,
Like what I've written in the title, switcheroo-control does not propose "Launch......" in gnome if not restarted.
The thing is, the systemd unit is loaded and running (it didn't failed to start). (the unit is of course enabled).
I tried the debug like said in the README.md, but the thing is that there si no error!
The machine is a dell inspiron 5548 under debian testing gnome 3.28.2 and the 1.2-1 version of the switcheroo-control package in the repositories, with a amd radeon r7 m265 with kernel option in grub: GRUB_CMD_LINUX_DEFAULT="quiet radeon.si_support=0 amdgpu.si_support=1 apparmor=1 security=apparmor"
The radeon and amgpu options are to use the amdgpu driver instead of radeon's one for my OLAND card and it works when switheroo-control want (which I assume uses prime).
Sorry because I don't speak english very well.
As done in fprintd, bluez, and iio-sensor-proxy.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.