Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Change of service #1

Merged
merged 2 commits into from

2 participants

@mib1982

Dear Fred,
you did a great piece of work there. I forked it, because since a recent update of the radeon-driver HDMI-Audio is supported on Archlinux (The distro I am using).

This HDMI-Audio-support led to freezes during the shutdown of my system. (alsa-store service failed and couldn't be killed.)

I hope my additions are useful.
Regards,
Michael

Michael added some commits
Michael 1.1 12042ea
Michael 1.1 727657c
@fredoche
Owner

Thank you for sharing your improvements, and the updated documentation, i'm working on a gnome shell plugin to switch the state of the graphics, i'll post that here soon, if you're interested.

@fredoche fredoche merged commit d42ec08 into fredoche:master
@mib1982
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 19, 2012
  1. 1.1

    Michael authored
  2. 1.1

    Michael authored
This page is out of date. Refresh to see the latest.
View
11 README.md
@@ -7,13 +7,13 @@ I will happily accept pull requests if anyone knows a better way to achieve the
Description
===========
-This project consists of two files: A systemd service definition file, and a simple shell script which will issue the right command to turn the graphic adapter OFF.
+This project consists of three files: A systemd service definition file, and two simple shell scripts which will issue the right command to turn the graphic adapter OFF on booting and ON on shutdown. To turn the graphic adapter back on upon shutdown is neccessary, because otherwise it may lead to freezes when saving your alsa-levels.
Installation
============
-After cloning, move nodis.sh to the /root directory, and vgaswitcheroo.service to /lib/systemd/system/ . After that, issue the following command as root to enable the service on startup.
-```# systemctl enable plop.service```
+After cloning, move *.sh to the /usr/bin/ directory, and vgaswitcheroo.service to /lib/systemd/system/ . After that, issue the following command as root to enable the service on startup.
+```# systemctl enable vgaswitcheroo.service```
Usage
=====
@@ -22,8 +22,9 @@ This should be enough. If you need to check whether it's working or not, you can
```cat /sys/kernel/debug/vgaswitcheroo/switch```
The expected output should show that the DIScrete adapter is off.
```
-0:DIS: :Off:0000:01:00.0
-1:IGD:+:Pwr:0000:00:02.0
+0:IGD:+:Pwr:0000:00:02.0
+1:DIS-Audio: :Off:0000:01:00.1
+2:DIS: :Off:0000:01:00.0
```
View
2  nodis.sh
@@ -1,2 +0,0 @@
-#! /bin/sh
-echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
View
5 vgaswitcheroo.service
@@ -2,7 +2,10 @@
Description=Deactivate the discrete graphic
[Service]
-ExecStart=/root/nodis.sh
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/vgaswitcheroo_start.sh
+ExecStop=/usr/bin/vgaswitcheroo_stop.sh
[Install]
WantedBy=multi-user.target
View
4 vgaswitcheroo_start.sh
@@ -0,0 +1,4 @@
+#! /bin/sh
+modprobe radeon
+echo DIGD > /sys/kernel/debug/vgaswitcheroo/switch
+echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
View
2  vgaswitcheroo_stop.sh
@@ -0,0 +1,2 @@
+#! /bin/sh
+echo ON > /sys/kernel/debug/vgaswitcheroo/switch
Something went wrong with that request. Please try again.