Gentlemen, I require your help to do some automation!
I recently upgraded my notebook to 11.04 (fresh install), but cannot boot 2.6.38 kernel normally (blank screens, stuck in dmesg (?) output, no gui loads).
In 10.10 I used vgaswitcheroo to turn the dedicated ATI card off (it didnt work anyway, loud fans and terrible heat - useless!) and ran compiz+effects nicely with the Intel Core i5 gfxchip.
Now with the update, I cant boot without adding radeon.modeset=0 to grub, which then disables vgaswitcheroo. After some googling I found a post, where the user blacklisted the radeon driver and loaded it back in when everything booted fine.
Now my actual question:
How can i automate this process with a script that runs on login?
Before Natty, I configured it like this in rc.local:
Now, with blacklisted radeon this does not exist of course. After successful booting I have to runCode:chown USER /sys/kernel/debug/vgaswitcheroo/switch echo OFF > /sys/kernel/debug/vgaswitcheroo/switchand then (as ROOT, not with sudo) above lines to turn the ATI card off.Code:modprobe radeon
My first thought was something like this:
..but that does not work. I know, I should read more about scripting and bash..Code:#!/bin/bash sudo su && modprobe radeon && echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
Any input would be much appreciated!



Adv Reply




Bookmarks