Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
systemd and radeon/kms
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Tux's lil' helper
Tux's lil' helper

Joined: 14 Jul 2004
Posts: 112

PostPosted: Wed Aug 15, 2012 4:48 am    Post subject: systemd and radeon/kms Reply with quote

It would appear that I'm facing a firmware issue. If I boot with systemd, I get a blank screen and nothing works. If I boot openrc, it's fine. If I then reboot the machine with systemd, it's fine. So, systemd is not loading my radeon firmware, but if it's already been loaded, then it continues to work.

alex@alex-thinks ~ $ emerge --info
Portage (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.14.1-r3, 3.3.8-gentoo x86_64)
System uname: Linux-3.3.8-gentoo-x86_64-AMD_E-350_Processor-with-gentoo-2.1
Timestamp of tree: Sun, 12 Aug 2012 21:00:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.1.4-r3, 3.2.3-r1
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo x-portage virtualization emg-overlay zugaina tlp
ACCEPT_LICENSE="* -@EULA google-chrome AdobeFlash-10.3 google-talkplugin skype-eula"
CFLAGS="-march=amdfam10 -O2 -pipe -fomit-frame-pointer -mno-3dnow -mcx16 -mpopcnt -mssse3 -msse4a -mmmx -O2 -pipe"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=amdfam10 -O2 -pipe -fomit-frame-pointer -mno-3dnow -mcx16 -mpopcnt -mssse3 -msse4a -mmmx -O2 -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US tr"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/usr/local/portage /var/lib/layman/virtualization /var/lib/layman/crossdev /var/lib/layman/zugaina /var/lib/layman/tlp"
USE="X a52 aac acl acpi alsa amd64 avahi berkdb bluetooth branding bzip2 cairo cdda cdparanoia cdr cli consolekit cracklib crypt cups cxx dbus device-mapper dia dot dri dts dvd dvdr emboss encode exif fam fbcon fbsplash firefox flac fontconfig fortran ftp gdbm gif gnutls gpm gtk iconv ipv6 jack java jpeg jpeg2k ladspa lame laptop latex lcms ldap libkms libmpeg2 libnotify lv2 lzma mad mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nsplugin ogg openal opengl openmp openvg pam pango pcre pdf png pnm policykit ppds pppd pulseaudio python qt3support qt4 rdp readline rtmp samba sdl session spell sqlite sse sse2 sse3 ssl ssse3 startup-notification svg systemd tcpd tga threads tiff tk truetype udev udisks unicode upower usb v4l2 vorbis vpx wifi wxwidgets x264 xcb xcomposite xft xml xv xvid xvmc zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US tr" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon r600" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

alex@alex-thinks ~ $ eix -e systemd
[I] sys-apps/systemd
     Available versions:  (~)44-r2 (~)188 {acl audit cryptsetup lzma pam selinux tcpd}
     Installed versions:  188(16:33:27 08/12/12)(acl lzma pam tcpd -audit -cryptsetup -selinux)
     Description:         System and service manager for Linux

alex@alex-thinks ~ $ uname -a
Linux alex-thinks 3.3.8-gentoo #1 SMP Mon Jul 30 15:33:35 CDT 2012 x86_64 AMD E-350 Processor AuthenticAMD GNU/Linux
alex@alex-thinks ~ $ eix -e udev
[I] sys-fs/udev
     Available versions:  (~)141-r1 146-r1!t 149 151-r4 164-r2 (~)171-r5[1] 171-r6 (~)187-r1!t (~)187-r3!t **9999!t {acl action_modeswitch build debug (+)devfs-compat doc edd (-)extras floppy gudev hwdb introspection keymap old-hd-rules +openrc +rule_generator selinux static-libs test}
     Installed versions:  187-r3!t(17:05:33 08/11/12)(gudev hwdb keymap openrc -doc -introspection -selinux -static-libs)
     Description:         Linux dynamic and persistent device naming support (aka userspace devfs)

[1] "emg-overlay" /var/lib/layman/crossdev

alex@alex-thinks ~ $ eix -e linux-firmware
[I] sys-kernel/linux-firmware
     Available versions:  20120502 ~20120615 ~20120708 ~20120719 **99999999 {savedconfig}
     Installed versions:  20120502(17:15:36 07/07/12)(-savedconfig)
     Description:         Linux firmware files
Back to top
View user's profile Send private message

Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Wed Aug 15, 2012 3:56 pm    Post subject: Reply with quote

I gonna watch this thread, because I didn't find out how to force the loading of a specific firmware inside SystemD.

I found that, but I don't know if you can reuse that kind of stuff :
Back to top
View user's profile Send private message
Tux's lil' helper
Tux's lil' helper

Joined: 14 Jul 2004
Posts: 112

PostPosted: Wed Aug 15, 2012 6:23 pm    Post subject: Reply with quote

It's a race condition; X starts before the firmware is loaded. If I enable a USB Serial Console for kernel messages, then it all works, but then fails again after unplugging the USB cable.
Back to top
View user's profile Send private message
Tux's lil' helper
Tux's lil' helper

Joined: 14 Jul 2004
Posts: 112

PostPosted: Fri Aug 17, 2012 10:22 pm    Post subject: Reply with quote

So, since X starts before radeon has finished loading the firmware, is that a bug that hasn't been hit before? Is there an event X should be waiting for before connecting to the DRM device? Is there an event systemd can wait for before starting X?
Back to top
View user's profile Send private message

Joined: 16 Sep 2005
Posts: 1350
Location: Montréal

PostPosted: Sat Aug 18, 2012 3:15 am    Post subject: Reply with quote

The Radeon firmware to be loaded can be in the kernel and/or in the initramfs and/or in the root partition.

From the moment who Linux detect the Ati card work with Radeon DRM, it should load the firmware and the Radeon support and, if KMS is activated by default in the kernel and/or the radeon.modeset=1 parameter is pass to the kernel, Linux should set the native resolution for the screen.

If the firmware is in the root partition only, you have to wait for the moment the Radeon support can find the firmware in the boot process. It is important to have the line
options radeon modeset=1

in the /etc/modprobe.d/modprobe.conf file and include it in the initramfs if you have one, needed when the Radeon support is in module.

There should be no doubt that KMS is activated by default no matter if the Radeon support is compiled in the kernel or in module. In plus the radeon module should be autoloaded from /etc/conf.d/modules.

Mabye your missing some directives about the Radeon support and/or KMS in the boot process. When KMS is desactivated, the Radeon Xorg module may be not usable. As a result, you can have a black screen. The kernel side of the Radeon support do not depend on Xorg to drive the Ati card and have to be registrated, up and running first.

Because Openrc succeed and Systemd fail, it look like your firmware is only in the root partition, otherwise, Linux should load it before Init start. Anyway, you have to be sure Systemd do the job for the Radeon support as Opennrc do.

I am studying Systemd presently. I wait again before try it. I think you have to rebuild the initramfs for Systemd if not done.
Back to top
View user's profile Send private message
Tux's lil' helper
Tux's lil' helper

Joined: 14 Jul 2004
Posts: 112

PostPosted: Fri Aug 24, 2012 9:09 pm    Post subject: Reply with quote

I don't have an initramfs; I'll see if I can figure out how to compile the firmware into the kernel binary. Really, the issue seems to just be that Systemd is too fast, especially since adding "console=ttyUSB0,115200n8" to the kernel command line causes it to work, as long as I have a USB serial port plugged in.
Back to top
View user's profile Send private message

Joined: 19 Jan 2005
Posts: 1979
Location: Poland

PostPosted: Tue Nov 13, 2012 10:56 am    Post subject: Reply with quote

That's easy:

CONFIG_EXTRA_FIRMWARE="radeon/R600_rlc.bin radeon/R700_rlc.bin"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum