Giter VIP home page Giter VIP logo

switcheroo-control's Introduction

switcheroo-control's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

jprvita

switcheroo-control's Issues

Fail to start on MacBook 6,2

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

switcheroo control is missing dependency on on also

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.

Force turn off discrete GPU on startup

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.

switcheroo control should ship method to fix grub loader

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.

Fails on UEFI Fedora 29 boot and with manual systemctl

$ 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

Doesn't work on Dell 3576

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.

Switcharoo doesn't work with MacBook Pro (Retina, 15-inch, Mid 2015)

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?

After resume discrete card must be turned off again

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,

No graphical switch if not restarted manually

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.