# Screen flicker for a while [SOLVED]

## LIsLinuxIsSogood

Not sure if there is a better topic (for X settings and stuff like this...)  Sometimes after the screen goes to sleep, which is set to happen maybe after 20-30 minutes, I am experiencing heavy flickering and more odd stuff like wrapping around etc. vertically or horizontally, it's hard to tell.  I think that it could be something to do with the way I am waking up the computer, since I've only recently started keeping tabs on it, but it seems like it might only happen when I use the touchpad to wake the screen.  Not sure.  would someone please help me?  I am using an hp laptop, with x11-drivers/xf86-input-synaptics-1.9.0

Also, since my INPUT DEVICES seems to be more than I need, is that another reason why the screen flickering could be occurring?

EDIT: I WAS JUST READING ON WIKI ABOUT LIBINPUT, AND REALIZE THAT I MAY NEED TO TAKE THE STEPS TO REMOVE THE DRIVERS FOR EVDEV AND SYNAPTICS.  SO ASSUMING THAT IS GENERALLY RECOMMENDED, I AM NOT SURE WHY I HAD ALL THREE THERE AT THE SAME TIME.

Make.conf:

```

# Please consult /usr/share/portage/config/make.conf.example for a more

# detailed example.

CFLAGS="-mtune=generic -O2 -pipe"

# Use the same settings for both variables

CXXFLAGS="${CFLAGS}"

# WARNING: Changing your CHOST is not something that should be done lightly.

# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.

CHOST="x86_64-pc-linux-gnu"

# These are the USE flags that were used in addition to what is provided by the

# profile used for building.

USE="dbus consolekit udev mmx sse sse2 netifrc -qt4 -qt5 -phonon -kde X \

     -gtk -gnome -branding cups bluetooth dvd xdg cdr ipv6 alsa acl test \

     audiofile pulseaudio tk tlc -ffmpeg tiff aac a52 dts mp2 mp3 \

     musepack srt xv lua samba xfvb acpi infinality"

# Temporarily unneeded USE flags:

# bindist

PORTDIR="/usr/portage"

DISTDIR="${PORTDIR}/distfiles"

PKGDIR="${PORTDIR}/packages"

PORTDIR_OVERLAY=""

PORTAGE_RSYNC_RETRIES="5"

PORTAGE_RSYNC_EXTRA_OPTS=""

MAKEOPTS="-j4"

INPUT_DEVICES="libinput evdev synaptics"

VIDEO_CARDS="intel i965"

ACCEPT_LICENSE=""

PORTAGE_ELOG_SYSTEM="save_summary:log,warn,error,qa echo"

PORTAGE_ELOG_CLASSES="*"

PORT_LOGDIR="/var/log/portage/builds"

EMERGE_DEFAULT_OPTS="--ask --jobs=4 --load-average=4"

RUBY_TARGETS="ruby20 ruby21 ruby22"

GRUB_PLATFORMS="efi-64"

ACCEPT_KEYWORDS="~amd64"

ABI_X86="64"

```

Last edited by LIsLinuxIsSogood on Fri Oct 06, 2017 9:32 am; edited 1 time in total

----------

## NeddySeagoon

LIsLinuxIsSogood,

Please put your /var/log/Xorg.0.log onto a pastebin site.

```
VIDEO_CARDS="intel i965" 
```

is no longer recommended for Intel chipsets.

You may still need that setting for mesa but the built in (to Xorg) modesetting driver is recommended for Intel GPUs now.

----------

## LIsLinuxIsSogood

Can't seem to make sense of the error messages in X start, so here is the file requested...also not sure if I could be on a laptop that is relatively new but has yet to be working with just libinput and KVM as the drivers.  Is that in theory going to be the best choice?

https://paste.pound-python.org/show/YifPiCGhg4FmJaqp64ab

FYI - since I made the previous changes recommended, here is a pastebin of my current make.configuration file.

https://paste.pound-python.org/show/UV3X5W6tJ1xkFzTEgznrLast edited by LIsLinuxIsSogood on Mon Oct 02, 2017 5:23 am; edited 1 time in total

----------

## LIsLinuxIsSogood

any ideas about why am I getting a segfault with no additional warnings beforehand?

----------

## charles17

 *LIsLinuxIsSogood wrote:*   

> Make.conf:
> 
> ```
> 
> # Please consult /usr/share/portage/config/make.conf.example for a more
> ...

 

Off-topic, but for mmx sse sse2 see https://wiki.gentoo.org/wiki/CPU_FLAGS_X86.

----------

## LIsLinuxIsSogood

charles17, thanks for taking the time to point it out.  Do you know why the change?  It seems like the page you linked, which I recently saw anyway (thanks again), has some different options with either the expanded use flag, or else setting package.use settings. 

As far as I can tell it doesn't seem much different than just using global USE flag.  But I guess there must be something different about it.  Do you know what?

----------

## NeddySeagoon

LIsLinuxIsSogood,

Your backtrace implicates libinput

```
[  3640.848] (EE) Backtrace:

[  3640.848] (EE) 0: X (xorg_backtrace+0x4a) [0x5937ea]

[  3640.848] (EE) 1: X (0x400000+0x1974f9) [0x5974f9]

[  3640.848] (EE) 2: /lib64/libpthread.so.0 (0x7f383b4f0000+0x13be0) [0x7f383b503be0]

[  3640.848] (EE) 3: /usr/lib64/libinput.so.10 (libinput_log_set_handler+0x0) [0x7f3835c90f40]

[  3640.848] (EE) 4: /usr/lib64/xorg/modules/input/libinput_drv.so (0x7f3835ebc000+0xa689) [0x7f3835ec6689]

[  3640.848] (EE) 5: X (0x400000+0x84d1c) [0x484d1c]

[  3640.848] (EE) 6: X (0x400000+0x96efb) [0x496efb]

[  3640.848] (EE) 7: X (0x400000+0x97543) [0x497543]

[  3640.848] (EE) 8: X (config_init+0x9) [0x496399]

[  3640.848] (EE) 9: X (InitInput+0xc7) [0x479ab7]

[  3640.848] (EE) 10: X (0x400000+0x39a61) [0x439a61]

[  3640.848] (EE) 11: /lib64/libc.so.6 (__libc_start_main+0xf1) [0x7f383b15e521]

[  3640.848] (EE) 12: X (_start+0x2a) [0x42378a]

[  3640.848] (EE) 

[  3640.848] (EE) Segmentation fault at address 0x90

[  3640.849] (EE) 

Fatal server error:

[  3640.849] (EE) Caught signal 11 (Segmentation fault). Server aborting

```

Try without libinput.  

The log shows that you are using the modesetting driver. Thats good.

----------

## charles17

 *LIsLinuxIsSogood wrote:*   

> ... different options with either the expanded use flag, or else setting package.use settings. 

 

Compare 

```
equery h sse2
```

 with 

```
 equery h cpu_flags_x86_sse2 
```

----------

## LIsLinuxIsSogood

Ok, so I removed libinput and and the x11-drivers for libinput, and replaced with synaptics and the problem seems to have been removed along with it.  Thanks for the help!  Now I will just need to start another post in regards to some portage features...  :Smile: 

----------

## LIsLinuxIsSogood

I actually spoke to soon, guess it isn't solved yet.  Need to troubleshoot the system again, will return once I can check out some of the settings with X.

----------

## bunder

```
 VIDEO_CARDS="intel i965" 
```

try adding i915.enable_rc6=0 to your kernel line in grub, or bake it into your kernel.

----------

## LIsLinuxIsSogood

So just checking, this is what the kernel line in grub should be?  And also am I leaving VIDEO_CARDS the way it is or changing it?

```
 linux   /vmlinuz-4.13.4-gentoo root=/dev/sda4 i915.enable_rc6=0 ro
```

----------

