Hey guys,
I'm on Ubuntu 12.04 and whenever I add the chown line to rc.local and reboot it simply freezes citing something about kernel safety.
So, any fix for this?
Hey guys,
I'm on Ubuntu 12.04 and whenever I add the chown line to rc.local and reboot it simply freezes citing something about kernel safety.
So, any fix for this?
I have found the following issues when following the instructions at https://help.ubuntu.com/community/HybridGraphics:
-----------------------------------------------------------------
To have permanent write permissions to the switch file, add the following line, replacing USERNAME with your username, to /etc/init.d/rc.local:
chown USERNAME /sys/kernel/debug/vgaswitcheroo/switch
-----------------------------------------------------------------
I do not add the above command to /etc/init.d/rc.local, i simply just chown the above file. adding the line into the rc.local file does nothing at all for me and prevents me from using the script to create a laucher and results in me running sudo su in the terminal first followed by the switchcards.sh command.
In addition to solve some dependencies I have add the following to the top of the script:
Note: Thanks to druellan (i have adapted his addition and removed the gnome-session-quit option)Code:if [ $EUID != 0 ]; then gksudo "$0" "$@" exit $? fi
Finally if you want to resolve the brightness issue on boot you can do this by issuing the following commands from terminal:
Note: change $User with your nameCode:chown $User /sys/class/backlight/acpi_video0/brightness echo 1 > /sys/class/backlight/acpi_video0/brightness
regards
sean
Last edited by onefthemany; September 21st, 2012 at 09:15 AM.
don't install the AMD graphics driver as it still has issues. out of the box 3D should work if you simply follow my instructions.
if however you feel the urge to use the AMD graphics driver you could try the following:
https://help.ubuntu.com/community/BinaryDriverHowto/ATI
but if I was you I wouldn't touch it with a barge pole, as to date, I have had no success and have to terminal at boot and delete the conf file
good luck
Last edited by onefthemany; September 21st, 2012 at 09:12 AM.
Hello!!
I have the same problem, I can't switch to discrete graphics. My laptop, a HP G62, has an IGD Ati HD4250 and a DIS Ati HD5470 GPU. Also, I'm running Ubuntu 12.04 64 bits.
The "vgaswitcheroo" is active and the file "switch" in /sys/kernel/debug/vgaswitcheroo exists.
My etc/rc.local:
My etc/fstab:Code:#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. chown albert /sys/kernel/debug/vgaswitcheroo/switch echo OFF > /sys/kernel/debug/vgaswitcheroo/switch exit 0
With the command "echo OFF > /sys/kernel/debug/vgaswitcheroo/switch" I can turn off the DIS card with the benefits of less temperature and more battery life.Code:# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 # / was on /dev/sda6 during installation UUID=3b4c963d-b5af-462a-b9fa-15b78a141a5c / ext4 errors=remount-ro 0 1 # /home was on /dev/sda7 during installation UUID=6faa099c-6611-4ee0-9bef-58a78263b182 /home ext4 defaults 0 2 # swap was on /dev/sda8 during installation UUID=2979ae78-d12a-4558-8e60-32e967e6d4b1 none swap sw 0 0 tmpfs /dev/shm tmpfs defaults 0 0 none /sys/kernel/debug debugfs defaults 0 0
Furthermore, with " echo ON > /sys/kernel/debug/vgaswitcheroo/switch" I can turn on the DIS card.
But is in this point where I get stuck. Commands "echo DIS > /sys/kernel/debug/vgaswitcheroo/switch" and "echo DDIS > /sys/kernel/debug/vgaswitcheroo/switch" don't do anything.
Also if I try the scripts posted in this thread (similar to this one http://asusm51ta-with-linux.blogspot.com.es/) they don't logout automatically and if I logout manually the laptop freezes with a black screen.
Then the only way to recover Ubuntu is forcing the reboot with the power button, and nothing changes:Code:Script page nº 1 post albert@HPG62:~$ sudo switchcards [sudo] password for albert: /usr/bin/switchcards: 76: [: :+ pwr:: unexpected operator /usr/bin/switchcards: 81: [: :+ pwr:: unexpected operator /usr/bin/switchcards: 85: [: :+ pwr:: unexpected operator /usr/bin/switchcards: 91: [: :+ pwr:: unexpected operator Script page nº 3 post albert@HPG62:~$ switchcards albert@HPG62:~$
Any idea?Code:root@HPG62:/home/albert# cat /sys/kernel/debug/vgaswitcheroo/switch 0: IGD:+ Pwr:0000:01:05.0 1: DIS: :Off:0000:02:00.0
Thank you very much and best regards!!
Last edited by acutbal; September 27th, 2012 at 12:51 PM.
Have you tried using the gxmessage script?
Hi,
These are the steps that I take on a clean install on my HP Envy 14 i7 with my AMD Radeon HD 6600 Series Graphics Card:
1. install gxmessage
2. put images into the /home/$user/.local/share/icons folder
3. drop the switchcards.sh using nautilus into /usr/bin folder and make it executable and change rights permission to the user and not root.
4. Add the following to the /etc/rc.local file:
VGA Switcheroo -
chown $User /sys/kernel/debug/vgaswitcheroo/switch
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
Screen Brightness on boot to stop having to press the brightness key -
chown $User /sys/class/backlight/acpi_video0/brightness
echo 5 > /sys/class/backlight/acpi_video0/brightness
Note: You may also want to manually chown the vga and acpi files!!!
5. install main menu
6. create an app launcher and link it to the switchcards script
7. use unity to open the app launcher
8. input password
9. change to integrated to stop fan noise.
You can off course if you would like install the AMD graphics driver and then install fglrx-amdccle to have full control over your graphics card, but its not recommended as it causes all kinds of issues.
If I were you I would use the xorg open source driver!!!!
Note: Prior to installing the AMD graphics card ensure you have POSIX enabled by copying the following to your /etc/fstab file:
tmpfs /dev/shm tmpfs defaults 0 0
none /sys/kernel/debug debugfs defaults 0 0
Good Luck!
Last edited by onefthemany; October 14th, 2012 at 11:18 AM.
Bookmarks