Background

Nowadays, I upgrade my Gentoo Linux to the lastest version using emerge. But unfortunately, I can’t use dual-monitor anymore.

The symptom appears like this: when the KDM login screen appears on both of the two monitors, I type in my user name and password, then the greeting screen flashes, but quickly it revert to the KDM login screen again. I tried again and again, but the strange behavior still exists, and I didn’t succeed in logining in my system. Sigh 🙁

 

What I’ve tried

I created and switched to a completely new user, it remains the same. So I confirm it’s not a specific user-level profile configuration error, instead, it should be a system-wide problem.

I disconnected the external display from my laptop, surprisingly, the problem disappeared.

 

How I fixed the problem

Then I started to check the related log file, here is what I’ve found:


kdmgreet(13509)/kdecore (K*TimeZone*): No time zone information obtained from ktimezoned
resize called 3046 1050
/usr/bin/X: symbol lookup error: /usr/lib64/xorg/modules/drivers/nouveau_drv.so: undefined symbol: exaGetPixmapDriverPrivate
resize called 1024 768
klauncher(13638) kdemain: No DBUS session-bus found. Check if you have started the DBUS server.
kdeinit4: Communication error with launcher. Exiting!
kdmgreet(13632)/kdecore (K*TimeZone*): KSystemTimeZones: ktimezoned initialize() D-Bus call failed:  "Not connected to D-Bus server"

I noticed the following line:

/usr/bin/X: symbol lookup error: /usr/lib64/xorg/modules/drivers/nouveau_drv.so: undefined symbol: exaGetPixmapDriverPrivate

I started to doubt that maybe it’s something wrong with the nVidia’s open-source driver nouveau.

Using portageq to check which package the nouveau_drv.so file comes from:

# portageq owners / /usr/lib64/xorg/modules/drivers/nouveau_drv.so
x11-drivers/xf86-video-nouveau-1.0.11
		/usr/lib64/xorg/modules/drivers/nouveau_drv.so

Re-emerge the nouveau dirver:

# emerge -at xf86-video-nouveau

However, the problem still exists.

Then I started googling it, and luckily found this. It confirms that it’s a bug from x11-drivers/xf86-video-nouveau-1.0.11, causing X to crash when calling xrandr.

The rest is easy. As Gentoo offers multi-versioned support for a package, I can easily downgrade to a lower version of x11-drivers/xf86-video-nouveau.

  1. Check existing x11-drivers/xf86-video-nouveau in Gentoo repository:
    # eshowkw x11-drivers/xf86-video-nouveau
    Keywords for x11-drivers/xf86-video-nouveau:
    			 |                             | u   | 
    			 | a a   a           p     s   | n   | 
    			 | l m   r h i m m   p s   p   | u s | r
    			 | p d a m p a 6 i p c 3   a x | s l | e
    			 | h 6 r 6 p 6 8 p p 6 9 s r 8 | e o | p
    			 | a 4 m 4 a 4 k s c 4 0 h c 6 | d t | o
    -------------+-----------------------------+-----+-------
       1.0.10    | o + o o o o o o + + o o o + | # 0 | gentoo
       1.0.10-r1 | o ~ o o o o o o ~ ~ o o o ~ | #   | gentoo
    [I]1.0.11    | o + o o o o o o + + o o o + | o   | gentoo
  2. Downgrade to a lower version of x11-drivers/xf86-video-nouveau:
    # emerge -atN =xf86-video-nouveau-1.0.10
  3. Add the following line to the end of /etc/portage/package.mask to avoid unintended update of x11-drivers/xf86-video-nouveau:
    >=x11-drivers/xf86-video-nouveau-1.0.11

    Or simply,

    echo ">=x11-drivers/xf86-video-nouveau-1.0.11" >> /etc/portage/package.mask
  4. Restart xdm service:
    service xdm restart
  5. Login.

Now everything works like a charm! 🙂

 

References:

Leave a Reply

Your email address will not be published. Required fields are marked *