Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: open /dev/dri/card0: No such file or directory (Read 4543 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

open /dev/dri/card0: No such file or directory

Today when I got home from work, Artix could not be woke up from sleep and the CPU is uder heavy load. I pulled the plug and restarted the laptop. After filling in the login info, Xorg started but show an error
Code: [Select]
open /dev/dri/card0: No such file or directory

Here is the full log from `/var/log/Xorg.0.log`:
Code: [Select]
[    24.000] 
X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
[    24.003] Current Operating System: Linux artix 5.19.12-artix1-1 #1 SMP PREEMPT_DYNAMIC Thu, 29 Sep 2022 19:51:07 +0000 x86_64
[    24.003] Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=3cede99a-43fb-4db7-adb8-cb7020d5e550 rw loglevel=3 quiet
[    24.003] 
[    24.004] Current version of pixman: 0.40.0
[    24.004] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[    24.004] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    24.006] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Oct 16 16:38:01 2022
[    24.092] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    24.159] (==) No Layout section.  Using the first Screen section.
[    24.159] (==) No screen section available. Using defaults.
[    24.159] (**) |-->Screen "Default Screen Section" (0)
[    24.159] (**) |   |-->Monitor "<default monitor>"
[    24.159] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[    24.159] (==) Automatically adding devices
[    24.159] (==) Automatically enabling devices
[    24.159] (==) Automatically adding GPU devices
[    24.159] (==) Automatically binding GPU devices
[    24.159] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    24.179] (WW) The directory "/usr/share/fonts/misc" does not exist.
[    24.179] Entry deleted from font path.
[    24.180] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/TTF".
[    24.180] Entry deleted from font path.
[    24.180] (Run 'mkfontdir' on "/usr/share/fonts/TTF").
[    24.180] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[    24.180] Entry deleted from font path.
[    24.180] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[    24.180] Entry deleted from font path.
[    24.180] (WW) The directory "/usr/share/fonts/100dpi" does not exist.
[    24.180] Entry deleted from font path.
[    24.180] (WW) The directory "/usr/share/fonts/75dpi" does not exist.
[    24.180] Entry deleted from font path.
[    24.180] (==) FontPath set to:

[    24.180] (==) ModulePath set to "/usr/lib/xorg/modules"
[    24.180] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[    24.180] (II) Module ABI versions:
[    24.180] X.Org ANSI C Emulation: 0.4
[    24.180] X.Org Video Driver: 25.2
[    24.180] X.Org XInput driver : 24.4
[    24.180] X.Org Server Extension : 10.0
[    24.181] (++) using VT number 1

[    24.183] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[    24.185] (--) PCI:*(0@0:2:0) 8086:0166:103c:179b rev 9, Mem @ 0xd4000000/4194304, 0xc0000000/268435456, I/O @ 0x00004000/64, BIOS @ 0x????????/131072
[    24.185] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[    24.185] (II) LoadModule: "glx"
[    24.186] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    24.483] (II) Module glx: vendor="X.Org Foundation"
[    24.483] compiled for 1.21.1.4, module version = 1.0.0
[    24.483] ABI class: X.Org Server Extension, version 10.0
[    24.483] (==) Matched intel as autoconfigured driver 0
[    24.483] (==) Matched modesetting as autoconfigured driver 1
[    24.483] (==) Matched fbdev as autoconfigured driver 2
[    24.483] (==) Matched vesa as autoconfigured driver 3
[    24.483] (==) Assigned the driver to the xf86ConfigLayout
[    24.483] (II) LoadModule: "intel"
[    24.483] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[    24.554] (II) Module intel: vendor="X.Org Foundation"
[    24.554] compiled for 1.21.1.1, module version = 2.99.917
[    24.554] Module class: X.Org Video Driver
[    24.554] ABI class: X.Org Video Driver, version 25.2
[    24.554] (II) LoadModule: "modesetting"
[    24.554] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[    24.602] (II) Module modesetting: vendor="X.Org Foundation"
[    24.603] compiled for 1.21.1.4, module version = 1.21.1
[    24.603] Module class: X.Org Video Driver
[    24.603] ABI class: X.Org Video Driver, version 25.2
[    24.603] (II) LoadModule: "fbdev"
[    24.603] (WW) Warning, couldn't open module fbdev
[    24.603] (EE) Failed to load module "fbdev" (module does not exist, 0)
[    24.603] (II) LoadModule: "vesa"
[    24.603] (WW) Warning, couldn't open module vesa
[    24.603] (EE) Failed to load module "vesa" (module does not exist, 0)
[    24.603] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[    24.604] (II) intel: Driver for Intel(R) HD Graphics
[    24.604] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[    24.604] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[    24.604] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    24.609] (EE) open /dev/dri/card0: No such file or directory
[    24.609] (WW) Falling back to old probe method for modesetting
[    24.609] (EE) open /dev/dri/card0: No such file or directory
[    24.609] (EE) Screen 0 deleted because of no matching config section.
[    24.609] (II) UnloadModule: "modesetting"
[    24.609] (EE) Device(s) detected, but none match those in the config file.
[    24.609] (EE)
Fatal server error:
[    24.609] (EE) no screens found(EE)
[    24.609] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
 for help.
[    24.609] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    24.609] (EE)
[    24.611] (EE) Server terminated with error (1). Closing log file.

This is the second time this has happened, the first time I fixed it by reinstalling the Linux packages but this time, no luck. Also when I execute `mkinitcpio` it shows this error
Code: [Select]
==> ERROR: '/lib/modules/5.19.12-artix1-1' is not a valid kernel module directory

I could not find `/lib/modules/5.19.12-artix1-1`, there's only `/lib/modules/6.0.1-arch1-1`.

Thanks in advance!

Re: open /dev/dri/card0: No such file or directory

Reply #1
It seems missing /var/lib/5.18.10-artix1-1 is the problem here but I don't know how it went missing. I didn't delete it.

Re: open /dev/dri/card0: No such file or directory

Reply #2
I guess you updated the kernel at some point but somehow something went wrong and things are still looking for the old kernel.

Re: open /dev/dri/card0: No such file or directory

Reply #3
I guess you updated the kernel at some point but somehow something went wrong and things are still looking for the old kernel.

If you meant the outdated linux version, it's actually because my ISO is old. I've fixed it to the correct version.

If not, I have no clue what happened either.

Re: open /dev/dri/card0: No such file or directory

Reply #4
Well no the fact that you have a `/lib/modules/6.0.1-arch1-1` despite the xorg log saying `Linux artix 5.19.12-artix1-1` suggests a mismatched kernel version somehow somewhere. I have no clue why this would happen other than perhaps some weird issue while updating/forgetting to reboot or some other thing.

Re: open /dev/dri/card0: No such file or directory

Reply #5
Hmmmm, but I thought linux don't have to reboot every update? Could it be because I've been using yay to update the system? Anyhow, how should I fix this? Can I just rename the file?

Re: open /dev/dri/card0: No such file or directory

Reply #6
Whenever you update the kernel, a reboot is required in order to load the new kernel. You don't have to do it immediately, but certain things will not work until after a reboot (for example, plugging in a new usb device). Using an AUR helper or not doesn't matter.

Anyhow, how should I fix this? Can I just rename the file?

Definitely no to the second question. Your system seems pretty broken in some weird way so I'm not sure how hard/easy this would be to fix. For example, simply waking up from suspend should never be a problem (nor should your /dev/dri/card0 just disappear) so be prepared for the worst. You probably have to reboot. If your boot doesn't actually fail, you might be good. Otherwise, chroot into the system from a live iso/usb. Try to reinstall all essential packages (linux, linux-headers, etc.) and that kind of thing.

Re: open /dev/dri/card0: No such file or directory

Reply #7
Today when I got home from work, Artix could not be woke up from sleep and the CPU is uder heavy load. I pulled the plug and restarted the laptop. After filling in the login info, Xorg started but show an error
Code: [Select]
open /dev/dri/card0: No such file or directory

Here is the full log from `/var/log/Xorg.0.log`:
Code: [Select]
[    24.000] 
X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
[    24.003] Current Operating System: Linux artix 5.19.12-artix1-1 #1 SMP PREEMPT_DYNAMIC Thu, 29 Sep 2022 19:51:07 +0000 x86_64
[    24.003] Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=3cede99a-43fb-4db7-adb8-cb7020d5e550 rw loglevel=3 quiet
[    24.003] 
[    24.004] Current version of pixman: 0.40.0
[    24.004] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[    24.004] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    24.006] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Oct 16 16:38:01 2022
[    24.092] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    24.159] (==) No Layout section.  Using the first Screen section.
[    24.159] (==) No screen section available. Using defaults.
[    24.159] (**) |-->Screen "Default Screen Section" (0)
[    24.159] (**) |   |-->Monitor "<default monitor>"
[    24.159] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[    24.159] (==) Automatically adding devices
[    24.159] (==) Automatically enabling devices
[    24.159] (==) Automatically adding GPU devices
[    24.159] (==) Automatically binding GPU devices
[    24.159] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    24.179] (WW) The directory "/usr/share/fonts/misc" does not exist.
[    24.179] Entry deleted from font path.
[    24.180] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/TTF".
[    24.180] Entry deleted from font path.
[    24.180] (Run 'mkfontdir' on "/usr/share/fonts/TTF").
[    24.180] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[    24.180] Entry deleted from font path.
[    24.180] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[    24.180] Entry deleted from font path.
[    24.180] (WW) The directory "/usr/share/fonts/100dpi" does not exist.
[    24.180] Entry deleted from font path.
[    24.180] (WW) The directory "/usr/share/fonts/75dpi" does not exist.
[    24.180] Entry deleted from font path.
[    24.180] (==) FontPath set to:

[    24.180] (==) ModulePath set to "/usr/lib/xorg/modules"
[    24.180] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[    24.180] (II) Module ABI versions:
[    24.180] X.Org ANSI C Emulation: 0.4
[    24.180] X.Org Video Driver: 25.2
[    24.180] X.Org XInput driver : 24.4
[    24.180] X.Org Server Extension : 10.0
[    24.181] (++) using VT number 1

[    24.183] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[    24.185] (--) PCI:*(0@0:2:0) 8086:0166:103c:179b rev 9, Mem @ 0xd4000000/4194304, 0xc0000000/268435456, I/O @ 0x00004000/64, BIOS @ 0x????????/131072
[    24.185] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[    24.185] (II) LoadModule: "glx"
[    24.186] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    24.483] (II) Module glx: vendor="X.Org Foundation"
[    24.483] compiled for 1.21.1.4, module version = 1.0.0
[    24.483] ABI class: X.Org Server Extension, version 10.0
[    24.483] (==) Matched intel as autoconfigured driver 0
[    24.483] (==) Matched modesetting as autoconfigured driver 1
[    24.483] (==) Matched fbdev as autoconfigured driver 2
[    24.483] (==) Matched vesa as autoconfigured driver 3
[    24.483] (==) Assigned the driver to the xf86ConfigLayout
[    24.483] (II) LoadModule: "intel"
[    24.483] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[    24.554] (II) Module intel: vendor="X.Org Foundation"
[    24.554] compiled for 1.21.1.1, module version = 2.99.917
[    24.554] Module class: X.Org Video Driver
[    24.554] ABI class: X.Org Video Driver, version 25.2
[    24.554] (II) LoadModule: "modesetting"
[    24.554] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[    24.602] (II) Module modesetting: vendor="X.Org Foundation"
[    24.603] compiled for 1.21.1.4, module version = 1.21.1
[    24.603] Module class: X.Org Video Driver
[    24.603] ABI class: X.Org Video Driver, version 25.2
[    24.603] (II) LoadModule: "fbdev"
[    24.603] (WW) Warning, couldn't open module fbdev
[    24.603] (EE) Failed to load module "fbdev" (module does not exist, 0)
[    24.603] (II) LoadModule: "vesa"
[    24.603] (WW) Warning, couldn't open module vesa
[    24.603] (EE) Failed to load module "vesa" (module does not exist, 0)
[    24.603] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[    24.604] (II) intel: Driver for Intel(R) HD Graphics
[    24.604] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[    24.604] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[    24.604] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    24.609] (EE) open /dev/dri/card0: No such file or directory
[    24.609] (WW) Falling back to old probe method for modesetting
[    24.609] (EE) open /dev/dri/card0: No such file or directory
[    24.609] (EE) Screen 0 deleted because of no matching config section.
[    24.609] (II) UnloadModule: "modesetting"
[    24.609] (EE) Device(s) detected, but none match those in the config file.
[    24.609] (EE)
Fatal server error:
[    24.609] (EE) no screens found(EE)
[    24.609] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
 for help.
[    24.609] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    24.609] (EE)
[    24.611] (EE) Server terminated with error (1). Closing log file.

This is the second time this has happened, the first time I fixed it by reinstalling the Linux packages but this time, no luck. Also when I execute `mkinitcpio` it shows this error
Code: [Select]
==> ERROR: '/lib/modules/5.19.12-artix1-1' is not a valid kernel module directory

I could not find `/lib/modules/5.19.12-artix1-1`, there's only `/lib/modules/6.0.1-arch1-1`.

Thanks in advance!

There was a mistake on the kernel build, but it has been fixed, so you will have a 6.0.1-artix1-1.1 folder for the modules.

Re: open /dev/dri/card0: No such file or directory

Reply #8
Yup, I have updated Linux to the latest version but Xorg still looks for 5.19.12-artix1-1 for some reason.

 

Re: open /dev/dri/card0: No such file or directory

Reply #9
I have to update linux through a chrooted environment with /boot mounted and then executed upgrade-grub (not sure if this is necessary) and the problem is fixed.