Discussion:
startx returns "Xf86EnableIO: failed to enable I/O ports 0000-03ff"
(too old to reply)
Pierre Willaime
2024-09-07 21:10:02 UTC
Permalink
Hi,

After upgrading from Strech to Booworm (I know: not recommended to jump
versions), I have some trouble to start X server.

startx returns this error:

"Xf86EnableIO: failed to enable I/O ports 0000-03ff (Operation not
permitted)".

GPU is Intel HD Graphics 2500 with CPU Intel Core i3-3220 from 2013.

I tried to start X with ou without xserver-xorg-video-intel package with
no success. I do not have an xorg.conf file. I also tried to install
gdm/gnome (previously lightdm/xfce) because of wayland built in support.
It does not start.

Does someone have any idea about what is going on?
Dan Ritter
2024-09-07 21:50:01 UTC
Permalink
Post by Pierre Willaime
Hi,
After upgrading from Strech to Booworm (I know: not recommended to jump
versions), I have some trouble to start X server.
"Xf86EnableIO: failed to enable I/O ports 0000-03ff (Operation not
permitted)".
Stretch to Buster to Bookworm would have avoided this.

In that span of time, X11 gained the ability to run without root
privileges, but only with specific support elsewhere.

Try

sudo dpkg-reconfigure xserver-xorg-legacy

and if that doesn't work, edit /etc/X11/Xwrapper.config
(and read the man page for it)

-dsr-
Pierre Willaime
2024-09-08 18:50:01 UTC
Permalink
Post by Dan Ritter
Try
sudo dpkg-reconfigure xserver-xorg-legacy
and if that doesn't work, edit /etc/X11/Xwrapper.config
(and read the man page for it)
Thanks.

I tried to select "Root Only" (to restore old behavior) or "Anybody" when reconfiguring xserver-xorg-legacy.

There error when trying to start X is now (in either cases):

Fata server error:
(EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)

I tried also to edit directly /etc/X11/Xwrapper.config and add 'needs_root_rights=yes|no' with no change.
Jörg-Volker Peetz
2024-09-08 13:50:01 UTC
Permalink
Maybe your account is missing some authorizations.
What's the output of `id`? Is your account member of the groups 'video' and 'input'?
Regards,
Jörg.
Pierre Willaime
2024-09-08 18:50:01 UTC
Permalink
Post by Jörg-Volker Peetz
Maybe your account is missing some authorizations.
What's the output of `id`? Is your account member of the groups 'video' and 'input'?
Thanks. My user was *not* member of the 'input' group.

I made the change but it does not fix my issue (startx returns still an
error, see my other email).
Max Nikulin
2024-09-09 03:00:01 UTC
Permalink
Post by Pierre Willaime
Thanks. My user was *not* member of the 'input' group.
I made the change but it does not fix my issue (startx returns still an
error, see my other email).
Have you tried to boot from a live media? It should help to determine if
your problem is caused by unsupported upgrade path. Are there any
errors, warnings, or suspicious messages in "journalctl -b" output
(executed as root)?

My expectation that udev and systemd-logind "uaccess" feature should
grant necessary permissions to the current user.
Pierre Willaime
2024-09-11 15:20:01 UTC
Permalink
Le 09/09/2024 à 04:56, Max Nikulin a écrit :>
Post by Max Nikulin
Have you tried to boot from a live media? It should help to
determine if your problem is caused by unsupported upgrade path.
Yes. It is booting and working fine on a debian stable live usb.
Post by Max Nikulin
Are there any errors, warnings, or suspicious messages in "journalctl
-b" output (executed as root)?
In red in journalctl -b:

pam_systemd(login:session): Failed to connect to system bus: Connection refused
Failed to start dbus.service - D-Bus System Message Bus. (many times)

systemctl status dbus.service shows dbus is not active ("failed") and I have this message

Failed to start message bus: Circular inclusion of file '/etc/dbus-1/system.conf'
Greg Wooledge
2024-09-11 15:30:02 UTC
Permalink
Post by Pierre Willaime
systemctl status dbus.service shows dbus is not active ("failed") and I have this message
Failed to start message bus: Circular inclusion of file '/etc/dbus-1/system.conf'
Curious. I have nothing that references that file at all.

hobbit:~$ ls -l /etc/dbus-1/
total 8
drwxr-xr-x 2 root root 4096 Sep 16 2023 session.d/
drwxr-xr-x 2 root root 4096 Feb 17 2024 system.d/
hobbit:~$ grep -r -F system.conf /etc/dbus-1
hobbit:~$

(That's on Debian 12.)
Max Nikulin
2024-09-11 16:00:01 UTC
Permalink
Post by Greg Wooledge
Post by Pierre Willaime
systemctl status dbus.service shows dbus is not active ("failed") and I have this message
Failed to start message bus: Circular inclusion of file '/etc/dbus-1/system.conf'
hobbit:~$ grep -r -F system.conf /etc/dbus-1
hobbit:~$
grep -r system.conf /usr/share/dbus-1/
/usr/share/dbus-1/system.conf: <include
ignore_missing="yes">/etc/dbus-1/system.conf</include>

I do not have this file as well. I suggest Pierre to compare config
files of live and installed environments.

I recommend to read
<https://www.debian.org/releases/bookworm/amd64/release-notes/ch-upgrading.en.html>
and the similar document for bullseye. My guess is that the
non-free-firmware repository may be missed on this machine and it may
have impact on issues with Xorg.
Pierre Willaime
2024-09-13 14:20:01 UTC
Permalink
Post by Max Nikulin
grep -r system.conf /usr/share/dbus-1/
/usr/share/dbus-1/system.conf:  <include
ignore_missing="yes">/etc/dbus-1/system.conf</include>
I do not have this file as well. I suggest Pierre to compare config
files of live and installed environments.
I recommend to read
<https://www.debian.org/releases/bookworm/amd64/release-notes/ch-upgrading.en.html>
and the similar document for bullseye. My guess is that the
non-free-firmware repository may be missed on this machine and it may
have impact on issues with Xorg.
I had two extra files in /etc/dbus-1

# ls -l /etc/dbus-1/
total 8
lrwxrwxrwx 1 root root 30 3 avril 2021 session.conf -> /usr/share/dbus-1/session.conf
drwxr-xr-x 2 root root 4096 16 sept. 2023 session.d
lrwxrwxrwx 1 root root 29 3 avril 2021 system.conf -> /usr/share/dbus-1/system.conf
drwxr-xr-x 2 root root 4096 1 sept. 18:04 system.d

# grep -r system.conf /usr/share/dbus-1/
/usr/share/dbus-1/system.conf: <include ignore_missing="yes">/etc/dbus-1/system.conf</include>

I deleted them

# rm /etc/dbus-1/session.conf /etc/dbus-1/system.conf

And X server is starting !!!!

Thank you all.

I guess upgrading directly from debian 9 to debian 12 prevented a script to remove these files.


I do not think it was related to non-free-firmware repository (Here is my sources.list below)

deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware

deb http://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware

deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware

deb http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
Max Nikulin
2024-09-13 15:40:02 UTC
Permalink
Post by Pierre Willaime
I do not think it was related to non-free-firmware repository (Here is
my sources.list below)
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
It seems repositories are properly configured. In general however "apt
policy" (with no package names) is a more reliable way to inspect actual
configuration.

In bookworm, i915 firmware is in firmware-misc-nonfree, later the
package has been split into several parts. If everything is working fine
then it should be installed. update-initramfs, e.g. during installing of
kernel update, warns if some firmware files are missed. drivers may warn
concerning firmware issues during boot as well.

Loading...