You are not logged in.

#1 2011-12-10 19:55:27

ciarlill
Member
Registered: 2011-12-10
Posts: 19

Suspend with Hybrid graphics - vgaswitcheroo (ATI/Intel)

To preface I have read the Wiki, read the Linux HybridGraphics blog, googled, etc. I am very close to getting this all working just not sure how to get the last piece in place.

Basically my suspend will only resume correctly if the Intel card is the active one, but both cards have power. If the discrete card is active, when I resume my GDM/X is gone. All I see at that point is the kernel messages from bootup (up until daemons loading).

So this state does NOT work:

ciarlill@odin:~$ cat /sys/kernel/debug/vgaswitcheroo/switch 
0:DIS:+:Pwr:0000:01:00.0
1:IGD: :Pwr:0000:00:02.0

Resume does not get back to GDM.


This state DOES work:

ciarlill@odin:~$ cat /sys/kernel/debug/vgaswitcheroo/switch 
0:DIS: :Pwr:0000:01:00.0
1:IGD:+:Pwr:0000:00:02.0

If I suspend from Gnome3 menu I get a GDM lock screen. If I just call pm-suspend from the terminal I get right back to my desktop.

I am using pm-utils and have set SLEEP_MODULE=uswsusp.

I would be glad to provide any more info. The crux of the issue is here I am not sure how to make sure IGD gets activated before suspend. If I do: 'echo DIGD > /sys/kernel/debug/vgaswitcheroo/switch' it only becomes active after X restart.


I'm new to Arch but not to linux if that helps.

Last edited by ciarlill (2011-12-10 20:06:56)

Offline

#2 2011-12-11 21:46:59

ciarlill
Member
Registered: 2011-12-10
Posts: 19

Re: Suspend with Hybrid graphics - vgaswitcheroo (ATI/Intel)

Just some more info. I've been working at this for the last 12 hours on and off and have not gotten much further. Figured I would add more details I discovered.

I should have mentioned before but I am using the open source radeon driver (x86-video-ati). What I am seeing upon resume appears to by tty0, these are messaged from the kernel during the bootup process. The screen is definitely making use of the radeondrmfb/radeon driver since it is at the correct full resolution. From this screen I cannot access any other tty (Ctr+Alt+F1-7), but my keyboard input is working since I can do  a "blind reboot" (username - enter - password - enter - sudo reboot - enter - password - enter) the machine reboots.

I am leaning towards the idea that it has to do with the radeondrmfb. The system does actually resume, just cannot get back into my session.

I am running wgetpaste right now and will edit with the links shortly.

Offline

#3 2011-12-16 16:28:03

Carlinhos
Member
Registered: 2011-07-08
Posts: 41

Re: Suspend with Hybrid graphics - vgaswitcheroo (ATI/Intel)

Sorry for a little off-topic, but how are you able to switch to the discrete card? I have an ATI/Intel laptop as well and the best solution I have found so far is to power off the ATI card using vga_switcheroo and just use the Intel one. Switching cards with vga_switcheroo doesn't seem to work, perhaps you could help me out?

Offline

#4 2011-12-16 18:07:10

ciarlill
Member
Registered: 2011-12-10
Posts: 19

Re: Suspend with Hybrid graphics - vgaswitcheroo (ATI/Intel)

After switching cards you need to restart X or whatever desktop environment you use. I am using gnome and starting the graphical environment from inittab (rather than as a daemon). So once I echo the switch to vga_switcheroo I do a '/etc/rc.d/gdm restart'.

Regarding my actual issues I found the best way to suspend was to switch the card to Intel and restart GDM (so the switch will occur) before suspending. Then if ATI was active before suspend, re-activate it on wake up and again restart GDM. Not the most elegant solution but it is working for me.

So make sure you are restating X when you switch for it to take effect. Also make sure your user has ownership of the switch file so your commands are actually being read (I do a chown of the file in rc.local)

Offline

#5 2011-12-16 21:34:06

Carlinhos
Member
Registered: 2011-07-08
Posts: 41

Re: Suspend with Hybrid graphics - vgaswitcheroo (ATI/Intel)

ciarlill wrote:

After switching cards you need to restart X or whatever desktop environment you use. I am using gnome and starting the graphical environment from inittab (rather than as a daemon). So once I echo the switch to vga_switcheroo I do a '/etc/rc.d/gdm restart'.

Thank you, this worked! It causes my laptop to heat up a lot though so I will stick with the integrated one for now. Do you notice any difference in performance, particularly in 3D, by using the ATI card instead?

Offline

#6 2011-12-16 21:34:47

ciarlill
Member
Registered: 2011-12-10
Posts: 19

Re: Suspend with Hybrid graphics - vgaswitcheroo (ATI/Intel)

No not really. The only reason I need to use the ATI card is for dual monitor support.

Offline

Board footer

Powered by FluxBB