From owner-freebsd-x11@FreeBSD.ORG Sun Apr 13 22:03:30 2014 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65B69A90; Sun, 13 Apr 2014 22:03:30 +0000 (UTC) Received: from mail-qa0-x229.google.com (mail-qa0-x229.google.com [IPv6:2607:f8b0:400d:c00::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1161A1A75; Sun, 13 Apr 2014 22:03:30 +0000 (UTC) Received: by mail-qa0-f41.google.com with SMTP id j5so7434096qaq.28 for ; Sun, 13 Apr 2014 15:03:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=fk8i9TdXiGk9S0x/Ey4vosle1vAXaOqDn57vkTrqshc=; b=Vpbej4fgatOe+nfL+6UVTIIFzLO0KzAO+1aa0UbPuHju2vI7Pbg5P7FKUjoQoQWOZ6 BlyZl0F8It5mSYA90jD+kb6lsYvGPKZSQFXFSbv14lHi7WDXA08TUosN1OS8uXWsbfw8 MhqFE76QO8HDqlfxNorWQitlefqX/kNFSggP/Vu8CjUnERLpOkZ8ifWTojihMSXBQOhn 5cSNcmiHqQPh/f/Yl68N3xtxnG9RtPg1eAzfnVn+VE3OzrlbeEBKrt8AvUhTxAcoLg1g VGbhId6JB7yLh0WubT13Juv9n9GA2/Zizmg0/Vm7bnT7s/fAoKP4GRhTnMT8ItfRcZhR YR2Q== MIME-Version: 1.0 X-Received: by 10.140.43.135 with SMTP id e7mr4520523qga.95.1397426609026; Sun, 13 Apr 2014 15:03:29 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.50.206 with HTTP; Sun, 13 Apr 2014 15:03:28 -0700 (PDT) In-Reply-To: References: <201404081719.41379.jhb@freebsd.org> Date: Sun, 13 Apr 2014 15:03:28 -0700 X-Google-Sender-Auth: CkorsXrpnCPO-xmYLqrZGG1HFzU Message-ID: Subject: Re: Suspend/Resume on Lenovo IdeaPad S400 with FreeBSD 10? From: Adrian Chadd To: Ivan Rokotov , freebsd-x11@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Kevin Oberman , "freebsd-mobile@freebsd.org" X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2014 22:03:30 -0000 Hi! So why does this particular retry hack work? Is there some bug in the drm/i915 code that isn't correctly handling submitted requests in certain circumstances? What's the value of 'ret' from that call? -a On 12 April 2014 17:28, Ivan Rokotov wrote: > Hi Kevin, > > Thank you for your useful suggestions. It took me several days to test > and debug everything. Here are my results: > > 2014-04-09 10:14 GMT+04:00 Kevin Oberman : >> If you want to stay with syscon, try removing VESA from your kernel by >> adding "nodevice VESA" to your kernel. > > Tried, changed nothing. > >> vt has been MFCed to 10-STABLE, but it is not in 10.0-RELEASE. I believe >> that you can pull vt out of the STABLE repo and build in on RELEASE, but I'd >> suggest just moving to STABLE. I've been using it on my T320 with no issues >> for a couple of months. > > Then I tried 10-STABLE, this build: > https://pub.allbsd.org/FreeBSD-snapshots/amd64-amd64/10.0-RELENG_10-r264300-JPSNAP/ > Recompiled kernel to include vt and vt_vga. > > With acpi_video and i915kms loaded from the console, suspend/resume works. > > Under X, with a real Xfce4 environment: > > * with xfwm4 windows manager, without any compositing effects, > everything works like a charm. All peripherals wake up, wifi > reconnects, mplayer continues playing video, etc. > > * with xfwm4 and any compositing enabled, however, I got screen > corruption, like this: > http://i327.photobucket.com/albums/k477/ivan_rokotov_bsd/1_zps099b1f6d.png > or > http://i327.photobucket.com/albums/k477/ivan_rokotov_bsd/4_zps8ec8912e.png > This is not a big problem, because scrolling/typing inside the window > or simply moving a mouse over it solves the problem. > > However, I need compiz (I like Mac-style tabbing) and some GL stuff > (e.g. asymptote). With compiz enabled, I get this horrible corruption: > http://i327.photobucket.com/albums/k477/ivan_rokotov_bsd/2_zpsd7564e4b.png > and no moving or switching to console help. No GL application starts. > I also found this in the X log after resume: > > [ 1173.617] (EE) intel(0): Failed to submit batch buffer, expect > rendering corruption: Device busy. > (II) AIGLX: Suspending AIGLX clients for VT switch > [ 1173.663] (WW) intel(0): drmDropMaster failed: Unknown error: -22 > [ 1177.289] (II) AIGLX: Resuming AIGLX clients after VT switch > [ 1177.340] (II) intel(0): EDID vendor "CMN", prod id 5239 > [ 1177.340] (II) intel(0): Printing DDC gathered Modelines: > [ 1177.340] (II) intel(0): Modeline "1366x768"x0.0 71.59 1366 1410 > 1439 1512 768 771 775 789 -hsync -vsync (47.3 kHz eP) > > After some experimenting, I found this patch, which solved the problem > completely: > http://lists.freebsd.org/pipermail/freebsd-x11/2013-October/013727.html > > Now, I have this in X log after resume: > [ 4561.749] (WW) intel(0): retrying batchbuffer submit > [ 4561.803] (WW) intel(0): retrying batchbuffer submit > [ 4561.857] (WW) intel(0): retrying batchbuffer submit > [ 4561.908] (WW) intel(0): retrying batchbuffer submit > [ 4561.959] (WW) intel(0): retrying batchbuffer submit > [ 4562.012] (WW) intel(0): retrying batchbuffer submit > [ 4562.063] (WW) intel(0): retrying batchbuffer submit > [ 4562.117] (WW) intel(0): retrying batchbuffer submit > [ 4562.171] (WW) intel(0): retrying batchbuffer submit > [ 4562.225] (WW) intel(0): retrying batchbuffer submit > [ 4562.279] (WW) intel(0): retrying batchbuffer submit > [ 4562.333] (WW) intel(0): retrying batchbuffer submit > [ 4562.386] (WW) intel(0): retrying batchbuffer submit > [ 4562.439] (WW) intel(0): retrying batchbuffer submit > [ 4562.493] (WW) intel(0): retrying batchbuffer submit > [ 4562.547] (WW) intel(0): retrying batchbuffer submit > [ 4564.779] (II) AIGLX: Suspending AIGLX clients for VT switch > [ 4564.779] (WW) intel(0): drmDropMaster failed: Unknown error: -22 > [ 4565.994] (II) AIGLX: Resuming AIGLX clients after VT switch > [ 4566.096] (II) intel(0): EDID vendor "CMN", prod id 5239 > [ 4566.096] (II) intel(0): Printing DDC gathered Modelines: > [ 4566.096] (II) intel(0): Modeline "1366x768"x0.0 71.59 1366 1410 > 1439 1512 768 771 775 789 -hsync -vsync (47.3 kHz eP) > > but everything is alive: compiz restarts correctly, GL applications > work as they did before resume. Job done! > > A question: is this patch ok? Nothing wrong with it? Do you or anybody > else experienced a similar problem and found a different solution? > >> I also add: >> # Out : speaker + headphones >> hint.hdac.0.cad0.nid25.config="as=1 seq=15" >> # In : mic + external mic >> hint.hdac.0.cad0.nid35.config="as=2" >> hint.hdac.0.cad0.nid27.config="as=2 seq=15" > > While we are here... I have: > hint.hdaa.0.nid20.config="as=1 seq=0 device=Speaker" > hint.hdaa.0.nid21.config="as=1 seq=15 device=Headphones" > hint.hdaa.0.nid18.config="as=3 seq=0 device=Mic" > hint.hdaa.0.nid24.config="as=3 seq=15 device=Mic" > > "as=2" for your mic means anything special? > >> # Minimize the number of interrupts from the sound card >> hint.pcm.0.buffersize=65536 >> hint.pcm.1.buffersize=65536 >> hw.snd.feeder_buffersize=65536 >> hw.snd.latency=7 > > hw.snd.latency=7 is for reducing power consumption? > > Thank you very much! > Ivan > _______________________________________________ > freebsd-mobile@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mobile > To unsubscribe, send any mail to "freebsd-mobile-unsubscribe@freebsd.org"