Gentoo Archives: gentoo-user

From: Corbin Bird <corbinbird@×××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Another X11 problem
Date: Fri, 26 Aug 2016 21:10:19
Message-Id: 57C0B011.4040502@charter.net
In Reply to: [gentoo-user] Re: Another X11 problem by Ian Zimmerman
1 On 08/25/2016 09:59 PM, Ian Zimmerman wrote:
2 > On 2016-08-25, Corbin Bird wrote:
3 >
4 >> On 08/25/2016 12:52 PM, Ian Zimmerman wrote:
5 >>> On 2016-08-22, Adam Carter wrote:
6 >>>
7 >>>>> Once or twice per week, when I start X11 (via the startx program),
8 >>>>> my display goes all black. When it happens there is no way back to
9 >>>>> a working state: I can see that Xorg is running, I can exit it by
10 >>>>> hitting Ctl-Alt-Backspace, but even then display does not recover.
11 >>>>> The only thing I can do is hit Ctl-Alt-Del blindly and reboot, and
12 >>>>> next time it usually works.
13 >>>> Have you checked dmesg and syslogs for messages?
14 >>> Yes. Nothing (significantly) different when this happens.
15 >>>
16 >>>> Try a newer kernel and see if it goes away.
17 >>> I'm reluctant to go there before nailing it down a bit more, since
18 >>> it only happens intermittently and a newer kernel will quite possibly
19 >>> introduce other problems.
20 >>>
21 >> I don't remember if you specified your appended command-line kernel
22 >> parameters ( lilo / grub / grub2 ). I have an AMD Phenom II x4 980. The
23 >> parameters have a major effect on the video ( i.e. AGP / IOMMU usage ).
24 >>
25 >>
26 > I have not posted them yet because I didn't suspect they were
27 > important, but here they are now:
28 >
29 > GRUB_CMDLINE_LINUX="rootfstype=ext4"
30 >
31 > GRUB_CMDLINE_LINUX_DEFAULT="quiet noresume vt.default_utf8=1 consoleblank=0"
32 >
33 > # Uncomment to disable graphical terminal (grub-pc only)
34 > GRUB_TERMINAL=console
35 >
36 >
37 > I added the consoleblank=0 bit just very recently in the pursuit of this
38 > bug. It happened without it, too.
39 >
40 > The relevant kernel drivers are built as modules. I load fbcon from
41 > /etc/conf.d/modules, and that seems to be where the switch to graphics
42 > mode occurs. Note that everything is always okay at this point -
43 > it just switches to a framebuffer enabled console, with a nice small
44 > font. The bug, if it happens, happens later, when I start xorg.
45 >
46 > Also, I pass no module-specific parameters. The only non-comment line
47 > in /etc/conf.d/modules is:
48 >
49 > modules="fbcon it87"
50 >
51 Try setting up the IOMMU. ( Stabilize memory setup / management )
52
53 The IOMMU is really a modified "AGP bridge" built into the CPU.
54
55 Typical dmesg output :
56 [ 0.000000] AGP: No AGP bridge found
57
58 If you don't create a "reserved for the AGP Aperature" memory block or
59 setup the IOMMU, the kernel will setup 64Mg of memory and reserve it for
60 "e820 -> AGP Aperature". If the IOMMU is not setup, it will
61 automatically use ALL of the "AGP Aperature Reserved" memory.
62
63 The added kernel parameter for ( AGP / IOMMU on x86_64 ) :
64 iommu=memaper[=1],noaperture
65
66 This sets up 64Mg for the IOMMU, and tells it "do not touch 'reserved
67 for the AGP Aperature' memory".
68 ( Software IO TLB is now preferred / automatic on 4.1.xx kernels. )
69
70 Typical dmesg output :
71 [ 0.636904] AMD-Vi: Found IOMMU at 0000:00:00.2 cap 0x40
72 [ 0.637060] AMD-Vi: Interrupt remapping enabled
73 [ 0.644282] AMD-Vi: Lazy IO/TLB flushing enabled
74 [ 0.717543] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
75 [ 0.717700] software IO TLB [mem 0xb9ee4000-0xbdee4000] (64MB) mapped
76 at [ffff8800b9ee4000-ffff8800bdee3fff]
77
78 KMS enabled X drivers need this setup on ( Fam10h / Fam15h ) CPUs.
79
80 Also check for any kernel parameters needed for KMS, by your choice of
81 video driver.
82
83 Hope this helps.
84
85 Corbin

Replies

Subject Author
[gentoo-user] Re: Another X11 problem Ian Zimmerman <itz@×××××××.net>