Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

asus-switcheroo: Misc configs and printk changes

Remove UL30VT specific printks and fix name of pm script file

Add modprobe and dract configs

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
  • Loading branch information...
commit 2d5f4a2ec2a68daac7d18ff65a498ae21bf5a1e9 1 parent 259b699
@awilliam authored
View
3  README
@@ -35,8 +35,7 @@ This will cause problems if the OS thinks it's still gone. Turning
the card back on before sleep and off at resume seems to work. Do
the following to put a script in place to handle this automatically.
-cp asus-switcher-suspend-resume.sh \
- /etc/pm/sleep.d/75-asus-switcher-suspend-resume.sh
+cp asus-switcheroo-pm /etc/pm/sleep.d/75-asus-switcheroo
The lid switch is a known issue when running with the discrete
graphics. Opening the lid causes a crash through the intel
View
0  asus-switcher-suspend-resume.sh → asus-switcheroo-pm
File renamed without changes
View
13 asus-switcheroo.c
@@ -1,5 +1,5 @@
/*
- * VGA switcheroo driver for ASUS UL30VT (and possibly similar)
+ * VGA switcheroo driver for ASUS laptops
*
* Based on drivers/gpu/drm/nouveau/nouveau_acpi.c
*
@@ -170,17 +170,18 @@ static void asus_switcheroo_set_state(struct pci_dev *pdev,
{
if (state == VGA_SWITCHEROO_ON) {
printk(KERN_INFO
- "UL30VT switcheroo: turning on discrete graphics\n");
+ "Asus switcheroo: turning on discrete graphics\n");
pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);
if (pci_enable_device(pdev))
- printk(KERN_WARNING "UL30VT: failed to enable %s\n",
+ printk(KERN_WARNING
+ "Asus switcher: failed to enable %s\n",
dev_name(&pdev->dev));
pci_set_master(pdev);
dummy_client_switched = true;
} else {
printk(KERN_INFO
- "UL30VT switcheroo: turning off discrete graphics\n");
+ "Asus switcheroo: turning off discrete graphics\n");
pci_save_state(pdev);
pci_clear_master(pdev);
pci_disable_device(pdev);
@@ -266,7 +267,7 @@ static bool asus_switcheroo_dsm_detect(void)
acpi_get_name(dsm_handle, ACPI_FULL_PATHNAME, &buf);
printk(KERN_INFO
- "UL30VT switcheroo: detected DSM switching method "
+ "Asus switcheroo: detected DSM switching method "
"%s handle\n", (char *)buf.pointer);
kfree(buf.pointer);
return true;
@@ -308,6 +309,6 @@ module_param(dummy_client, bool, 0444);
MODULE_PARM_DESC(dummy_client, "Enable dummy VGA switcheroo client support");
MODULE_AUTHOR("Alex Williamson <alex.williamson@redhat.com>");
-MODULE_DESCRIPTION("Experimental Asus UL30VT hybrid graphics switcheroo");
+MODULE_DESCRIPTION("Experimental Asus hybrid graphics switcheroo");
MODULE_LICENSE("GPL v2");
MODULE_VERSION("0.1");
View
1  asus-switcheroo.conf-dracut
@@ -0,0 +1 @@
+add_drivers+="asus-switcheroo"
View
1  asus-switcheroo.conf-modprobe.d
@@ -0,0 +1 @@
+install nouveau /sbin/modprobe asus-switcheroo; /sbin/modprobe --ignore-install nouveau
Please sign in to comment.
Something went wrong with that request. Please try again.